summaryrefslogtreecommitdiffstats
path: root/recipes-security/optee-imx/optee-test_3.15.0.imx.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/optee-imx/optee-test_3.15.0.imx.bb')
-rw-r--r--recipes-security/optee-imx/optee-test_3.15.0.imx.bb67
1 files changed, 67 insertions, 0 deletions
diff --git a/recipes-security/optee-imx/optee-test_3.15.0.imx.bb b/recipes-security/optee-imx/optee-test_3.15.0.imx.bb
new file mode 100644
index 00000000..7eb11a84
--- /dev/null
+++ b/recipes-security/optee-imx/optee-test_3.15.0.imx.bb
@@ -0,0 +1,67 @@
1# Copyright (C) 2017-2020 NXP
2
3SUMMARY = "OPTEE test"
4HOMEPAGE = "http://www.optee.org/"
5
6LICENSE = "BSD-2-Clause"
7LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
8
9DEPENDS = "python3-pycryptodome-native python3-pycryptodomex-native optee-os optee-client openssl"
10
11SRCBRANCH = "lf-5.10.72_2.2.0"
12
13SRC_URI = "git://source.codeaurora.org/external/imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}"
14
15S = "${WORKDIR}/git"
16B = "${WORKDIR}/build"
17
18SRCREV = "4d81b964a72e89a62d04187b3f055d8346b383c9"
19
20inherit python3native
21
22OPTEE_ARCH ?= "arm32"
23OPTEE_ARCH:armv7a = "arm32"
24OPTEE_ARCH:aarch64 = "arm64"
25
26TA_DEV_KIT_DIR:arm = "${STAGING_INCDIR}/optee/export-user_ta_arm32/"
27TA_DEV_KIT_DIR:aarch64 = "${STAGING_INCDIR}/optee/export-user_ta_arm64/"
28
29CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
30CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
31
32EXTRA_OEMAKE = " \
33 TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
34 ARCH=${OPTEE_ARCH} \
35 OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}/usr \
36 CROSS_COMPILE_HOST=${HOST_PREFIX} \
37 CROSS_COMPILE_TA=${HOST_PREFIX} \
38 CROSS_COMPILE=${HOST_PREFIX} \
39 OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ \
40 -C ${S} O=${B} \
41"
42
43do_compile() {
44 cd ${S}
45 # Top level makefile doesn't seem to handle parallel make gracefully
46 oe_runmake xtest
47 oe_runmake ta
48 oe_runmake test_plugin
49}
50do_compile[cleandirs] = "${B}"
51
52do_install () {
53 install -d ${D}${bindir}
54 install ${B}/xtest/xtest ${D}${bindir}
55
56 install -d ${D}${nonarch_base_libdir}/optee_armtz
57 find ${B}/ta -name '*.ta' | while read name; do
58 install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/
59 done
60
61 install -d ${D}${libdir}/tee-supplicant/plugins/
62 install ${B}/supp_plugin/*plugin ${D}${libdir}/tee-supplicant/plugins/
63}
64
65FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ ${libdir}/tee-supplicant/plugins/"
66
67COMPATIBLE_MACHINE = "(imx-nxp-bsp)"