summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZelan Zou <zelan.zou@nxp.com>2025-09-01 14:20:24 +0800
committerZelan Zou <zelan.zou@nxp.com>2025-09-03 11:32:08 +0800
commita12bf597b54404c440e6fab2316173ff275c3242 (patch)
tree1aebe621da498a77c63e022a094ac3d6993e84f6
parent14ba349001e475230a54470e69d532a7b02f53fc (diff)
downloadmeta-freescale-a12bf597b54404c440e6fab2316173ff275c3242.tar.gz
optee-os-qoriq: Upgrade 3.13.0 -> 4.6.0
Update from LF6.12.20-2.0.0 Signed-off-by: Zelan Zou <zelan.zou@nxp.com>
-rw-r--r--recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.6.0.bb24
-rw-r--r--recipes-security/optee-qoriq/optee-os-qoriq_3.13.0.bb28
-rw-r--r--recipes-security/optee-qoriq/optee-os-qoriq_4.6.0.bb21
-rw-r--r--recipes-security/optee-qoriq/optee-os.nxp.inc86
4 files changed, 66 insertions, 93 deletions
diff --git a/recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.6.0.bb b/recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.6.0.bb
new file mode 100644
index 000000000..e7847b81e
--- /dev/null
+++ b/recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.6.0.bb
@@ -0,0 +1,24 @@
1require optee-os.nxp.inc
2
3SUMMARY = "OP-TEE Trusted OS TA devkit"
4DESCRIPTION = "OP-TEE TA devkit for build TAs"
5HOMEPAGE = "https://www.op-tee.org/"
6
7DEPENDS += "python3-pycryptodome-native"
8
9OPTEE_OS_BRANCH = "lf-6.12.20_2.0.0"
10SRCREV = "87964807d80baf1dcfd89cafc66de34a1cf16bf3"
11
12do_install() {
13 #install TA devkit
14 install -d ${D}${includedir}/optee/export-user_ta/
15 for f in ${B}/export-ta_${OPTEE_ARCH}/* ; do
16 cp -aR $f ${D}${includedir}/optee/export-user_ta/
17 done
18}
19
20do_deploy() {
21 echo "Do not inherit do_deploy from optee-os."
22}
23
24FILES:${PN} = "${includedir}/optee/"
diff --git a/recipes-security/optee-qoriq/optee-os-qoriq_3.13.0.bb b/recipes-security/optee-qoriq/optee-os-qoriq_3.13.0.bb
deleted file mode 100644
index 3c3652d3d..000000000
--- a/recipes-security/optee-qoriq/optee-os-qoriq_3.13.0.bb
+++ /dev/null
@@ -1,28 +0,0 @@
1require optee-os.nxp.inc
2
3PV:append = "+git${SRCPV}"
4
5PLATFORM_FLAVOR:ls1088ardb-pb = "ls1088ardb"
6PLATFORM_FLAVOR:ls1046afrwy = "ls1046ardb"
7PLATFORM_FLAVOR:lx2162aqds = "lx2160aqds"
8
9EXTRA_OEMAKE += " \
10 PLATFORM=ls \
11 CFG_ARM64_core=y \
12"
13
14do_compile:append:ls1012afrwy() {
15 mv ${B}/core/tee-raw.bin ${B}/core/tee_512mb.bin
16 oe_runmake CFG_DRAM0_SIZE=0x40000000 all
17}
18
19do_install:append:qoriq() {
20 install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin
21}
22
23do_install:append:ls1012afrwy() {
24 install -m 644 ${B}/core/tee_512mb.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}_512mb.bin
25}
26
27INHIBIT_PACKAGE_STRIP = "1"
28COMPATIBLE_MACHINE = "(qoriq-arm64)"
diff --git a/recipes-security/optee-qoriq/optee-os-qoriq_4.6.0.bb b/recipes-security/optee-qoriq/optee-os-qoriq_4.6.0.bb
new file mode 100644
index 000000000..cd568b3dc
--- /dev/null
+++ b/recipes-security/optee-qoriq/optee-os-qoriq_4.6.0.bb
@@ -0,0 +1,21 @@
1require optee-os.nxp.inc
2
3OPTEE_OS_BRANCH = "lf-6.12.20_2.0.0"
4SRCREV = "87964807d80baf1dcfd89cafc66de34a1cf16bf3"
5
6do_install:append () {
7 install -d ${D}${nonarch_base_libdir}/firmware/
8 install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
9 install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin
10
11 # Install embedded TAs
12 install -d ${D}${base_libdir}/optee_armtz/
13 install -m 444 ${B}/ta/*/*.ta ${D}${base_libdir}/optee_armtz/
14}
15
16do_deploy:append () {
17 install -d ${DEPLOYDIR}/optee
18 install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/
19}
20
21FILES:${PN} = "${nonarch_base_libdir}/optee_armtz/ ${nonarch_base_libdir}/firmware/"
diff --git a/recipes-security/optee-qoriq/optee-os.nxp.inc b/recipes-security/optee-qoriq/optee-os.nxp.inc
index 989da06d7..88ba3fbe2 100644
--- a/recipes-security/optee-qoriq/optee-os.nxp.inc
+++ b/recipes-security/optee-qoriq/optee-os.nxp.inc
@@ -1,74 +1,30 @@
1# Copyright 2020-2021 NXP 1# Copyright 2020-2021,2025 NXP
2require recipes-security/optee-imx/optee-os-fslc.inc
2 3
3SUMMARY = "OPTEE OS" 4DEPENDS:append = " dtc-native"
4DESCRIPTION = "OPTEE OS"
5HOMEPAGE = "http://www.optee.org/"
6LICENSE = "BSD"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
8 5
9inherit deploy python3native autotools 6# The patch same as imx-optee, so point FILESEXTRAPATHS to optee-imx/optee-client,
10DEPENDS = "python3-pycryptodome-native python3-pyelftools-native python3-pycryptodomex-native dtc-native" 7# avoid duplicate copy files to optee-qoriq
8FILESEXTRAPATHS:prepend := "${THISDIR}/../optee-imx/optee-os:"
11 9
12SRC_URI = "git://github.com/nxp-qoriq/optee_os.git;protocol=https;nobranch=1" 10SRC_URI:remove = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https"
13SRCREV = "735d98806dc26fbeeecad7f5e60ffeab8170c67e" 11SRC_URI:prepend = "${OPTEE_OS_SRC};branch=${OPTEE_OS_BRANCH} "
12SRC_URI:append = " file://0007-allow-setting-sysroot-for-clang.patch"
14 13
15B = "${WORKDIR}/build.${PLATFORM_FLAVOR}" 14OPTEE_OS_SRC ?= "git://github.com/nxp-qoriq/optee_os.git;protocol=https"
16 15
17PLATFORM_FLAVOR ?= "${MACHINE}" 16REQUIRED_MACHINE_FEATURES = "optee"
18 17
19OPTEE_ARCH ?= "arm64" 18inherit features_check
20OPTEE_ARCH:armv7a = "arm32"
21OPTEE_ARCH:aarch64 = "arm64"
22 19
23OPTEE_CORE_LOG_LEVEL ?= "1" 20OPTEEMACHINE = "ls-${MACHINE}"
24OPTEE_TA_LOG_LEVEL ?= "0" 21OPTEEMACHINE:ls1088ardb-pb = "ls-ls1088ardb"
22OPTEEMACHINE:ls1046afrwy = "ls-ls1046ardb"
23OPTEEMACHINE:lx2162aqds = "ls-lx2160aqds"
24OPTEEMACHINE:lx2160ardb-rev2 = "ls-lx2160ardb"
25 25
26# Optee-os can be built for 32 bits and 64 bits at the same time 26EXTRA_OEMAKE:append = " \
27# as long as the compilers are correctly defined. 27 CFG_TEE_TA_LOG_LEVEL=0 \
28# For 64bits, CROSS_COMPILE64 must be set 28 CFG_TEE_CORE_LOG_LEVEL=1 \
29# When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that
30# any 32 or 64 bits builds will pass
31EXTRA_OEMAKE = " \
32 -C ${S} O=${B} \
33 PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \
34 CROSS_COMPILE=${HOST_PREFIX} \
35 CROSS_COMPILE64=${HOST_PREFIX} \
36 CFG_WERROR=y \
37 CFG_TEE_CORE_LOG_LEVEL=${OPTEE_CORE_LOG_LEVEL} \
38 CFG_TEE_TA_LOG_LEVEL=${OPTEE_TA_LOG_LEVEL} \
39" 29"
40 30COMPATIBLE_MACHINE = "(qoriq-arm64)"
41do_compile() {
42 unset LDFLAGS
43 export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}"
44 oe_runmake all
45}
46
47do_install() {
48 install -d ${D}${nonarch_base_libdir}/firmware/
49 install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
50
51 # Install the TA devkit
52 install -d ${D}${includedir}/optee/export-user_ta/
53
54 for f in ${B}/export-ta_${OPTEE_ARCH}/*; do
55 cp -aR $f ${D}${includedir}/optee/export-user_ta/
56 done
57
58 install -d ${D}${nonarch_base_libdir}/optee_armtz
59 find ${B}/export-ta_${OPTEE_ARCH}/ta -name '*.ta' | while read name; do
60 install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/
61 done
62}
63
64do_deploy() {
65 install -d ${DEPLOYDIR}/optee
66 install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/
67}
68addtask deploy before do_build after do_install
69
70FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/"
71FILES:${PN}-staticdev = "/usr/include/optee/"
72RDEPENDS:${PN}-dev += "${PN}-staticdev"
73
74PACKAGE_ARCH = "${MACHINE_ARCH}"