README: Add swtpm build instructions and links

QEMU uses swtpm over unix socket, but it is currently not packaged so
is built from source.
pull/146/head
Elms 2021-02-23 10:06:04 -08:00
parent 230e21bbcc
commit 2075d987ce
2 changed files with 18 additions and 1 deletions

View File

@ -222,7 +222,23 @@ sudo adduser yourusername tss
This demonstrates using wolfTPM in QEMU to communicate using the linux This demonstrates using wolfTPM in QEMU to communicate using the linux
kernel device "/dev/tpmX". You will need to install or build kernel device "/dev/tpmX". You will need to install or build
[swtpm](https://github.com/stefanberger/swtpm). [swtpm](https://github.com/stefanberger/swtpm). Below are a short
method to build. You may need to consult the instructions for
[libtpms](https://github.com/stefanberger/libtpms/wiki#compile-and-install-on-linux)
and
[swtpm](https://github.com/stefanberger/swtpm/wiki#compile-and-install-on-linux)
```
PREFIX=$PWD/inst
git clone git@github.com:stefanberger/libtpms.git
cd libtpms/
./autogen.sh --with-openssl --with-tpm2 --prefix=$PREFIX && make install
cd ..
git clone git@github.com:stefanberger/swtpm.git
cd swtpm
PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/ ./autogen.sh --with-openssl --with-tpm2 --prefix=$PREFIX && make install
cd ..
```
You can setup a basic linux installation. Other installation bases can You can setup a basic linux installation. Other installation bases can
be used. This step will take some time to install the base linux be used. This step will take some time to install the base linux

View File

@ -11,6 +11,7 @@ TOP_DIR=$(realpath $(dirname $0)/..)
die() { die() {
echo $* >&2 echo $* >&2
ps $swtpm_pid > /dev/null && kill $swtpm_pid
exit 1 exit 1
} }