diff options
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.bb | 30 |
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 | ||
9 | DEPENDS = "python3-cryptography-native python3-pyelftools-native u-boot-mkimage-native" | 9 | DEPENDS = "python3-cryptography-native python3-pyelftools-native u-boot-mkimage-native" |
10 | 10 | ||
11 | SRC_URI = "git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH}" | 11 | SRC_URI = "git://github.com/nxp-imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH}" |
12 | SRCBRANCH = "lf-5.15.32_2.0.0" | 12 | SRCBRANCH = "lf-5.15.52_2.1.0" |
13 | SRCREV = "984996422c25c99ebfc5194c1bb393028605bb0c" | 13 | SRCREV = "9e86c8b6b102efa09ada451d0383ea3d11f8fad6" |
14 | 14 | ||
15 | SRC_URI:append = " \ | 15 | SRC_URI:append = " \ |
16 | file://0008-no-warn-rwx-segments.patch \ | 16 | file://0008-no-warn-rwx-segments.patch \ |
17 | " | 17 | " |
18 | 18 | ||
19 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
20 | B = "${WORKDIR}/build" | ||
20 | 21 | ||
21 | inherit deploy python3native autotools features_check | 22 | inherit 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 | ||
63 | LDFLAGS = "" | 64 | LDFLAGS[unexport] = "1" |
64 | CFLAGS += "--sysroot=${STAGING_DIR_HOST}" | 65 | CFLAGS += "--sysroot=${STAGING_DIR_HOST}" |
65 | CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}" | 66 | CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}" |
66 | 67 | ||
68 | do_configure[noexec] = "1" | ||
69 | |||
70 | do_compile:arm () { | ||
71 | oe_runmake all uTee | ||
72 | } | ||
73 | |||
74 | do_compile:aarch64 () { | ||
75 | oe_runmake all | ||
76 | } | ||
77 | do_compile[cleandirs] = "${B}" | ||
78 | |||
67 | do_deploy () { | 79 | do_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 | 85 | do_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 | ||
79 | do_install () { | 89 | do_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 | ||
97 | addtask deploy after do_compile before do_install | 106 | addtask deploy after do_compile before do_install |
98 | 107 | ||
99 | |||
100 | FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" | 108 | FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" |
101 | FILES:${PN}-staticdev = "${includedir}/optee/" | 109 | FILES:${PN}-staticdev = "${includedir}/optee/" |
102 | RDEPENDS:${PN}-dev += "${PN}-staticdev" | 110 | RDEPENDS:${PN}-dev += "${PN}-staticdev" |