summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Davis <afd@ti.com>2023-02-15 13:33:43 -0600
committerRyan Eatmon <reatmon@ti.com>2023-03-01 09:16:02 -0600
commitc821b2bb2f802dc7ad4df9f4e322d8caa0b07cc5 (patch)
tree67d0b2e5eb3a279d18264575adb4fffa0677ee0a
parentb7c909cec7df033e333cdc63b331320c7a21d70d (diff)
downloadmeta-ti-c821b2bb2f802dc7ad4df9f4e322d8caa0b07cc5.tar.gz
optee-os: 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>
-rw-r--r--meta-ti-bsp/recipes-security/optee/optee-os_3.16%.bbappend43
1 files changed, 7 insertions, 36 deletions
diff --git a/meta-ti-bsp/recipes-security/optee/optee-os_3.16%.bbappend b/meta-ti-bsp/recipes-security/optee/optee-os_3.16%.bbappend
index 6913851b..1e0072ef 100644
--- a/meta-ti-bsp/recipes-security/optee/optee-os_3.16%.bbappend
+++ b/meta-ti-bsp/recipes-security/optee/optee-os_3.16%.bbappend
@@ -1,14 +1,13 @@
1PV:ti-soc = "3.19.0+git${SRCPV}" 1PV:ti-soc = "3.19.0+git${SRCPV}"
2SRCREV:ti-soc = "afacf356f9593a7f83cae9f96026824ec242ff52" 2SRCREV:ti-soc = "afacf356f9593a7f83cae9f96026824ec242ff52"
3 3
4# Use TI SECDEV for signing
5inherit ti-secdev
6
4EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}" 7EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"
5 8
6EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1" 9EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"
7 10
8do_compile:prepend:ti-soc() {
9 export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG}
10}
11
12do_compile:append:k3() { 11do_compile:append:k3() {
13 ( cd ${B}/core/; \ 12 ( cd ${B}/core/; \
14 cp tee-pager_v2.bin ${B}/bl32.bin; \ 13 cp tee-pager_v2.bin ${B}/bl32.bin; \
@@ -35,20 +34,6 @@ optee_sign_legacyhs() {
35 fi 34 fi
36} 35}
37 36
38# Signing procedure for K3 HS devices
39optee_sign_k3hs() {
40 ( cd ${B}/core/; \
41 if [ -f ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ]; then \
42 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh tee-pager_v2.bin tee-pager.bin.signed; \
43 else \
44 echo "Warning: TI_SECURE_DEV_PKG not set, OP-TEE not signed."; \
45 cp tee-pager_v2.bin tee-pager.bin.signed; \
46 fi; \
47 mv tee-pager.bin.signed ${B}/bl32.bin; \
48 cp tee.elf ${B}/bl32.elf; \
49 )
50}
51
52do_compile:append:ti43x() { 37do_compile:append:ti43x() {
53 optee_sign_legacyhs 38 optee_sign_legacyhs
54} 39}
@@ -57,24 +42,10 @@ do_compile:append:dra7xx() {
57 optee_sign_legacyhs 42 optee_sign_legacyhs
58} 43}
59 44
60do_compile:append:am65xx-hs-evm() { 45# Signing procedure for K3 devices
61 optee_sign_k3hs 46do_compile:append:k3() {
62} 47 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${B}/core/tee-pager_v2.bin ${B}/bl32.bin
63 48 cp ${B}/core/tee.elf ${B}/bl32.elf
64do_compile:append:am64xx-evm() {
65 optee_sign_k3hs
66}
67
68do_compile:append:j721e-hs-evm() {
69 optee_sign_k3hs
70}
71
72do_compile:append:j7200-hs-evm() {
73 optee_sign_k3hs
74}
75
76do_compile:append:j721s2-hs-evm() {
77 optee_sign_k3hs
78} 49}
79 50
80do_install:append:ti-soc() { 51do_install:append:ti-soc() {