diff options
author | Andrey Zhizhikin <andrey.z@gmail.com> | 2020-08-31 08:30:50 +0000 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2020-09-23 23:42:37 -0300 |
commit | 0c961a51248fc02c6a0bb3691a707495805025a5 (patch) | |
tree | 9f58d8e75e51f912b050c344ecd8f348e615e191 /recipes-security/optee-imx/optee-os_3.2.0.imx.bb | |
parent | b3eff3e4cea333e35401e031293731ab32bc0929 (diff) | |
download | meta-freescale-0c961a51248fc02c6a0bb3691a707495805025a5.tar.gz |
optee-imx: upgrade to version 3.7.0
Update all recipes to pull sources from imx_5.4.24_2.1.0 branch in NXP
upstream and update SRCREV to match release tags.
Update PREFERRED_VERSION of optee for mx8 to point to 3.7.0.imx.
Following notes are additions to the version update of recipes:
--------------------------
optee-os:
- Refresh gcc10 patch to resolve the fuzz during apply
- Drop python patch as it is already applied upstream
- Add new machines to the list
optee-client:
- Update CFLAGS patch to match 3.7.0 version
- Split ${B} from ${S}, this makes build more clear
optee-test:
- Remove do_compile task and substitute with OEMAKE
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Diffstat (limited to 'recipes-security/optee-imx/optee-os_3.2.0.imx.bb')
-rw-r--r-- | recipes-security/optee-imx/optee-os_3.2.0.imx.bb | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/recipes-security/optee-imx/optee-os_3.2.0.imx.bb b/recipes-security/optee-imx/optee-os_3.2.0.imx.bb deleted file mode 100644 index d2c82940..00000000 --- a/recipes-security/optee-imx/optee-os_3.2.0.imx.bb +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | # Copyright (C) 2017-2018 NXP | ||
2 | |||
3 | SUMMARY = "OPTEE OS" | ||
4 | DESCRIPTION = "OPTEE OS" | ||
5 | HOMEPAGE = "http://www.optee.org/" | ||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" | ||
8 | |||
9 | inherit deploy python3native autotools | ||
10 | DEPENDS = "python3-pycrypto-native u-boot-mkimage-native" | ||
11 | |||
12 | SRCBRANCH = "lf-5.4.y" | ||
13 | OPTEE_OS_SRC ?= "git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=https" | ||
14 | SRC_URI = "\ | ||
15 | ${OPTEE_OS_SRC};branch=${SRCBRANCH} \ | ||
16 | file://0001-scripts-update-scripts-to-use-python3.patch \ | ||
17 | file://0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch \ | ||
18 | " | ||
19 | |||
20 | SRCREV = "6d99b525af752ecdaabdca6098b2564b2665f2b2" | ||
21 | |||
22 | S = "${WORKDIR}/git" | ||
23 | B = "${WORKDIR}/build.${PLATFORM_FLAVOR}" | ||
24 | |||
25 | # The platform flavor corresponds to the Yocto machine without the leading 'i'. | ||
26 | PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}" | ||
27 | PLATFORM_FLAVOR_imx6qpdlsolox = "mx6qsabresd" | ||
28 | PLATFORM_FLAVOR_imx6ul7d = "mx6ulevk" | ||
29 | PLATFORM_FLAVOR_imx6ull14x14evk = "mx6ullevk" | ||
30 | PLATFORM_FLAVOR_imx6ull9x9evk = "mx6ullevk" | ||
31 | PLATFORM_FLAVOR_imx6ulz14x14evk = "mx6ulzevk" | ||
32 | PLATFORM_FLAVOR_mx8mm = "mx8mmevk" | ||
33 | PLATFORM_FLAVOR_mx8mn = "mx8mnevk" | ||
34 | PLATFORM_FLAVOR_mx8qxp = "mx8qxpmek" | ||
35 | |||
36 | OPTEE_ARCH ?= "arm32" | ||
37 | OPTEE_ARCH_armv7a = "arm32" | ||
38 | OPTEE_ARCH_aarch64 = "arm64" | ||
39 | |||
40 | # Optee-os can be built for 32 bits and 64 bits at the same time | ||
41 | # as long as the compilers are correctly defined. | ||
42 | # For 64bits, CROSS_COMPILE64 must be set | ||
43 | # When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that | ||
44 | # any 32 or 64 bits builds will pass | ||
45 | EXTRA_OEMAKE = "PLATFORM=imx PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \ | ||
46 | CROSS_COMPILE=${HOST_PREFIX} \ | ||
47 | CROSS_COMPILE64=${HOST_PREFIX} \ | ||
48 | NOWERROR=1 \ | ||
49 | LDFLAGS= \ | ||
50 | O=${B} \ | ||
51 | " | ||
52 | |||
53 | |||
54 | do_compile () { | ||
55 | unset LDFLAGS | ||
56 | export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}" | ||
57 | oe_runmake -C ${S} all CFG_TEE_TA_LOG_LEVEL=0 | ||
58 | } | ||
59 | |||
60 | |||
61 | do_deploy () { | ||
62 | install -d ${DEPLOYDIR} | ||
63 | ${TARGET_PREFIX}objcopy -O binary ${B}/core/tee.elf ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin | ||
64 | |||
65 | if [ "${OPTEE_ARCH}" != "arm64" ]; then | ||
66 | IMX_LOAD_ADDR=`cat ${B}/core/tee-init_load_addr.txt` && \ | ||
67 | uboot-mkimage -A arm -O linux -C none -a ${IMX_LOAD_ADDR} -e ${IMX_LOAD_ADDR} \ | ||
68 | -d ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT} | ||
69 | fi | ||
70 | |||
71 | cd ${DEPLOYDIR} | ||
72 | ln -sf tee.${PLATFORM_FLAVOR}.bin tee.bin | ||
73 | cd - | ||
74 | } | ||
75 | |||
76 | do_install () { | ||
77 | install -d ${D}${nonarch_base_libdir}/firmware/ | ||
78 | install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ | ||
79 | |||
80 | # Install the TA devkit | ||
81 | install -d ${D}/usr/include/optee/export-user_ta_${OPTEE_ARCH}/ | ||
82 | |||
83 | for f in ${B}/export-ta_${OPTEE_ARCH}/*; do | ||
84 | cp -aR $f ${D}/usr/include/optee/export-user_ta_${OPTEE_ARCH}/ | ||
85 | done | ||
86 | } | ||
87 | |||
88 | addtask deploy after do_compile before do_install | ||
89 | |||
90 | |||
91 | FILES_${PN} = "${nonarch_base_libdir}/firmware/" | ||
92 | FILES_${PN}-staticdev = "/usr/include/optee/" | ||
93 | RDEPENDS_${PN}-dev += "${PN}-staticdev" | ||
94 | |||
95 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
96 | COMPATIBLE_MACHINE = "(imx)" | ||