Files
poky/meta/recipes-devtools
Patrick Ohly 81b7a9832f qemu: support virtual TPM
This enables the use of swtpm (from meta-security) as a virtual TPM in
qemu. These patches extend the existing support in qemu for TPM
passthrough so that a swtpm daemon can be accessed via CUSE (character
device in user space).

To use this:
 - add the meta-security layer including the swtpm enhancements for qemu
 - bitbake swtpm-native
 - create a TPM instance and initialize it with:

   $ mkdir -p my-machine/myvtpm0
   $ tmp-glibc/sysroots/x86_64-linux/usr/bin/swtpm_setup_oe.sh --tpm-state my-machine/myvtpm0 --createek
   Starting vTPM manufacturing as root:root @ Fri 20 Jan 2017 08:56:18 AM CET
   TPM is listening on TCP port 52167.
   Successfully created EK.
   Successfully authored TPM state.
   Ending vTPM manufacturing @ Fri 20 Jan 2017 08:56:19 AM CET

 - run swtpm *before each runqemu invocation* (it shuts down after use) and
   do it as root (required to set up the /dev/vtpm0 CUSE device):

   $ sudo sh -c 'PATH=`pwd`/tmp-glibc/sysroots/x86_64-linux/usr/bin/:`pwd`/tmp-glibc/sysroots/x86_64-linux/usr/sbin/:$PATH; export TPM_PATH=`pwd`/my-machine/myvtpm0; swtpm_cuse -n vtpm0' && sudo chmod a+rw /dev/vtpm0

 - run qemu:

   $ runqemu 'qemuparams=-tpmdev cuse-tpm,id=tpm0,path=/dev/vtpm0 -device tpm-tis,tpmdev=tpm0' ...

The guest kernel has to have TPM support enabled, which can be done with:

KERNEL_FEATURES_append = " features/tpm/tpm.scc"

(From OE-Core rev: 1264d26fa251ac11a9069f3e602dec6be9d8b9ba)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 11:17:44 +00:00
..
2017-02-23 12:49:50 -08:00
2016-02-19 01:01:24 +00:00
2017-02-07 14:50:10 +00:00
2017-02-15 20:06:43 -08:00
2017-01-26 10:44:28 +00:00
2017-01-05 13:54:06 +00:00
2017-01-16 18:05:12 +00:00
2017-02-23 12:49:50 -08:00
2017-02-23 12:49:49 -08:00
2017-02-15 20:06:43 -08:00
2017-01-23 12:05:17 +00:00
2017-02-15 20:06:43 -08:00
2016-07-08 09:57:24 +01:00
2016-05-25 07:50:17 +01:00
2017-02-15 20:06:43 -08:00
2017-01-09 13:39:12 +00:00
2016-08-25 23:03:45 +01:00
2016-11-06 23:35:34 +00:00
2016-09-15 12:15:07 +01:00
2017-02-15 20:06:42 -08:00
2017-02-07 14:50:09 +00:00
2017-02-15 20:06:41 -08:00
2017-03-01 11:17:44 +00:00
2017-01-05 13:54:05 +00:00
2017-01-26 10:44:27 +00:00
2016-12-22 08:50:16 +00:00
2017-02-15 20:06:43 -08:00
2017-02-23 12:49:51 -08:00
2017-02-23 12:49:50 -08:00
2016-12-17 09:57:04 +00:00
2017-01-09 13:39:12 +00:00
2015-06-11 23:59:15 +01:00