summaryrefslogtreecommitdiffstats
path: root/recipes-security/optee-imx/optee-os_3.2.0.imx.bb
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.z@gmail.com>2020-08-31 08:30:50 +0000
committerOtavio Salvador <otavio@ossystems.com.br>2020-09-23 23:42:37 -0300
commit0c961a51248fc02c6a0bb3691a707495805025a5 (patch)
tree9f58d8e75e51f912b050c344ecd8f348e615e191 /recipes-security/optee-imx/optee-os_3.2.0.imx.bb
parentb3eff3e4cea333e35401e031293731ab32bc0929 (diff)
downloadmeta-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.bb96
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
3SUMMARY = "OPTEE OS"
4DESCRIPTION = "OPTEE OS"
5HOMEPAGE = "http://www.optee.org/"
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
8
9inherit deploy python3native autotools
10DEPENDS = "python3-pycrypto-native u-boot-mkimage-native"
11
12SRCBRANCH = "lf-5.4.y"
13OPTEE_OS_SRC ?= "git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=https"
14SRC_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
20SRCREV = "6d99b525af752ecdaabdca6098b2564b2665f2b2"
21
22S = "${WORKDIR}/git"
23B = "${WORKDIR}/build.${PLATFORM_FLAVOR}"
24
25# The platform flavor corresponds to the Yocto machine without the leading 'i'.
26PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}"
27PLATFORM_FLAVOR_imx6qpdlsolox = "mx6qsabresd"
28PLATFORM_FLAVOR_imx6ul7d = "mx6ulevk"
29PLATFORM_FLAVOR_imx6ull14x14evk = "mx6ullevk"
30PLATFORM_FLAVOR_imx6ull9x9evk = "mx6ullevk"
31PLATFORM_FLAVOR_imx6ulz14x14evk = "mx6ulzevk"
32PLATFORM_FLAVOR_mx8mm = "mx8mmevk"
33PLATFORM_FLAVOR_mx8mn = "mx8mnevk"
34PLATFORM_FLAVOR_mx8qxp = "mx8qxpmek"
35
36OPTEE_ARCH ?= "arm32"
37OPTEE_ARCH_armv7a = "arm32"
38OPTEE_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
45EXTRA_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
54do_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
61do_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
76do_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
88addtask deploy after do_compile before do_install
89
90
91FILES_${PN} = "${nonarch_base_libdir}/firmware/"
92FILES_${PN}-staticdev = "/usr/include/optee/"
93RDEPENDS_${PN}-dev += "${PN}-staticdev"
94
95PACKAGE_ARCH = "${MACHINE_ARCH}"
96COMPATIBLE_MACHINE = "(imx)"