[3/5] optee-examples.bb: add recipe for optee examples

Message ID 1580319525-32054-4-git-send-email-peter.griffin@linaro.org
State New
Headers show
Series
  • Add OP-TEE recipes to meta-arm layer
Related show

Commit Message

Peter Griffin Jan. 29, 2020, 5:38 p.m.
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.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>

---
 meta-arm/recipes-security/optee/optee-examples.bb | 42 +++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 meta-arm/recipes-security/optee/optee-examples.bb

-- 
2.7.4

Patch

diff --git a/meta-arm/recipes-security/optee/optee-examples.bb b/meta-arm/recipes-security/optee/optee-examples.bb
new file mode 100644
index 0000000..aaec4c4
--- /dev/null
+++ b/meta-arm/recipes-security/optee/optee-examples.bb
@@ -0,0 +1,42 @@ 
+SUMMARY = "OP-TEE examples"
+HOMEPAGE = "https://github.com/linaro-swg/optee_examples"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=cd95ab417e23b94f381dafc453d70c30"
+
+DEPENDS = "optee-client optee-os python-pycrypto-native"
+
+inherit python3native
+
+SRC_URI = "git://github.com/linaro-swg/optee_examples.git"
+SRCREV = "559b2141c16bf0f57ccd72f60e4deb84fc2a05b0"
+
+S = "${WORKDIR}/git"
+
+OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}"
+TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
+TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
+
+EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
+                 OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \
+                 TEEC_EXPORT=${TEEC_EXPORT} \
+                 HOST_CROSS_COMPILE=${TARGET_PREFIX} \
+                 TA_CROSS_COMPILE=${TARGET_PREFIX} \
+                 V=1 \
+               "
+
+do_compile() {
+    oe_runmake
+}
+
+do_install () {
+    mkdir -p ${D}${nonarch_base_libdir}/optee_armtz
+    mkdir -p ${D}${bindir}
+    install -D -p -m0755 ${S}/out/ca/* ${D}${bindir}
+    install -D -p -m0444 ${S}/out/ta/* ${D}${nonarch_base_libdir}/optee_armtz
+}
+
+FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/"
+
+# Imports machine specific configs from staging to build
+PACKAGE_ARCH = "${MACHINE_ARCH}"