mirror of
git://git.yoctoproject.org/meta-freescale.git
synced 2025-10-22 14:52:19 +02:00
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>
(cherry picked from commit a12bf597b5
)
This commit is contained in:
parent
9dd0601573
commit
8b4cfabe83
|
@ -0,0 +1,24 @@
|
|||
require optee-os.nxp.inc
|
||||
|
||||
SUMMARY = "OP-TEE Trusted OS TA devkit"
|
||||
DESCRIPTION = "OP-TEE TA devkit for build TAs"
|
||||
HOMEPAGE = "https://www.op-tee.org/"
|
||||
|
||||
DEPENDS += "python3-pycryptodome-native"
|
||||
|
||||
OPTEE_OS_BRANCH = "lf-6.12.20_2.0.0"
|
||||
SRCREV = "87964807d80baf1dcfd89cafc66de34a1cf16bf3"
|
||||
|
||||
do_install() {
|
||||
#install TA devkit
|
||||
install -d ${D}${includedir}/optee/export-user_ta/
|
||||
for f in ${B}/export-ta_${OPTEE_ARCH}/* ; do
|
||||
cp -aR $f ${D}${includedir}/optee/export-user_ta/
|
||||
done
|
||||
}
|
||||
|
||||
do_deploy() {
|
||||
echo "Do not inherit do_deploy from optee-os."
|
||||
}
|
||||
|
||||
FILES:${PN} = "${includedir}/optee/"
|
|
@ -1,28 +0,0 @@
|
|||
require optee-os.nxp.inc
|
||||
|
||||
PV:append = "+git${SRCPV}"
|
||||
|
||||
PLATFORM_FLAVOR:ls1088ardb-pb = "ls1088ardb"
|
||||
PLATFORM_FLAVOR:ls1046afrwy = "ls1046ardb"
|
||||
PLATFORM_FLAVOR:lx2162aqds = "lx2160aqds"
|
||||
|
||||
EXTRA_OEMAKE += " \
|
||||
PLATFORM=ls \
|
||||
CFG_ARM64_core=y \
|
||||
"
|
||||
|
||||
do_compile:append:ls1012afrwy() {
|
||||
mv ${B}/core/tee-raw.bin ${B}/core/tee_512mb.bin
|
||||
oe_runmake CFG_DRAM0_SIZE=0x40000000 all
|
||||
}
|
||||
|
||||
do_install:append:qoriq() {
|
||||
install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin
|
||||
}
|
||||
|
||||
do_install:append:ls1012afrwy() {
|
||||
install -m 644 ${B}/core/tee_512mb.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}_512mb.bin
|
||||
}
|
||||
|
||||
INHIBIT_PACKAGE_STRIP = "1"
|
||||
COMPATIBLE_MACHINE = "(qoriq-arm64)"
|
21
recipes-security/optee-qoriq/optee-os-qoriq_4.6.0.bb
Normal file
21
recipes-security/optee-qoriq/optee-os-qoriq_4.6.0.bb
Normal file
|
@ -0,0 +1,21 @@
|
|||
require optee-os.nxp.inc
|
||||
|
||||
OPTEE_OS_BRANCH = "lf-6.12.20_2.0.0"
|
||||
SRCREV = "87964807d80baf1dcfd89cafc66de34a1cf16bf3"
|
||||
|
||||
do_install:append () {
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/
|
||||
install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
|
||||
install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin
|
||||
|
||||
# Install embedded TAs
|
||||
install -d ${D}${base_libdir}/optee_armtz/
|
||||
install -m 444 ${B}/ta/*/*.ta ${D}${base_libdir}/optee_armtz/
|
||||
}
|
||||
|
||||
do_deploy:append () {
|
||||
install -d ${DEPLOYDIR}/optee
|
||||
install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/
|
||||
}
|
||||
|
||||
FILES:${PN} = "${nonarch_base_libdir}/optee_armtz/ ${nonarch_base_libdir}/firmware/"
|
|
@ -1,75 +1,31 @@
|
|||
# Copyright 2020-2021 NXP
|
||||
# Copyright 2020-2021,2025 NXP
|
||||
require recipes-security/optee-imx/optee-os-fslc.inc
|
||||
|
||||
SUMMARY = "OPTEE OS"
|
||||
DESCRIPTION = "OPTEE OS"
|
||||
HOMEPAGE = "http://www.optee.org/"
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
|
||||
DEPENDS:append = " dtc-native"
|
||||
|
||||
inherit deploy python3native autotools
|
||||
DEPENDS = "python3-pycryptodome-native python3-pyelftools-native python3-pycryptodomex-native dtc-native"
|
||||
# The patch same as imx-optee, so point FILESEXTRAPATHS to optee-imx/optee-client,
|
||||
# avoid duplicate copy files to optee-qoriq
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/../optee-imx/optee-os:"
|
||||
|
||||
SRC_URI = "git://github.com/nxp-qoriq/optee_os.git;protocol=https;nobranch=1"
|
||||
SRCREV = "735d98806dc26fbeeecad7f5e60ffeab8170c67e"
|
||||
SRC_URI:remove = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https"
|
||||
SRC_URI:prepend = "${OPTEE_OS_SRC};branch=${OPTEE_OS_BRANCH} "
|
||||
SRC_URI:append = " file://0007-allow-setting-sysroot-for-clang.patch"
|
||||
OPTEE_OS_SRC ?= "git://github.com/nxp-qoriq/optee_os.git;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
B = "${WORKDIR}/build.${PLATFORM_FLAVOR}"
|
||||
|
||||
PLATFORM_FLAVOR ?= "${MACHINE}"
|
||||
REQUIRED_MACHINE_FEATURES = "optee"
|
||||
|
||||
OPTEE_ARCH ?= "arm64"
|
||||
OPTEE_ARCH:armv7a = "arm32"
|
||||
OPTEE_ARCH:aarch64 = "arm64"
|
||||
inherit features_check
|
||||
|
||||
OPTEE_CORE_LOG_LEVEL ?= "1"
|
||||
OPTEE_TA_LOG_LEVEL ?= "0"
|
||||
OPTEEMACHINE = "ls-${MACHINE}"
|
||||
OPTEEMACHINE:ls1088ardb-pb = "ls-ls1088ardb"
|
||||
OPTEEMACHINE:ls1046afrwy = "ls-ls1046ardb"
|
||||
OPTEEMACHINE:lx2162aqds = "ls-lx2160aqds"
|
||||
OPTEEMACHINE:lx2160ardb-rev2 = "ls-lx2160ardb"
|
||||
|
||||
# Optee-os can be built for 32 bits and 64 bits at the same time
|
||||
# as long as the compilers are correctly defined.
|
||||
# For 64bits, CROSS_COMPILE64 must be set
|
||||
# When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that
|
||||
# any 32 or 64 bits builds will pass
|
||||
EXTRA_OEMAKE = " \
|
||||
-C ${S} O=${B} \
|
||||
PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \
|
||||
CROSS_COMPILE=${HOST_PREFIX} \
|
||||
CROSS_COMPILE64=${HOST_PREFIX} \
|
||||
CFG_WERROR=y \
|
||||
CFG_TEE_CORE_LOG_LEVEL=${OPTEE_CORE_LOG_LEVEL} \
|
||||
CFG_TEE_TA_LOG_LEVEL=${OPTEE_TA_LOG_LEVEL} \
|
||||
EXTRA_OEMAKE:append = " \
|
||||
CFG_TEE_TA_LOG_LEVEL=0 \
|
||||
CFG_TEE_CORE_LOG_LEVEL=1 \
|
||||
"
|
||||
|
||||
do_compile() {
|
||||
unset LDFLAGS
|
||||
export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}"
|
||||
oe_runmake all
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/
|
||||
install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
|
||||
|
||||
# Install the TA devkit
|
||||
install -d ${D}${includedir}/optee/export-user_ta/
|
||||
|
||||
for f in ${B}/export-ta_${OPTEE_ARCH}/*; do
|
||||
cp -aR $f ${D}${includedir}/optee/export-user_ta/
|
||||
done
|
||||
|
||||
install -d ${D}${nonarch_base_libdir}/optee_armtz
|
||||
find ${B}/export-ta_${OPTEE_ARCH}/ta -name '*.ta' | while read name; do
|
||||
install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/
|
||||
done
|
||||
}
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOYDIR}/optee
|
||||
install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/
|
||||
}
|
||||
addtask deploy before do_build after do_install
|
||||
|
||||
FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/"
|
||||
FILES:${PN}-staticdev = "/usr/include/optee/"
|
||||
RDEPENDS:${PN}-dev += "${PN}-staticdev"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
COMPATIBLE_MACHINE = "(qoriq-arm64)"
|
||||
|
|
Loading…
Reference in New Issue
Block a user