diff options
author | Andrew Davis <afd@ti.com> | 2023-02-15 13:33:43 -0600 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2023-03-01 09:16:02 -0600 |
commit | c821b2bb2f802dc7ad4df9f4e322d8caa0b07cc5 (patch) | |
tree | 67d0b2e5eb3a279d18264575adb4fffa0677ee0a | |
parent | b7c909cec7df033e333cdc63b331320c7a21d70d (diff) | |
download | meta-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%.bbappend | 43 |
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 @@ | |||
1 | PV:ti-soc = "3.19.0+git${SRCPV}" | 1 | PV:ti-soc = "3.19.0+git${SRCPV}" |
2 | SRCREV:ti-soc = "afacf356f9593a7f83cae9f96026824ec242ff52" | 2 | SRCREV:ti-soc = "afacf356f9593a7f83cae9f96026824ec242ff52" |
3 | 3 | ||
4 | # Use TI SECDEV for signing | ||
5 | inherit ti-secdev | ||
6 | |||
4 | EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}" | 7 | EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}" |
5 | 8 | ||
6 | EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1" | 9 | EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1" |
7 | 10 | ||
8 | do_compile:prepend:ti-soc() { | ||
9 | export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} | ||
10 | } | ||
11 | |||
12 | do_compile:append:k3() { | 11 | do_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 | ||
39 | optee_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 | |||
52 | do_compile:append:ti43x() { | 37 | do_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 | ||
60 | do_compile:append:am65xx-hs-evm() { | 45 | # Signing procedure for K3 devices |
61 | optee_sign_k3hs | 46 | do_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 | |
64 | do_compile:append:am64xx-evm() { | ||
65 | optee_sign_k3hs | ||
66 | } | ||
67 | |||
68 | do_compile:append:j721e-hs-evm() { | ||
69 | optee_sign_k3hs | ||
70 | } | ||
71 | |||
72 | do_compile:append:j7200-hs-evm() { | ||
73 | optee_sign_k3hs | ||
74 | } | ||
75 | |||
76 | do_compile:append:j721s2-hs-evm() { | ||
77 | optee_sign_k3hs | ||
78 | } | 49 | } |
79 | 50 | ||
80 | do_install:append:ti-soc() { | 51 | do_install:append:ti-soc() { |