summaryrefslogtreecommitdiffstats
path: root/recipes-security/optee-imx/optee-os_3.17.0.imx.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/optee-imx/optee-os_3.17.0.imx.bb')
-rw-r--r--recipes-security/optee-imx/optee-os_3.17.0.imx.bb30
1 files changed, 19 insertions, 11 deletions
diff --git a/recipes-security/optee-imx/optee-os_3.17.0.imx.bb b/recipes-security/optee-imx/optee-os_3.17.0.imx.bb
index 93e0ff6e..b6452ef0 100644
--- a/recipes-security/optee-imx/optee-os_3.17.0.imx.bb
+++ b/recipes-security/optee-imx/optee-os_3.17.0.imx.bb
@@ -8,15 +8,16 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
8 8
9DEPENDS = "python3-cryptography-native python3-pyelftools-native u-boot-mkimage-native" 9DEPENDS = "python3-cryptography-native python3-pyelftools-native u-boot-mkimage-native"
10 10
11SRC_URI = "git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH}" 11SRC_URI = "git://github.com/nxp-imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH}"
12SRCBRANCH = "lf-5.15.32_2.0.0" 12SRCBRANCH = "lf-5.15.52_2.1.0"
13SRCREV = "984996422c25c99ebfc5194c1bb393028605bb0c" 13SRCREV = "9e86c8b6b102efa09ada451d0383ea3d11f8fad6"
14 14
15SRC_URI:append = " \ 15SRC_URI:append = " \
16 file://0008-no-warn-rwx-segments.patch \ 16 file://0008-no-warn-rwx-segments.patch \
17 " 17 "
18 18
19S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
20B = "${WORKDIR}/build"
20 21
21inherit deploy python3native autotools features_check 22inherit deploy python3native autotools features_check
22 23
@@ -60,20 +61,29 @@ EXTRA_OEMAKE = " \
60 -C ${S} O=${B} \ 61 -C ${S} O=${B} \
61" 62"
62 63
63LDFLAGS = "" 64LDFLAGS[unexport] = "1"
64CFLAGS += "--sysroot=${STAGING_DIR_HOST}" 65CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
65CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}" 66CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
66 67
68do_configure[noexec] = "1"
69
70do_compile:arm () {
71 oe_runmake all uTee
72}
73
74do_compile:aarch64 () {
75 oe_runmake all
76}
77do_compile[cleandirs] = "${B}"
78
67do_deploy () { 79do_deploy () {
68 install -d ${DEPLOYDIR} 80 install -d ${DEPLOYDIR}
69 cp ${B}/core/tee-raw.bin ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin 81 cp ${B}/core/tee-raw.bin ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin
70 ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin 82 ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin
83}
71 84
72 if [ "${OPTEE_ARCH}" != "arm64" ]; then 85do_deploy:append:arm () {
73 IMX_LOAD_ADDR=`${TARGET_PREFIX}readelf -h ${B}/core/tee.elf | grep "Entry point address" | awk '{print $4}'` 86 cp ${B}/core/uTee ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT}
74 uboot-mkimage -A arm -O linux -C none -a ${IMX_LOAD_ADDR} -e ${IMX_LOAD_ADDR} \
75 -d ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT}
76 fi
77} 87}
78 88
79do_install () { 89do_install () {
@@ -82,7 +92,6 @@ do_install () {
82 92
83 # Install the TA devkit 93 # Install the TA devkit
84 install -d ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/ 94 install -d ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/
85
86 for f in ${B}/export-ta_${OPTEE_ARCH}/*; do 95 for f in ${B}/export-ta_${OPTEE_ARCH}/*; do
87 cp -aR $f ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/ 96 cp -aR $f ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/
88 done 97 done
@@ -96,7 +105,6 @@ do_install () {
96 105
97addtask deploy after do_compile before do_install 106addtask deploy after do_compile before do_install
98 107
99
100FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" 108FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/"
101FILES:${PN}-staticdev = "${includedir}/optee/" 109FILES:${PN}-staticdev = "${includedir}/optee/"
102RDEPENDS:${PN}-dev += "${PN}-staticdev" 110RDEPENDS:${PN}-dev += "${PN}-staticdev"