]> code.ossystems Code Review - meta-freescale.git/commitdiff
optee-os: Use tee-raw.bin binary
authorTom Hochstein <tom.hochstein@nxp.com>
Wed, 16 Feb 2022 18:38:52 +0000 (12:38 -0600)
committerTom Hochstein <tom.hochstein@nxp.com>
Thu, 24 Feb 2022 19:32:53 +0000 (13:32 -0600)
During the optee-os compilation, the gen_tee_bin.py script generates
a tee-raw.bin that is more space efficient and could replace
the tee.bin binary manually generated in the optee-os recipe
by objcpy.

This patch greatly reduces the size of tee.bin. On 64 bits platforms, we
observe a size descrease of ~68%, and on 32 bits platforms, a size
decrease of ~45%.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
recipes-security/optee-imx/optee-os_3.15.0.imx.bb

index defcf63dd30d5effcd427ff86644ab4b370914c3..bdc00bc386817b4d0d3b25b34d16c03672cb53ac 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2020 NXP
+# Copyright (C) 2017-2021 NXP
 
 SUMMARY = "OPTEE OS"
 DESCRIPTION = "OPTEE OS"
@@ -62,7 +62,7 @@ CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
 
 do_deploy () {
     install -d ${DEPLOYDIR}
-    ${TARGET_PREFIX}objcopy -O binary ${B}/core/tee.elf ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin
+    cp ${B}/core/tee-raw.bin ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin
     ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin
 
     if [ "${OPTEE_ARCH}" != "arm64" ]; then