summaryrefslogtreecommitdiffstats
path: root/recipes-security/optee-imx/optee-os_3.7.0.imx.bb
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2021-03-16 07:43:20 -0500
committerOtavio Salvador <otavio@ossystems.com.br>2021-03-16 17:59:36 -0300
commitbe6a39f2faf605330a0ae9a33430e1112ac4d3f5 (patch)
tree09d4708a0429b8fdecfca792f4af6add4c8467fb /recipes-security/optee-imx/optee-os_3.7.0.imx.bb
parent1d2f65637442c1f52967001e539c5d44c1ba74cd (diff)
downloadmeta-freescale-be6a39f2faf605330a0ae9a33430e1112ac4d3f5.tar.gz
optee-imx: Upgrade to 3.10.0
Update all recipes to pull sources from imx_5.4.70_2.3.0 branch in NXP upstream and update SRCREV to match release tags. Update PREFERRED_VERSION of optee for mx8 to point to 3.10.0.imx. Following notes are additions to the version update of recipes: -------------------------- optee-client: - Drop CFLAGS patch as it is already applied upstream optee-os: - Drop gcc10 patch as it is already applied upstream - Add dependency on python3-pycryptodomex-native - Drop NOWERROR flag as package is reworked to disable warnings by default - Rework mkimage load address since tee-init_load_addr.txt is no longer created optee-test: - Drop python3 patch as it is already applied upstream - Remove unused patch files from layer - Add dependency on python3-pycryptodomex-native - Add sysroot to C and C++ flags Fixes #686, fixes #689. Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Diffstat (limited to 'recipes-security/optee-imx/optee-os_3.7.0.imx.bb')
-rw-r--r--recipes-security/optee-imx/optee-os_3.7.0.imx.bb101
1 files changed, 0 insertions, 101 deletions
diff --git a/recipes-security/optee-imx/optee-os_3.7.0.imx.bb b/recipes-security/optee-imx/optee-os_3.7.0.imx.bb
deleted file mode 100644
index c9cdd39d..00000000
--- a/recipes-security/optee-imx/optee-os_3.7.0.imx.bb
+++ /dev/null
@@ -1,101 +0,0 @@
1# Copyright (C) 2017-2020 NXP
2
3SUMMARY = "OPTEE OS"
4DESCRIPTION = "OPTEE OS"
5HOMEPAGE = "http://www.optee.org/"
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
8
9inherit deploy python3native autotools
10DEPENDS = "python3-pycrypto-native python3-pyelftools-native u-boot-mkimage-native"
11
12SRCBRANCH = "imx_5.4.24_2.1.0"
13
14SRC_URI = "\
15 git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH} \
16 file://0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch \
17"
18
19SRCREV = "7a49776de59265500f10a247125429fde1555ac1"
20
21S = "${WORKDIR}/git"
22B = "${WORKDIR}/build.${PLATFORM_FLAVOR}"
23
24# The platform flavor corresponds to the Yocto machine without the leading 'i'.
25PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}"
26PLATFORM_FLAVOR_imx6qpdlsolox = "mx6qsabresd"
27PLATFORM_FLAVOR_imx6ul7d = "mx6ulevk"
28PLATFORM_FLAVOR_imx6ull14x14evk = "mx6ullevk"
29PLATFORM_FLAVOR_imx6ull9x9evk = "mx6ullevk"
30PLATFORM_FLAVOR_imx6ulz-14x14-evk = "mx6ulzevk"
31PLATFORM_FLAVOR_mx8mq = "mx8mqevk"
32PLATFORM_FLAVOR_mx8mm = "mx8mmevk"
33PLATFORM_FLAVOR_mx8mn = "mx8mnevk"
34PLATFORM_FLAVOR_mx8mp = "mx8mpevk"
35PLATFORM_FLAVOR_mx8qm = "mx8qmmek"
36PLATFORM_FLAVOR_mx8qxp = "mx8qxpmek"
37PLATFORM_FLAVOR_mx8dx = "mx8dxmek"
38PLATFORM_FLAVOR_mx8dxl = "mx8dxlevk"
39
40OPTEE_ARCH ?= "arm32"
41OPTEE_ARCH_armv7a = "arm32"
42OPTEE_ARCH_aarch64 = "arm64"
43
44# Optee-os can be built for 32 bits and 64 bits at the same time
45# as long as the compilers are correctly defined.
46# For 64bits, CROSS_COMPILE64 must be set
47# When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that
48# any 32 or 64 bits builds will pass
49EXTRA_OEMAKE = " \
50 PLATFORM=imx \
51 PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \
52 CROSS_COMPILE=${HOST_PREFIX} \
53 CROSS_COMPILE64=${HOST_PREFIX} \
54 NOWERROR=1 \
55 LDFLAGS= \
56 O=${B} \
57"
58
59do_compile () {
60 unset LDFLAGS
61 export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}"
62 oe_runmake -C ${S} all CFG_TEE_TA_LOG_LEVEL=0 CFG_TEE_CORE_LOG_LEVEL=0
63}
64
65
66do_deploy () {
67 install -d ${DEPLOYDIR}
68 ${TARGET_PREFIX}objcopy -O binary ${B}/core/tee.elf ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin
69
70 if [ "${OPTEE_ARCH}" != "arm64" ]; then
71 IMX_LOAD_ADDR=`cat ${B}/core/tee-init_load_addr.txt` && \
72 uboot-mkimage -A arm -O linux -C none -a ${IMX_LOAD_ADDR} -e ${IMX_LOAD_ADDR} \
73 -d ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT}
74 fi
75
76 cd ${DEPLOYDIR}
77 ln -sf tee.${PLATFORM_FLAVOR}.bin tee.bin
78 cd -
79}
80
81do_install () {
82 install -d ${D}${nonarch_base_libdir}/firmware/
83 install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
84
85 # Install the TA devkit
86 install -d ${D}/usr/include/optee/export-user_ta_${OPTEE_ARCH}/
87
88 for f in ${B}/export-ta_${OPTEE_ARCH}/*; do
89 cp -aR $f ${D}/usr/include/optee/export-user_ta_${OPTEE_ARCH}/
90 done
91}
92
93addtask deploy after do_compile before do_install
94
95
96FILES_${PN} = "${nonarch_base_libdir}/firmware/"
97FILES_${PN}-staticdev = "/usr/include/optee/"
98RDEPENDS_${PN}-dev += "${PN}-staticdev"
99
100PACKAGE_ARCH = "${MACHINE_ARCH}"
101COMPATIBLE_MACHINE = "(imx)"