aboutsummaryrefslogtreecommitdiff
path: root/meta-optee/recipes-security
diff options
context:
space:
mode:
authorKoen Kooi <koen.kooi@linaro.org>2016-06-13 11:05:05 +0200
committerKoen Kooi <koen.kooi@linaro.org>2016-06-23 07:35:36 +0200
commitea600f22e5f38772e40d4b9f87c45a713f7993c7 (patch)
treead749e9da621cc0866b7b1ee50eed261621439d5 /meta-optee/recipes-security
parent39177aac4c05a87fc80f85515d4be3ef93da3074 (diff)
optee-test: add recipe
Change-Id: Ideceb88a7fceb1fa62b9e9767f41902dac669726 Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Diffstat (limited to 'meta-optee/recipes-security')
-rw-r--r--meta-optee/recipes-security/optee/optee-test_git.bb54
1 files changed, 54 insertions, 0 deletions
diff --git a/meta-optee/recipes-security/optee/optee-test_git.bb b/meta-optee/recipes-security/optee/optee-test_git.bb
new file mode 100644
index 00000000..96261d72
--- /dev/null
+++ b/meta-optee/recipes-security/optee/optee-test_git.bb
@@ -0,0 +1,54 @@
+SUMMARY = "OP-TEE sanity testsuite"
+HOMEPAGE = "https://github.com/OP-TEE/optee_test"
+
+LICENSE = "BSD & GPLv2"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
+
+DEPENDS = "optee-client optee-os python-pycrypto-native"
+
+inherit pythonnative
+
+PV = "2.0+git${SRCPV}"
+
+SRC_URI = "git://github.com/OP-TEE/optee_test.git"
+S = "${WORKDIR}/git"
+
+SRCREV = "5b41fbff33ff77b19836149fbde0a69524ced089"
+
+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} \
+ CROSS_COMPILE_HOST=${TARGET_PREFIX} \
+ CROSS_COMPILE_TA=${TARGET_PREFIX} \
+ NOWERROR=1 \
+ V=1 \
+ "
+
+do_compile() {
+ # *sigh* don't enable -Werror if your code is dodgy and triggers a ton of gcc warnings.
+ sed -i -e 's:-Werror : :g' ${S}/host/xtest/Makefile
+
+ # Top level makefile doesn't seem to handle parallel make gracefully
+ oe_runmake xtest
+ oe_runmake ta
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -d ${D}${base_libdir}/optee_armtz
+
+ install ${S}/out/xtest/xtest ${D}${bindir}
+
+ find ${S}/out/ta -name '*.ta' | while read name; do
+ install -m 444 $name ${D}${base_libdir}/optee_armtz/
+ done
+}
+
+FILES_${PN} += "${base_libdir}/optee_armtz/"
+
+# Imports machine specific configs from staging to build
+PACKAGE_ARCH = "${MACHINE_ARCH}"