From 9cbedaf381c73d38ef9e52feb0914882dc793256 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 27 Aug 2026 15:37:20 +0200 Subject: [PATCH] optee-ftpm: rewrite its optee-os bbappend to use EARLY_TA_PATHS bitbake variable If anything else in the BSP also wants or needs to add an early TA to optee, that will conflict with this .bbappend adding its own EARLY_TA_PATHS="..." argument to EXTRA_OEMAKE. Instead, add the path to the ftpm TA to the newly introduced EARLY_TA_PATHS bitbake variable, which the main recipe will use to produce the make argument. Passing CFG_EARLY_TA=y explicitly is not needed, as optee-os' build system sets that automatically if the EARLY_TA_PATHS list is non-empty. CFG_CORE_HEAP_SIZE is somewhat harder to make play along nicely with other .bbappends that might have an opinion on its proper (minimum) value. For now, keep adding it explicitly to EXTRA_OEMAKE. Signed-off-by: Rasmus Villemoes Signed-off-by: Jon Mason --- .../recipes-security/optee-ftpm/optee-os_%.bbappend | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-arm/recipes-security/optee-ftpm/optee-os_%.bbappend b/meta-arm/recipes-security/optee-ftpm/optee-os_%.bbappend index 92c11157..74bde25e 100644 --- a/meta-arm/recipes-security/optee-ftpm/optee-os_%.bbappend +++ b/meta-arm/recipes-security/optee-ftpm/optee-os_%.bbappend @@ -4,8 +4,8 @@ DEPENDS:append = "\ ${@bb.utils.contains('MACHINE_FEATURES', 'optee-ftpm', 'optee-ftpm', '' , d)} \ " -EXTRA_OEMAKE:append = "\ - ${@bb.utils.contains('MACHINE_FEATURES', 'optee-ftpm', \ - 'CFG_CORE_HEAP_SIZE=131072 CFG_EARLY_TA=y EARLY_TA_PATHS="${STAGING_DIR_TARGET}/${base_libdir}/optee_armtz/${FTPM_UUID}.stripped.elf"', \ - '', d)} \ -" +python() { + if bb.utils.contains('MACHINE_FEATURES', 'optee-ftpm', True, False, d): + d.appendVar('EARLY_TA_PATHS', ' ${STAGING_DIR_TARGET}/${base_libdir}/optee_armtz/${FTPM_UUID}.stripped.elf') + d.appendVar('EXTRA_OEMAKE', ' CFG_CORE_HEAP_SIZE=131072') +}