[2/3] initramfs-tee-ftpm-hook: Use override to model variations

Message ID 44f1cf083998769d2d18183e9bd2baa5d45af0e4.1761385036.git.jan.kiszka@siemens.com
State Under Review
Headers show
Series initramfs-tee-ftpm-hook fix and optimizations | expand

Commit Message

Jan Kiszka Oct. 25, 2025, 9:37 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Less code, specifically when adding more bits under
TEE_SUPPLICANT_IN_USERLAND control.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.3.bb  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.3.bb b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.3.bb
index c2fe62c5..0a7cd560 100644
--- a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.3.bb
+++ b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.3.bb
@@ -14,6 +14,8 @@  SRC_URI += "file://local-top"
 # NOTE: default will eventually be flipped
 TEE_SUPPLICANT_IN_USERLAND ?= "1"
 
-HOOK_PREREQ = "${@'tee-supplicant' if bb.utils.to_boolean(d.getVar('TEE_SUPPLICANT_IN_USERLAND')) else ''}"
+OVERRIDES .= "${@'supp-user' if bb.utils.to_boolean(d.getVar('TEE_SUPPLICANT_IN_USERLAND')) else ''}"
+
+HOOK_PREREQ:supp-user = "tee-supplicant"
 HOOK_ADD_MODULES = "amdtee arm-tstee optee qcomtee tpm_ftpm_tee"
-SCRIPT_PREREQ = "${@'tee-supplicant' if bb.utils.to_boolean(d.getVar('TEE_SUPPLICANT_IN_USERLAND')) else ''}"
+SCRIPT_PREREQ:supp-user = "tee-supplicant"