From 5102d150e78cc1457782d969503dc544b26f55a3 Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Thu, 4 Aug 2022 21:49:29 -0500 Subject: trusted-firmware-a: Allow build to continue without TI_SECURE_DEV_PKG set Signed-off-by: Andrew Davis Signed-off-by: Ryan Eatmon --- .../trusted-firmware-a_%.bbappend | 38 +++++++++------------- 1 file changed, 16 insertions(+), 22 deletions(-) (limited to 'recipes-bsp') diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend index 9645137e..965c99d4 100644 --- a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend +++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend @@ -9,42 +9,36 @@ TFA_SPD_k3 = "opteed" EXTRA_OEMAKE_append_k3 = "${@ 'K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}" EXTRA_OEMAKE_append_k3 = "${@ 'K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}" -do_compile_append_am65xx-hs-evm() { +# Signing procedure for K3 HS devices +tfa_sign_k3hs() { export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} ( cd ${B}/${BUILD_DIR}/release/; \ mv bl31.bin bl31.bin.unsigned; \ - ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ + if [ -f ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ]; then \ + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ + else \ + echo "Warning: TI_SECURE_DEV_PKG not set, TF-A not signed."; \ + cp bl31.bin.unsigned bl31.bin; \ + fi; \ ) } +do_compile_append_am65xx-hs-evm() { + tfa_sign_k3hs +} + do_compile_append_am64xx-hs-evm() { - export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} - ( cd ${B}/${BUILD_DIR}/release/; \ - mv bl31.bin bl31.bin.unsigned; \ - ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ - ) + tfa_sign_k3hs } do_compile_append_j7-hs-evm() { - export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} - ( cd ${B}/${BUILD_DIR}/release/; \ - mv bl31.bin bl31.bin.unsigned; \ - ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ - ) + tfa_sign_k3hs } do_compile_append_j7200-hs-evm() { - export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} - ( cd ${B}/${BUILD_DIR}/release/; \ - mv bl31.bin bl31.bin.unsigned; \ - ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ - ) + tfa_sign_k3hs } do_compile_append_j721s2-hs-evm() { - export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} - ( cd ${B}/${BUILD_DIR}/release/; \ - mv bl31.bin bl31.bin.unsigned; \ - ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ - ) + tfa_sign_k3hs } -- cgit v1.2.3-54-g00ecf