diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2021-03-18 16:00:29 -0500 |
---|---|---|
committer | Tom Hochstein <tom.hochstein@nxp.com> | 2021-03-18 16:57:57 -0500 |
commit | 40fcbbb91e141af78cc383109c8f7008c7b5357a (patch) | |
tree | 0a50f4b8259c9fa2de8b33a6d40ebbc2a17e928b /recipes-security/optee-imx | |
parent | 1efb7b45104a8ddf9f121f73da3faae52f90e0f6 (diff) | |
download | meta-freescale-40fcbbb91e141af78cc383109c8f7008c7b5357a.tar.gz |
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>
Diffstat (limited to 'recipes-security/optee-imx')
-rw-r--r-- | recipes-security/optee-imx/optee-os_3.10.0.imx.bb | 20 |
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 = "\ | |||
17 | SRCREV = "a991c90475bb1c715651e5fe27f7f32cbe61aef9" | 17 | SRCREV = "a991c90475bb1c715651e5fe27f7f32cbe61aef9" |
18 | 18 | ||
19 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
20 | B = "${WORKDIR}/build.${PLATFORM_FLAVOR}" | ||
21 | 20 | ||
22 | inherit deploy python3native autotools | 21 | inherit deploy python3native autotools |
23 | 22 | ||
@@ -51,30 +50,25 @@ EXTRA_OEMAKE = " \ | |||
51 | PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \ | 50 | PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \ |
52 | CROSS_COMPILE=${HOST_PREFIX} \ | 51 | CROSS_COMPILE=${HOST_PREFIX} \ |
53 | CROSS_COMPILE64=${HOST_PREFIX} \ | 52 | CROSS_COMPILE64=${HOST_PREFIX} \ |
54 | LDFLAGS= \ | 53 | CFG_TEE_TA_LOG_LEVEL=0 \ |
55 | O=${B} \ | 54 | CFG_TEE_CORE_LOG_LEVEL=0 \ |
55 | -C ${S} O=${B}\ | ||
56 | " | 56 | " |
57 | 57 | ||
58 | do_compile () { | 58 | LDFLAGS = "" |
59 | unset LDFLAGS | 59 | CFLAGS += "--sysroot=${STAGING_DIR_HOST}" |
60 | export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}" | 60 | CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}" |
61 | oe_runmake -C ${S} all CFG_TEE_TA_LOG_LEVEL=0 CFG_TEE_CORE_LOG_LEVEL=0 | ||
62 | } | ||
63 | |||
64 | 61 | ||
65 | do_deploy () { | 62 | do_deploy () { |
66 | install -d ${DEPLOYDIR} | 63 | install -d ${DEPLOYDIR} |
67 | ${TARGET_PREFIX}objcopy -O binary ${B}/core/tee.elf ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin | 64 | ${TARGET_PREFIX}objcopy -O binary ${B}/core/tee.elf ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin |
65 | ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin | ||
68 | 66 | ||
69 | if [ "${OPTEE_ARCH}" != "arm64" ]; then | 67 | if [ "${OPTEE_ARCH}" != "arm64" ]; then |
70 | IMX_LOAD_ADDR=`${TARGET_PREFIX}readelf -h ${B}/core/tee.elf | grep "Entry point address" | awk '{print $4}'` | 68 | IMX_LOAD_ADDR=`${TARGET_PREFIX}readelf -h ${B}/core/tee.elf | grep "Entry point address" | awk '{print $4}'` |
71 | uboot-mkimage -A arm -O linux -C none -a ${IMX_LOAD_ADDR} -e ${IMX_LOAD_ADDR} \ | 69 | uboot-mkimage -A arm -O linux -C none -a ${IMX_LOAD_ADDR} -e ${IMX_LOAD_ADDR} \ |
72 | -d ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT} | 70 | -d ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT} |
73 | fi | 71 | fi |
74 | |||
75 | cd ${DEPLOYDIR} | ||
76 | ln -sf tee.${PLATFORM_FLAVOR}.bin tee.bin | ||
77 | cd - | ||
78 | } | 72 | } |
79 | 73 | ||
80 | do_install () { | 74 | do_install () { |