summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2022-11-07 09:20:26 -0300
committerGitHub <noreply@github.com>2022-11-07 09:20:26 -0300
commit0b53460b5e8259df57ffbee4adc30aeb86877c4c (patch)
tree01aeb19b944acd52a6b6b1500062da0ace66e614
parent3747641f1e71d8e4edd5b587b49d09dc2d243942 (diff)
parentd2cf90c4fc09c13c514ff52648b3c49212aa4847 (diff)
downloadmeta-freescale-0b53460b5e8259df57ffbee4adc30aeb86877c4c.tar.gz
Merge pull request #1285 from Freescale/backport-1284-to-kirkstone
[Backport kirkstone] Optee: Update for lf-5.15.52_2.1.0
-rw-r--r--recipes-security/optee-imx/optee-client_3.17.0.imx.bb18
-rw-r--r--recipes-security/optee-imx/optee-os_3.17.0.imx.bb30
-rw-r--r--recipes-security/optee-imx/optee-test_3.17.0.imx.bb6
3 files changed, 29 insertions, 25 deletions
diff --git a/recipes-security/optee-imx/optee-client_3.17.0.imx.bb b/recipes-security/optee-imx/optee-client_3.17.0.imx.bb
index 53ee5bc4..6f0435fe 100644
--- a/recipes-security/optee-imx/optee-client_3.17.0.imx.bb
+++ b/recipes-security/optee-imx/optee-client_3.17.0.imx.bb
@@ -5,13 +5,11 @@ HOMEPAGE = "http://www.optee.org/"
5LICENSE = "BSD-2-Clause" 5LICENSE = "BSD-2-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" 6LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
7 7
8SRCBRANCH = "lf-5.15.5_1.0.0"
9SRC_URI = " \ 8SRC_URI = " \
10 git://source.codeaurora.org/external/imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH} \ 9 git://github.com/nxp-imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH} \
11 file://tee-supplicant.service \ 10 file://tee-supplicant.service"
12" 11SRCBRANCH = "lf-5.15.52_2.1.0"
13 12SRCREV = "9d8f1903bbea3a1e631c8d26ee51c37020569312"
14SRCREV = "182874320395787a389e5b0f7df02b32f3c0a1b0"
15 13
16S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"
17B = "${WORKDIR}/build" 15B = "${WORKDIR}/build"
@@ -22,11 +20,9 @@ REQUIRED_MACHINE_FEATURES = "optee"
22 20
23SYSTEMD_SERVICE:${PN} = "tee-supplicant.service" 21SYSTEMD_SERVICE:${PN} = "tee-supplicant.service"
24 22
25OPTEE_ARCH ?= "arm32" 23EXTRA_OEMAKE = " \
26OPTEE_ARCH:armv7a = "arm32" 24 -C ${S} O=${B} \
27OPTEE_ARCH:aarch64 = "arm64" 25"
28
29EXTRA_OEMAKE = "ARCH=${OPTEE_ARCH} O=${B}"
30 26
31do_install () { 27do_install () {
32 oe_runmake -C ${S} install 28 oe_runmake -C ${S} install
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"
diff --git a/recipes-security/optee-imx/optee-test_3.17.0.imx.bb b/recipes-security/optee-imx/optee-test_3.17.0.imx.bb
index 54f92d72..da56eed7 100644
--- a/recipes-security/optee-imx/optee-test_3.17.0.imx.bb
+++ b/recipes-security/optee-imx/optee-test_3.17.0.imx.bb
@@ -8,9 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
8 8
9DEPENDS = "python3-cryptography-native optee-os optee-client openssl" 9DEPENDS = "python3-cryptography-native optee-os optee-client openssl"
10 10
11SRC_URI = "git://source.codeaurora.org/external/imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}" 11SRC_URI = "git://github.com/nxp-imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}"
12SRCBRANCH = "lf-5.15.32_2.0.0" 12SRCBRANCH = "lf-5.15.52_2.1.0"
13SRCREV = "e064126a9769f168d1d0e178b74955e6648683b4" 13SRCREV = "41222c4b8df1adc0f0bdc737e5cb824becd25f63"
14 14
15S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
16B = "${WORKDIR}/build" 16B = "${WORKDIR}/build"