Skip to contentSkip to conversation

arm/optee-os: Fix build race condition when using fTPM

PATCH Superseded Ryan Fairfax 2 participants 2 messages Jan 11, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/optee-os: Fix build race condition when using fTPM

Update dependencies to depend on optee-ftpm:do_deploy instead of do_populate_sysroot since binaries are being referenced from DEPLOY_DIR_IMAGE.

---
.../recipes-security/optee-ftpm/optee-os_%.bbappend  | 12 ++++++------

1 file changed, 6 insertions(+), 6 deletions(-)
meta-arm/recipes-security/optee-ftpm/optee-os_%.bbappend +0 -0
index 0cfa949..6e2edce 100644
@@ -1,11 +1,11 @@

FTPM_UUID="bc50d971-d4c9-42c4-82cb-343fb7f37896"

-DEPENDS:append = "\
-                  ${@bb.utils.contains('MACHINE_FEATURES', \
-                 'optee-ftpm', \
-                 'optee-ftpm', \
-                 '' , \
-                 d)}"
+do_compile[depends] += "\
+                       ${@bb.utils.contains('MACHINE_FEATURES', \
+                      'optee-ftpm', \
+                      'optee-ftpm:do_deploy', \
+                      '' , \
+                      d)}"

EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', \
'optee-ftpm', \
--
2.25.1

#1 lore raw
Quoted 1 line · Ryan Fairfax via lists.yoctoproject.org

Update dependencies to depend on optee-ftpm:do_deploy instead of do_populate_sysroot since binaries are being referenced from DEPLOY_DIR_IMAGE.

The typical approach here is for packages to also write into staging, so files can be pulled out of the sysroot instead of deploydir.

eg optee-os does SYSROOT_DIRS += "${nonarch_base_libdir}/firmware" so that the files are in the sysroot to be shared.

The better question is why this doesn't fail in our CI. Do you know
why this doesn't break our qemuarm64-secureboot build which does enable optee-ftpm?

Ross