1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-06-08 03:21:35 +00:00

optee-os: upgrade 3.7.0 -> 3.8.0, cleanup

* Cleanup the recipe - add HOMEPAGE, update DESCRIPTION, indentation
* Depend on PyCryptodomex, but old PyCrypto is still required
* Ensure full support for arm32 platforms - build corresponding core and TA

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Denys Dmytriyenko
2020-04-08 03:00:02 -04:00
committed by Jon Mason
parent 4f2443469f
commit 43bc224685
+36 -27
View File
@@ -1,52 +1,63 @@
SUMMARY = "OP-TEE Trusted OS"
DESCRIPTION = "OPTEE OS"
DESCRIPTION = "Open Portable Trusted Execution Environment - Trusted side of the TEE"
HOMEPAGE = "https://www.op-tee.org/"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
PV="3.7.0+git${SRCPV}"
PV = "3.8.0+git${SRCPV}"
inherit deploy python3native
DEPENDS = "python3-pycrypto-native python3-pyelftools-native"
DEPENDS = "python3-pycrypto-native python3-pyelftools-native python3-pycryptodomex-native"
SRCREV = "a2fa5018cb595a9cd9ab62e82c7485ca57a62084"
SRC_URI = "git://github.com/OP-TEE/optee_os.git \
file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \
"
SRCREV = "023e33656e2c9557ce50ad63a98b2e2c9b51c118"
SRC_URI = " \
git://github.com/OP-TEE/optee_os.git \
file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \
"
S = "${WORKDIR}/git"
OPTEEMACHINE ?= "${MACHINE}"
OPTEEOUTPUTMACHINE ?= "${MACHINE}"
EXTRA_OEMAKE = "PLATFORM=${OPTEEMACHINE} CFG_ARM64_core=y \
CROSS_COMPILE_core=${HOST_PREFIX} \
CROSS_COMPILE_ta_arm64=${HOST_PREFIX} \
NOWERROR=1 \
ta-targets=ta_arm64 \
LDFLAGS= \
LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
"
OPTEE_ARCH_armv7a = "arm32"
OPTEE_ARCH_aarch64 = "arm64"
OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}"
EXTRA_OEMAKE = " \
PLATFORM=${OPTEEMACHINE} \
CFG_${OPTEE_CORE}_core=y \
CROSS_COMPILE_core=${HOST_PREFIX} \
CROSS_COMPILE_ta_${OPTEE_ARCH}=${HOST_PREFIX} \
NOWERROR=1 \
V=1 \
ta-targets=ta_${OPTEE_ARCH} \
LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
"
CFLAGS[unexport] = "1"
LDFLAGS[unexport] = "1"
CPPFLAGS[unexport] = "1"
AS[unexport] = "1"
LD[unexport] = "1"
do_configure[noexec] = "1"
do_compile() {
unset LDFLAGS
oe_runmake all CFG_TEE_TA_LOG_LEVEL=0
}
do_install() {
#install core on boot directory
#install core in firmware
install -d ${D}${nonarch_base_libdir}/firmware/
install -m 644 ${B}/out/arm-plat-${OPTEEOUTPUTMACHINE}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
#install TA devkit
install -d ${D}/usr/include/optee/export-user_ta/
for f in ${B}/out/arm-plat-${OPTEEOUTPUTMACHINE}/export-ta_${OPTEE_ARCH}/* ; do
cp -aR $f ${D}/usr/include/optee/export-user_ta/
#install TA devkit
install -d ${D}${includedir}/optee/export-user_ta/
for f in ${B}/out/arm-plat-${OPTEEOUTPUTMACHINE}/export-ta_${OPTEE_ARCH}/* ; do
cp -aR $f ${D}${includedir}/optee/export-user_ta/
done
}
@@ -54,15 +65,13 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
do_deploy() {
install -d ${DEPLOYDIR}/optee
for f in ${D}${nonarch_base_libdir}/firmware/*; do
install -m 644 $f ${DEPLOYDIR}/optee/
done
install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/
}
addtask deploy before do_build after do_install
FILES_${PN} = "${nonarch_base_libdir}/firmware/"
FILES_${PN}-dev = "/usr/include/optee"
FILES_${PN}-dev = "${includedir}/optee/"
INSANE_SKIP_${PN}-dev = "staticdev"