aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2021-03-18 16:00:29 -0500
committerTom Hochstein <tom.hochstein@nxp.com>2021-03-18 16:57:57 -0500
commit40fcbbb91e141af78cc383109c8f7008c7b5357a (patch)
tree0a50f4b8259c9fa2de8b33a6d40ebbc2a17e928b
parent1efb7b45104a8ddf9f121f73da3faae52f90e0f6 (diff)
downloadmeta-freescale-40fcbbb91e141af78cc383109c8f7008c7b5357a.tar.gz
meta-freescale-40fcbbb91e141af78cc383109c8f7008c7b5357a.tar.bz2
meta-freescale-40fcbbb91e141af78cc383109c8f7008c7b5357a.zip
optee-os: Cleanup build options
- Move log level variables to EXTRA_OEMAKE to simplify overriding - Set LDFLAGS and CFLAGS globally, like normal - Set -C in EXTRA_OEMAKE - Drop do_compile after all of the above - Drop un-necessary override of B variable - Simplify creation of tee.bin link in DEPLOYDIR Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
-rw-r--r--recipes-security/optee-imx/optee-os_3.10.0.imx.bb20
1 files changed, 7 insertions, 13 deletions
diff --git a/recipes-security/optee-imx/optee-os_3.10.0.imx.bb b/recipes-security/optee-imx/optee-os_3.10.0.imx.bb
index 5b8c5add..ec4cf62e 100644
--- a/recipes-security/optee-imx/optee-os_3.10.0.imx.bb
+++ b/recipes-security/optee-imx/optee-os_3.10.0.imx.bb
@@ -17,7 +17,6 @@ SRC_URI = "\
SRCREV = "a991c90475bb1c715651e5fe27f7f32cbe61aef9"
S = "${WORKDIR}/git"
-B = "${WORKDIR}/build.${PLATFORM_FLAVOR}"
inherit deploy python3native autotools
@@ -51,30 +50,25 @@ EXTRA_OEMAKE = " \
PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \
CROSS_COMPILE=${HOST_PREFIX} \
CROSS_COMPILE64=${HOST_PREFIX} \
- LDFLAGS= \
- O=${B} \
+ CFG_TEE_TA_LOG_LEVEL=0 \
+ CFG_TEE_CORE_LOG_LEVEL=0 \
+ -C ${S} O=${B}\
"
-do_compile () {
- unset LDFLAGS
- export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}"
- oe_runmake -C ${S} all CFG_TEE_TA_LOG_LEVEL=0 CFG_TEE_CORE_LOG_LEVEL=0
-}
-
+LDFLAGS = ""
+CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
+CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
do_deploy () {
install -d ${DEPLOYDIR}
${TARGET_PREFIX}objcopy -O binary ${B}/core/tee.elf ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin
+ ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin
if [ "${OPTEE_ARCH}" != "arm64" ]; then
IMX_LOAD_ADDR=`${TARGET_PREFIX}readelf -h ${B}/core/tee.elf | grep "Entry point address" | awk '{print $4}'`
uboot-mkimage -A arm -O linux -C none -a ${IMX_LOAD_ADDR} -e ${IMX_LOAD_ADDR} \
-d ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT}
fi
-
- cd ${DEPLOYDIR}
- ln -sf tee.${PLATFORM_FLAVOR}.bin tee.bin
- cd -
}
do_install () {