summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/python/python-pycrypto/cross-compiling.patch
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-02-03 09:46:13 +0100
committerArmin Kuster <akuster808@gmail.com>2017-02-18 11:43:20 -0800
commit6cf0415d8a3553353ec2e8ddbf85d80604a7c5a8 (patch)
treef2be662e45bea82a089b520b0752354d6e472255 /recipes-devtools/python/python-pycrypto/cross-compiling.patch
parent520b3a44e09d5c962772488f14308db084fc2fbc (diff)
downloadmeta-security-6cf0415d8a3553353ec2e8ddbf85d80604a7c5a8.tar.gz
swtpm-wrappers: simplify using swtpm-native
Native tools exist in recipe specific sysroots and are normally not meant to be called from outside a build. But that's what we need to do when using swtpm-native together with qemu, so these wrappers make that possible by setting up the necessary environment and hiding the internal paths. Invoking swtpm_setup.sh gets some special support: swtpm_setup.sh runs two daemons, tcsd and swtpm, of which tcsd insists on running as root or tss. In practice, running as the normal user is perfectly fine. Instead of patching the upstream source code, the approach take here is to run under pseudo. Usage examples: $ bitbake swtpm-wrappers $ mkdir -p my-machine/myvtpm0 $ tmp-glibc/work/x86_64-linux/swtpm-wrappers/1.0-r0/swtpm_setup_oe.sh --tpm-state my-machine/myvtpm0 Starting vTPM manufacturing as root:root @ Mon 16 Jan 2017 04:09:21 PM CET TPM is listening on TCP port 55675. -rw------- 1 root root 65 Jan 16 16:09 /tmp/tmp.2yJBKTTwRk Ending vTPM manufacturing @ Mon 16 Jan 2017 04:09:21 PM CET The resulting "my-machine/myvtpm0" can then be used with swtpm (this time, it really has to be running as root because it uses CUSE to create /dev/vtpm0, and an absolute path is needed for the tpm state dir) and qemu-tpm (patches not currently in OE-core, have to be applied manually): $ sudo tmp-glibc/work/x86_64-linux/swtpm-wrappers/1.0-r0/swtpm_cuse_oe.sh -n vtpm0 --tpmstate dir=`pwd`/my-machine/myvtpm0 $ sudo chmod a+rw /dev/vtpm0 $ runqemu ... 'qemuparams=-tpmdev cuse-tpm,id=tpm0,path=/dev/vtpm0 -device tpm-tis,tpmdev=tpm0' Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'recipes-devtools/python/python-pycrypto/cross-compiling.patch')
0 files changed, 0 insertions, 0 deletions