diff options
| -rw-r--r-- | recipes-security/optee/optee-os/0001-allow-setting-sysroot-for-libgcc-lookup.patch | 13 | ||||
| -rw-r--r-- | recipes-security/optee/optee-os_git.bb | 67 |
2 files changed, 80 insertions, 0 deletions
diff --git a/recipes-security/optee/optee-os/0001-allow-setting-sysroot-for-libgcc-lookup.patch b/recipes-security/optee/optee-os/0001-allow-setting-sysroot-for-libgcc-lookup.patch new file mode 100644 index 000000000..17127d0b0 --- /dev/null +++ b/recipes-security/optee/optee-os/0001-allow-setting-sysroot-for-libgcc-lookup.patch | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | diff --git a/mk/gcc.mk b/mk/gcc.mk | ||
| 2 | index fc38c4d..77b8d74 100644 | ||
| 3 | --- a/mk/gcc.mk | ||
| 4 | +++ b/mk/gcc.mk | ||
| 5 | @@ -12,7 +12,7 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \ | ||
| 6 | -print-file-name=include 2> /dev/null) | ||
| 7 | |||
| 8 | # Get location of libgcc from gcc | ||
| 9 | -libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \ | ||
| 10 | +libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \ | ||
| 11 | -print-libgcc-file-name 2> /dev/null) | ||
| 12 | |||
| 13 | # Define these to something to discover accidental use | ||
diff --git a/recipes-security/optee/optee-os_git.bb b/recipes-security/optee/optee-os_git.bb new file mode 100644 index 000000000..cda3a69bf --- /dev/null +++ b/recipes-security/optee/optee-os_git.bb | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | SUMMARY = "OP-TEE Trusted OS" | ||
| 2 | DESCRIPTION = "OPTEE OS" | ||
| 3 | |||
| 4 | LICENSE = "BSD" | ||
| 5 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b" | ||
| 6 | |||
| 7 | DEPENDS = "python-pycrypto-native" | ||
| 8 | |||
| 9 | inherit deploy pythonnative | ||
| 10 | |||
| 11 | SRCREV = "ced7d32072c2b350c2090803f6dcfa006057efda" | ||
| 12 | SRC_URI = "git://github.com/qoriq-open-source/optee_os.git;nobranch=1 \ | ||
| 13 | file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \ | ||
| 14 | " | ||
| 15 | |||
| 16 | S = "${WORKDIR}/git" | ||
| 17 | |||
| 18 | OPTEEMACHINE ?= "${MACHINE}" | ||
| 19 | |||
| 20 | EXTRA_OEMAKE = "PLATFORM=ls-${OPTEEMACHINE} CFG_ARM64_core=y \ | ||
| 21 | CROSS_COMPILE_core=${HOST_PREFIX} \ | ||
| 22 | CROSS_COMPILE_ta_arm64=${HOST_PREFIX} \ | ||
| 23 | NOWERROR=1 \ | ||
| 24 | ta-targets=ta_arm64 \ | ||
| 25 | LDFLAGS= \ | ||
| 26 | LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \ | ||
| 27 | " | ||
| 28 | |||
| 29 | OPTEE_ARCH_armv7a = "arm32" | ||
| 30 | OPTEE_ARCH_aarch64 = "arm64" | ||
| 31 | |||
| 32 | do_compile() { | ||
| 33 | unset LDFLAGS | ||
| 34 | oe_runmake all CFG_TEE_TA_LOG_LEVEL=0 | ||
| 35 | } | ||
| 36 | |||
| 37 | do_install() { | ||
| 38 | #install core on boot directory | ||
| 39 | install -d ${D}/lib/firmware/ | ||
| 40 | |||
| 41 | install -m 644 ${B}/out/arm-plat-ls/core/tee.elf ${D}/lib/firmware/tee_${MACHINE}.bin | ||
| 42 | #install TA devkit | ||
| 43 | install -d ${D}/usr/include/optee/export-user_ta/ | ||
| 44 | |||
| 45 | for f in ${B}/out/arm-plat-ls/export-ta_${OPTEE_ARCH}/* ; do | ||
| 46 | cp -aR $f ${D}/usr/include/optee/export-user_ta/ | ||
| 47 | done | ||
| 48 | } | ||
| 49 | |||
| 50 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 51 | |||
| 52 | do_deploy() { | ||
| 53 | install -d ${DEPLOYDIR}/optee | ||
| 54 | for f in ${D}/lib/firmware/*; do | ||
| 55 | install -m 644 $f ${DEPLOYDIR}/optee/tee_${MACHINE}.bin | ||
| 56 | done | ||
| 57 | } | ||
| 58 | |||
| 59 | addtask deploy before do_build after do_install | ||
| 60 | |||
| 61 | FILES_${PN} = "/lib/firmware/" | ||
| 62 | FILES_${PN}-dev = "/usr/include/optee" | ||
| 63 | |||
| 64 | INSANE_SKIP_${PN}-dev = "staticdev" | ||
| 65 | |||
| 66 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 67 | COMPATIBLE_MACHINE = "(ls1043ardb|ls1046ardb|ls1012ardb)" | ||
