[yocto] [meta-security][PATCH v2 6/6] tpm2-tcti-uefi: build and install examples

Dmitry Eremin-Solenikov dbaryshkov at gmail.com
Wed Jul 24 06:03:37 PDT 2019


From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov at mentor.com>

Examples are usefull to actually check TPM2 from UEFI shell. Add them to
tpm2-tcti-uefi package.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov at mentor.com>
---
 .../tpm2-tcti-uefi/tpm2-tcti-uefi_0.9.9.bb          | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta-tpm/recipes-tpm2/tpm2-tcti-uefi/tpm2-tcti-uefi_0.9.9.bb b/meta-tpm/recipes-tpm2/tpm2-tcti-uefi/tpm2-tcti-uefi_0.9.9.bb
index b2d0b85af280..e822e2974f37 100644
--- a/meta-tpm/recipes-tpm2/tpm2-tcti-uefi/tpm2-tcti-uefi_0.9.9.bb
+++ b/meta-tpm/recipes-tpm2/tpm2-tcti-uefi/tpm2-tcti-uefi_0.9.9.bb
@@ -14,6 +14,17 @@ S = "${WORKDIR}/git"
 
 inherit autotools pkgconfig
 
+EFIDIR ?= "/EFI/BOOT"
+
+do_compile_append() {
+	oe_runmake example
+}
+
+do_install_append() {
+	install -d "${D}${EFIDIR}"
+	install -m 0755 "${B}"/example/*.efi "${D}${EFIDIR}"
+}
+
 EFI_ARCH_x86 = "ia32"
 EFI_ARCH_x86-64 = "x86_64"
 
@@ -24,3 +35,5 @@ EXTRA_OECONF_append = "\
     --with-efi-lds=${STAGING_LIBDIR_NATIVE}/elf_${EFI_ARCH}_efi.lds \
 "
 RDEPENDS_${PN} = "gnu-efi"
+
+FILES_${PN} += "${EFIDIR}"
-- 
2.20.1



More information about the yocto mailing list