diff options
| author | Zelan Zou <zelan.zou@nxp.com> | 2025-09-01 14:20:24 +0800 |
|---|---|---|
| committer | Zelan Zou <zelan.zou@nxp.com> | 2025-09-03 11:32:08 +0800 |
| commit | a12bf597b54404c440e6fab2316173ff275c3242 (patch) | |
| tree | 1aebe621da498a77c63e022a094ac3d6993e84f6 | |
| parent | 14ba349001e475230a54470e69d532a7b02f53fc (diff) | |
| download | meta-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>
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 @@ | |||
| 1 | require optee-os.nxp.inc | ||
| 2 | |||
| 3 | SUMMARY = "OP-TEE Trusted OS TA devkit" | ||
| 4 | DESCRIPTION = "OP-TEE TA devkit for build TAs" | ||
| 5 | HOMEPAGE = "https://www.op-tee.org/" | ||
| 6 | |||
| 7 | DEPENDS += "python3-pycryptodome-native" | ||
| 8 | |||
| 9 | OPTEE_OS_BRANCH = "lf-6.12.20_2.0.0" | ||
| 10 | SRCREV = "87964807d80baf1dcfd89cafc66de34a1cf16bf3" | ||
| 11 | |||
| 12 | do_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 | |||
| 20 | do_deploy() { | ||
| 21 | echo "Do not inherit do_deploy from optee-os." | ||
| 22 | } | ||
| 23 | |||
| 24 | FILES:${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 @@ | |||
| 1 | require optee-os.nxp.inc | ||
| 2 | |||
| 3 | PV:append = "+git${SRCPV}" | ||
| 4 | |||
| 5 | PLATFORM_FLAVOR:ls1088ardb-pb = "ls1088ardb" | ||
| 6 | PLATFORM_FLAVOR:ls1046afrwy = "ls1046ardb" | ||
| 7 | PLATFORM_FLAVOR:lx2162aqds = "lx2160aqds" | ||
| 8 | |||
| 9 | EXTRA_OEMAKE += " \ | ||
| 10 | PLATFORM=ls \ | ||
| 11 | CFG_ARM64_core=y \ | ||
| 12 | " | ||
| 13 | |||
| 14 | do_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 | |||
| 19 | do_install:append:qoriq() { | ||
| 20 | install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin | ||
| 21 | } | ||
| 22 | |||
| 23 | do_install:append:ls1012afrwy() { | ||
| 24 | install -m 644 ${B}/core/tee_512mb.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}_512mb.bin | ||
| 25 | } | ||
| 26 | |||
| 27 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 28 | COMPATIBLE_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 @@ | |||
| 1 | require optee-os.nxp.inc | ||
| 2 | |||
| 3 | OPTEE_OS_BRANCH = "lf-6.12.20_2.0.0" | ||
| 4 | SRCREV = "87964807d80baf1dcfd89cafc66de34a1cf16bf3" | ||
| 5 | |||
| 6 | do_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 | |||
| 16 | do_deploy:append () { | ||
| 17 | install -d ${DEPLOYDIR}/optee | ||
| 18 | install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/ | ||
| 19 | } | ||
| 20 | |||
| 21 | FILES:${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 |
| 2 | require recipes-security/optee-imx/optee-os-fslc.inc | ||
| 2 | 3 | ||
| 3 | SUMMARY = "OPTEE OS" | 4 | DEPENDS:append = " dtc-native" |
| 4 | DESCRIPTION = "OPTEE OS" | ||
| 5 | HOMEPAGE = "http://www.optee.org/" | ||
| 6 | LICENSE = "BSD" | ||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" | ||
| 8 | 5 | ||
| 9 | inherit deploy python3native autotools | 6 | # The patch same as imx-optee, so point FILESEXTRAPATHS to optee-imx/optee-client, |
| 10 | DEPENDS = "python3-pycryptodome-native python3-pyelftools-native python3-pycryptodomex-native dtc-native" | 7 | # avoid duplicate copy files to optee-qoriq |
| 8 | FILESEXTRAPATHS:prepend := "${THISDIR}/../optee-imx/optee-os:" | ||
| 11 | 9 | ||
| 12 | SRC_URI = "git://github.com/nxp-qoriq/optee_os.git;protocol=https;nobranch=1" | 10 | SRC_URI:remove = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https" |
| 13 | SRCREV = "735d98806dc26fbeeecad7f5e60ffeab8170c67e" | 11 | SRC_URI:prepend = "${OPTEE_OS_SRC};branch=${OPTEE_OS_BRANCH} " |
| 12 | SRC_URI:append = " file://0007-allow-setting-sysroot-for-clang.patch" | ||
| 14 | 13 | ||
| 15 | B = "${WORKDIR}/build.${PLATFORM_FLAVOR}" | 14 | OPTEE_OS_SRC ?= "git://github.com/nxp-qoriq/optee_os.git;protocol=https" |
| 16 | 15 | ||
| 17 | PLATFORM_FLAVOR ?= "${MACHINE}" | 16 | REQUIRED_MACHINE_FEATURES = "optee" |
| 18 | 17 | ||
| 19 | OPTEE_ARCH ?= "arm64" | 18 | inherit features_check |
| 20 | OPTEE_ARCH:armv7a = "arm32" | ||
| 21 | OPTEE_ARCH:aarch64 = "arm64" | ||
| 22 | 19 | ||
| 23 | OPTEE_CORE_LOG_LEVEL ?= "1" | 20 | OPTEEMACHINE = "ls-${MACHINE}" |
| 24 | OPTEE_TA_LOG_LEVEL ?= "0" | 21 | OPTEEMACHINE:ls1088ardb-pb = "ls-ls1088ardb" |
| 22 | OPTEEMACHINE:ls1046afrwy = "ls-ls1046ardb" | ||
| 23 | OPTEEMACHINE:lx2162aqds = "ls-lx2160aqds" | ||
| 24 | OPTEEMACHINE:lx2160ardb-rev2 = "ls-lx2160ardb" | ||
| 25 | 25 | ||
| 26 | # Optee-os can be built for 32 bits and 64 bits at the same time | 26 | EXTRA_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 | ||
| 31 | EXTRA_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 | 30 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | |
| 41 | do_compile() { | ||
| 42 | unset LDFLAGS | ||
| 43 | export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}" | ||
| 44 | oe_runmake all | ||
| 45 | } | ||
| 46 | |||
| 47 | do_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 | |||
| 64 | do_deploy() { | ||
| 65 | install -d ${DEPLOYDIR}/optee | ||
| 66 | install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/ | ||
| 67 | } | ||
| 68 | addtask deploy before do_build after do_install | ||
| 69 | |||
| 70 | FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" | ||
| 71 | FILES:${PN}-staticdev = "/usr/include/optee/" | ||
| 72 | RDEPENDS:${PN}-dev += "${PN}-staticdev" | ||
| 73 | |||
| 74 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
