@dyk
2015-08-25T07:59:29.000000Z
字数 2308
阅读 421
Schedule TPM Workspace
注意以下操作有必要在super user的模式下进行,进入super user模式命令
su
或者
sudo + 命令
貌似这个版本的Ubuntu没有自带sshd,有必要需要安装
sudo apt-get updatesudo apt-get dist-upgrade# 安装 VIM 以及 ssh相关sudo apt-get install openssh-server ssh build-essential
编译需要cmake,以及gmp库
suapt-get install cmakeapt-get install libgmp3-devtar zxvf tpm_emulator-0.7.4.tar.gzcd tpm_emulator-0.7.4sudo mkdir buildcd buildcmake ../makemake install
运行在自己编译的内核上面需要在内核源码上面,如果出现如下错误
In file included from <command-line>:0:0:
././include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h: No such file or directory
#include <generated/autoconf.h>
^
compilation terminated.
make[5]: *** [/usr/src/tpm_emulator-0.7.4/build/tpmd_dev/linux/tpmd_dev.o] Error 1
make[4]: *** [_module_/usr/src/tpm_emulator-0.7.4/build/tpmd_dev/linux] Error 2
make[3]: *** [all] Error 2
make[2]: *** [tpmd_dev/linux/tpmd_dev.ko] Error 2
make[1]: *** [tpmd_dev/CMakeFiles/tpmd_dev.dir/all] Error 2
make: *** [all] Error 2
或者
/bin/sh: ./scripts/recordmcount: No such file or directory
make[5]: *** [/usr/src/tpm_emulator-0.7.4/build/tpmd_dev/linux/tpmd_dev.o] Error 1
make[4]: *** [_module_/usr/src/tpm_emulator-0.7.4/build/tpmd_dev/linux] Error 2
make[3]: *** [all] Error 2
make[2]: *** [tpmd_dev/linux/tpmd_dev.ko] Error 2
make[1]: *** [tpmd_dev/CMakeFiles/tpmd_dev.dir/all] Error 2
make: *** [all] Error 2
运行在自己编译的内核源码文件夹运行一下代码:
make oldconfigmake preparemake scripts
启动TPM Emulator
modprobe tpmd_devtpmd -f -d clear (tpmd -h查看启动参数)
若出现Module tpmd_dev not found,则先运行命令
depmod -a
若出现failed: address already in use,则运行命令
rm/var/run/tpm/tpmd_socket:0
若成功,会不断出现如下提示:
tpmd.c:310: Debug: waiting for connections...
安装相应的依赖包
suapt-get install libssl-devtar zxvf trousers-0.3.13.tar.gzcd ./trousers-0.3.13./configuremakemake install
安装tpm-tools 1.3.8
sutar zxvf tpm-tools-1.3.8.tar.gzcd tpm-tolls-1.3.8./configuremakemake install
启动TPM模拟器
tpmd -d -f clear
启动TrouSerS
tcsd -e -f
使用TPM Tools进行测试
tpm_version
打印出类似下列文字,则安装成功
TPM 1.2 Version Info:
Chip Version: 1.2.0.7
Spec Level: 2
Errata Revision: 1
TPM Vendor ID: ETHZ
TPM Version: 01010000
Manufacturer Info: 4554485a
如果出现以下错误
tpm_version: error while loading sharedlibraries: libtspi.so.1: cannot open shared object file: No suchfile or directory
则将路径/usr/local/lib添加到/etc/ld.so.conf文件中,之后并且执行
ldconfig