summaryrefslogtreecommitdiffstats
path: root/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb')
-rw-r--r--bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb75
1 files changed, 75 insertions, 0 deletions
diff --git a/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb b/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb
new file mode 100644
index 00000000..c8ebe2bf
--- /dev/null
+++ b/bsp/meta-freescale/recipes-security/optee/optee-os-qoriq_git.bb
@@ -0,0 +1,75 @@
+SUMMARY = "OP-TEE Trusted OS"
+DESCRIPTION = "OPTEE OS"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
+
+DEPENDS = "python-pycrypto-native"
+
+inherit deploy pythonnative
+
+SRCREV = "e93f053213c574ec1b97f9e56b2f31692cd3723c"
+SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_os;nobranch=1 \
+ file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \
+ "
+S = "${WORKDIR}/git"
+
+OPTEEMACHINE ?= "${MACHINE}"
+
+EXTRA_OEMAKE = "PLATFORM=ls-${OPTEEMACHINE} CFG_ARM64_core=y \
+ ARCH=arm \
+ CROSS_COMPILE_core=${HOST_PREFIX} \
+ CROSS_COMPILE_ta_arm64=${HOST_PREFIX} \
+ NOWERROR=1 \
+ 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
+ ${OBJCOPY} -v -O binary ${B}/out/arm-plat-ls/core/tee.elf ${B}/out/arm-plat-ls/core/tee.bin
+
+ if [ ${MACHINE} = ls1012afrwy ]; then
+ mv ${B}/out/arm-plat-ls/core/tee.bin ${B}/out/arm-plat-ls/core/tee_512mb.bin
+ oe_runmake CFG_DRAM0_SIZE=0x40000000 all CFG_TEE_TA_LOG_LEVEL=0
+ ${OBJCOPY} -v -O binary ${B}/out/arm-plat-ls/core/tee.elf ${B}/out/arm-plat-ls/core/tee.bin
+ fi
+}
+
+do_install() {
+ #install core on boot directory
+ install -d ${D}/lib/firmware/
+ if [ ${MACHINE} = ls1012afrwy ]; then
+ install -m 644 ${B}/out/arm-plat-ls/core/tee_512mb.bin ${D}/lib/firmware/tee_${MACHINE}_512mb.bin
+ fi
+ install -m 644 ${B}/out/arm-plat-ls/core/tee.bin ${D}/lib/firmware/tee_${MACHINE}.bin
+ #install TA devkit
+ install -d ${D}/usr/include/optee/export-user_ta/
+
+ for f in ${B}/out/arm-plat-ls/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}/lib/firmware/*; do
+ cp $f ${DEPLOYDIR}/optee/
+ done
+}
+
+addtask deploy before do_build after do_install
+
+FILES_${PN} = "/lib/firmware/"
+FILES_${PN}-dev = "/usr/include/optee"
+
+INSANE_SKIP_${PN}-dev = "staticdev"
+
+INHIBIT_PACKAGE_STRIP = "1"
+COMPATIBLE_MACHINE = "(qoriq-arm64)"