1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-01-12 03:10:15 +00:00

optee-os_git.bb: add optee-os recipe and patches

This has moved from meta-linaro to meta-arm as this
is the new place for general recipes for Arm arch
and has a mailing list for external contributors.

Change-Id: Id43f498e35350eb62a718e64011c8b2f8cd85fdd
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
This commit is contained in:
Peter Griffin
2020-01-29 17:38:42 +00:00
committed by Jon Mason
parent 0bce62510e
commit 94c5b5460d
2 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
diff --git a/mk/gcc.mk b/mk/gcc.mk
index fc38c4d..77b8d74 100644
--- a/mk/gcc.mk
+++ b/mk/gcc.mk
@@ -12,7 +12,7 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \
-print-file-name=include 2> /dev/null)
# Get location of libgcc from gcc
-libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \
+libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \
-print-libgcc-file-name 2> /dev/null)
# Define these to something to discover accidental use

View File

@@ -0,0 +1,69 @@
SUMMARY = "OP-TEE Trusted OS"
DESCRIPTION = "OPTEE OS"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
PV="3.7.0+git${SRCPV}"
inherit deploy python3native
DEPENDS = "python3-pycrypto-native python3-pyelftools-native"
SRCREV = "a2fa5018cb595a9cd9ab62e82c7485ca57a62084"
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"
do_compile() {
unset LDFLAGS
oe_runmake all CFG_TEE_TA_LOG_LEVEL=0
}
do_install() {
#install core on boot directory
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/
done
}
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
}
addtask deploy before do_build after do_install
FILES_${PN} = "${nonarch_base_libdir}/firmware/"
FILES_${PN}-dev = "/usr/include/optee"
INSANE_SKIP_${PN}-dev = "staticdev"
INHIBIT_PACKAGE_STRIP = "1"