summaryrefslogtreecommitdiffstats
path: root/recipes-security/optee/optee-test.nxp.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/optee/optee-test.nxp.inc')
-rw-r--r--recipes-security/optee/optee-test.nxp.inc61
1 files changed, 61 insertions, 0 deletions
diff --git a/recipes-security/optee/optee-test.nxp.inc b/recipes-security/optee/optee-test.nxp.inc
new file mode 100644
index 00000000..868776c5
--- /dev/null
+++ b/recipes-security/optee/optee-test.nxp.inc
@@ -0,0 +1,61 @@
1# Copyright 2020-2021 NXP
2
3SUMMARY = "OPTEE test"
4HOMEPAGE = "http://www.optee.org/"
5
6LICENSE = "BSD & GPLv2"
7LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
8
9DEPENDS = "python3-pycryptodome-native python3-pycryptodomex-native openssl"
10inherit python3native cmake
11
12SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test.git;nobranch=1"
13SRCREV = "69722dab8c1f2683e30e0ee3b536053367e37aad"
14
15S = "${WORKDIR}/git"
16B = "${WORKDIR}/build"
17
18TA_DEV_KIT_DIR ?= "${STAGING_INCDIR}/optee/export-user_ta"
19OPTEE_CLIENT_EXPORT ?= "${STAGING_DIR_HOST}${prefix}"
20
21EXTRA_OEMAKE = " \
22 TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
23 OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \
24 CROSS_COMPILE_HOST=${HOST_PREFIX} \
25 CROSS_COMPILE_TA=${HOST_PREFIX} \
26 OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ \
27 -C ${S} O=${B} \
28"
29
30EXTRA_OECMAKE = " \
31 -DOPTEE_TEST_SDK=${TA_DEV_KIT_DIR} \
32"
33
34do_compile() {
35 export CXXFLAGS="${CXXFLAGS} --sysroot=${STAGING_DIR_HOST}"
36 oe_runmake xtest
37 oe_runmake ta
38 oe_runmake test_plugin
39}
40
41do_install() {
42 install -d ${D}${bindir}/
43 install ${B}/xtest/xtest ${D}${bindir}/
44
45 install -d ${D}${nonarch_base_libdir}/optee_armtz
46 find ${B}/ta -name '*.ta' | while read name; do
47 install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/
48 done
49
50 install -d ${D}${libdir}/tee-supplicant/plugins/
51 find ${B}/supp_plugin -name '*.plugin' | while read name; do
52 install -m 755 $name ${D}${libdir}/tee-supplicant/plugins/
53 done
54}
55
56FILES:${PN} += "${nonarch_base_libdir} ${libdir}/tee-supplicant/plugins/"
57
58DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations"
59FULL_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations"
60
61PACKAGE_ARCH = "${MACHINE_ARCH}"