summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp
diff options
context:
space:
mode:
authorAndrew Davis <afd@ti.com>2023-02-15 13:33:42 -0600
committerRyan Eatmon <reatmon@ti.com>2023-03-01 09:16:02 -0600
commitb7c909cec7df033e333cdc63b331320c7a21d70d (patch)
treecaa3244302306de6ed5d127268ec7f83f49ec39a /meta-ti-bsp
parent1df0827fb9f3b41d6e5c5ad45cebaddaa501ae3a (diff)
downloadmeta-ti-b7c909cec7df033e333cdc63b331320c7a21d70d.tar.gz
trusted-firmware-a: Use new ti-secdev class to sign the images
Use the new ti-k3-secdev package to pull in the signing tools if they are not provided by the environment. This allows us to use these tools unconditionally. Remove the checks for the script and do the signing for all K3 machines. The signature is automatically stripped from the binaries on non-HS devices at boot time as needed so this change is harmless for GP devices. Signed-off-by: Andrew Davis <afd@ti.com> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp')
-rw-r--r--meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend39
1 files changed, 7 insertions, 32 deletions
diff --git a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend
index 5acc5c2e..be601e62 100644
--- a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend
+++ b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend
@@ -6,39 +6,14 @@ TFA_BUILD_TARGET:k3 = "all"
6TFA_INSTALL_TARGET:k3 = "bl31" 6TFA_INSTALL_TARGET:k3 = "bl31"
7TFA_SPD:k3 = "opteed" 7TFA_SPD:k3 = "opteed"
8 8
9# Use TI SECDEV for signing
10inherit ti-secdev
11
9EXTRA_OEMAKE:append:k3 = "${@ ' K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}" 12EXTRA_OEMAKE:append:k3 = "${@ ' K3_USART=' + d.getVar('TFA_K3_USART') if d.getVar('TFA_K3_USART') else ''}"
10EXTRA_OEMAKE:append:k3 = "${@ ' K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}" 13EXTRA_OEMAKE:append:k3 = "${@ ' K3_PM_SYSTEM_SUSPEND=' + d.getVar('TFA_K3_SYSTEM_SUSPEND') if d.getVar('TFA_K3_SYSTEM_SUSPEND') else ''}"
11 14
12# Signing procedure for K3 HS devices 15# Signing procedure for K3 devices
13tfa_sign_k3hs() { 16do_compile:append:k3() {
14 export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} 17 mv ${BUILD_DIR}/bl31.bin ${BUILD_DIR}/bl31.bin.unsigned
15 ( cd ${BUILD_DIR}; \ 18 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${BUILD_DIR}/bl31.bin.unsigned ${BUILD_DIR}/bl31.bin
16 mv bl31.bin bl31.bin.unsigned; \
17 if [ -f ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ]; then \
18 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \
19 else \
20 echo "Warning: TI_SECURE_DEV_PKG not set, TF-A not signed."; \
21 cp bl31.bin.unsigned bl31.bin; \
22 fi; \
23 )
24}
25
26do_compile:append:am65xx-hs-evm() {
27 tfa_sign_k3hs
28}
29
30do_compile:append:am64xx-evm() {
31 tfa_sign_k3hs
32}
33
34do_compile:append:j721e-hs-evm() {
35 tfa_sign_k3hs
36}
37
38do_compile:append:j7200-hs-evm() {
39 tfa_sign_k3hs
40}
41
42do_compile:append:j721s2-hs-evm() {
43 tfa_sign_k3hs
44} 19}