summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-security
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:24:28 -0600
commitc9848791fbbba9a1f31e6ed5c0ca512b9fbaa1ba (patch)
tree020d7ef8049cc6dd79364d9ea64204ea268e8c69 /meta-ti-bsp/recipes-security
parent95e768255193ceadbc2ebcf7beebf299a374b360 (diff)
downloadmeta-ti-c9848791fbbba9a1f31e6ed5c0ca512b9fbaa1ba.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>
Diffstat (limited to 'meta-ti-bsp/recipes-security')
-rw-r--r--meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend43
1 files changed, 7 insertions, 36 deletions
diff --git a/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend b/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend
index 6f711101..c1adf6de 100644
--- a/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend
+++ b/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend
@@ -1,11 +1,10 @@
1# Use TI SECDEV for signing
2inherit ti-secdev
3
1EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}" 4EXTRA_OEMAKE:append:k3 = "${@ ' CFG_CONSOLE_UART='+ d.getVar('OPTEE_K3_USART') if d.getVar('OPTEE_K3_USART') else ''}"
2 5
3EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1" 6EXTRA_OEMAKE:append:am62xx = " CFG_WITH_SOFTWARE_PRNG=y CFG_TEE_CORE_LOG_LEVEL=1"
4 7
5do_compile:prepend:ti-soc() {
6 export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG}
7}
8
9do_compile:append:k3() { 8do_compile:append:k3() {
10 ( cd ${B}/core/; \ 9 ( cd ${B}/core/; \
11 cp tee-pager_v2.bin ${B}/bl32.bin; \ 10 cp tee-pager_v2.bin ${B}/bl32.bin; \
@@ -32,20 +31,6 @@ optee_sign_legacyhs() {
32 fi 31 fi
33} 32}
34 33
35# Signing procedure for K3 HS devices
36optee_sign_k3hs() {
37 ( cd ${B}/core/; \
38 if [ -f ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ]; then \
39 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh tee-pager_v2.bin tee-pager.bin.signed; \
40 else \
41 echo "Warning: TI_SECURE_DEV_PKG not set, OP-TEE not signed."; \
42 cp tee-pager_v2.bin tee-pager.bin.signed; \
43 fi; \
44 mv tee-pager.bin.signed ${B}/bl32.bin; \
45 cp tee.elf ${B}/bl32.elf; \
46 )
47}
48
49do_compile:append:ti43x() { 34do_compile:append:ti43x() {
50 optee_sign_legacyhs 35 optee_sign_legacyhs
51} 36}
@@ -54,24 +39,10 @@ do_compile:append:dra7xx() {
54 optee_sign_legacyhs 39 optee_sign_legacyhs
55} 40}
56 41
57do_compile:append:am65xx-hs-evm() { 42# Signing procedure for K3 devices
58 optee_sign_k3hs 43do_compile:append:k3() {
59} 44 ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh ${B}/core/tee-pager_v2.bin ${B}/bl32.bin
60 45 cp ${B}/core/tee.elf ${B}/bl32.elf
61do_compile:append:am64xx-evm() {
62 optee_sign_k3hs
63}
64
65do_compile:append:j721e-hs-evm() {
66 optee_sign_k3hs
67}
68
69do_compile:append:j7200-hs-evm() {
70 optee_sign_k3hs
71}
72
73do_compile:append:j721s2-hs-evm() {
74 optee_sign_k3hs
75} 46}
76 47
77do_install:append:ti-soc() { 48do_install:append:ti-soc() {