diff mbox series

[scarthgap/master] optee-os: drop custom handling of embedded TAs

Message ID 20250316202847.2709587-2-francesco@valla.it
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series [scarthgap/master] optee-os: drop custom handling of embedded TAs | expand

Commit Message

Francesco Valla March 16, 2025, 8:28 p.m. UTC
The meta-arm layer, which is the provider of the base recipe for
optee-os, added [1] a separate optee-os-ta package for the embedded TAs
that are compiled as part of the OPTEE OS build process. However, the
TI overrides for optee-os include the embedded TAs inside the base
package, leaving the optee-os-ta package empty (and thus not
installable).

Align to the meta-arm behaviour and simply add a runtime dependency on
optee-os-ta for optee-os. While keeping backward compatibility, this
allows to install only the embedded TAs - reducing the required disk
space - on platforms on which the OPTEE OS is loaded from an external
boot image rather than being fetched from the root filesystem, like the
K3 SoCs.

[1] https://patchwork.yoctoproject.org/project/arm/patch/20230630112340.3314395-1-r.czerwinski@pengutronix.de/

Signed-off-by: Francesco Valla <francesco@valla.it>
---
 .../recipes-security/optee/optee-os-ti-overrides.inc       | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc b/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc
index 5756f3ff..ae6cca74 100644
--- a/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc
+++ b/meta-ti-bsp/recipes-security/optee/optee-os-ti-overrides.inc
@@ -47,10 +47,6 @@  do_install:append() {
     install -m 644 ${B}/*.optee ${D}${nonarch_base_libdir}/firmware/ || true
     install -m 644 ${B}/bl32.bin ${D}${nonarch_base_libdir}/firmware/ || true
     install -m 644 ${B}/bl32.elf ${D}${nonarch_base_libdir}/firmware/ || true
-
-    # Install embedded TAs
-    mkdir -p ${D}${nonarch_base_libdir}/optee_armtz/
-    install -D -p -m0444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/
 }
 
 optee_deploy_legacyhs() {
@@ -73,7 +69,8 @@  do_deploy:append:k3() {
     ln -sf optee/bl32.elf ${DEPLOYDIR}/
 }
 
-FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/"
+# Make the OS depend on embedded TAs
+RDEPENDS:${PN} += "${PN}-ta"
 
 # This is needed for bl32.elf
 INSANE_SKIP:${PN}:append:k3 = " textrel"