diff options
Diffstat (limited to 'recipes-security/optee-imx/optee-test-fslc.inc')
-rw-r--r-- | recipes-security/optee-imx/optee-test-fslc.inc | 66 |
1 files changed, 46 insertions, 20 deletions
diff --git a/recipes-security/optee-imx/optee-test-fslc.inc b/recipes-security/optee-imx/optee-test-fslc.inc index e0c133a7c..ed64c87f8 100644 --- a/recipes-security/optee-imx/optee-test-fslc.inc +++ b/recipes-security/optee-imx/optee-test-fslc.inc | |||
@@ -1,38 +1,64 @@ | |||
1 | # Copyright (C) 2017-2021 NXP | 1 | # Copied from meta-arm/recipes-security/optee/optee-test.inc. |
2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-scarthgap/imx-6.6.52-2.2.0.xml#L30 | ||
3 | |||
4 | SUMMARY = "OP-TEE sanity testsuite" | ||
5 | DESCRIPTION = "Open Portable Trusted Execution Environment - Test suite" | ||
6 | HOMEPAGE = "https://www.op-tee.org/" | ||
2 | 7 | ||
3 | SUMMARY = "OPTEE test" | ||
4 | LICENSE = "BSD-2-Clause & GPL-2.0-only" | 8 | LICENSE = "BSD-2-Clause & GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" | 9 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" |
6 | 10 | ||
11 | inherit python3native ptest | ||
12 | inherit deploy | ||
7 | require optee-fslc.inc | 13 | require optee-fslc.inc |
8 | 14 | ||
9 | DEPENDS += "optee-os optee-client openssl" | 15 | DEPENDS = "optee-client optee-os-tadevkit python3-cryptography-native openssl" |
16 | |||
17 | SRC_URI = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https \ | ||
18 | file://run-ptest \ | ||
19 | " | ||
20 | |||
21 | B = "${WORKDIR}/build" | ||
10 | 22 | ||
11 | EXTRA_OEMAKE += " \ | 23 | EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ |
12 | TA_DEV_KIT_DIR=${STAGING_INCDIR}/optee/export-user_ta_${OPTEE_ARCH}/ \ | 24 | OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR} \ |
13 | CROSS_COMPILE_HOST=${HOST_PREFIX} \ | 25 | CROSS_COMPILE_HOST=${HOST_PREFIX} \ |
14 | CROSS_COMPILE_TA=${HOST_PREFIX} \ | 26 | CROSS_COMPILE_TA=${HOST_PREFIX} \ |
15 | CROSS_COMPILE=${HOST_PREFIX} \ | 27 | O=${B} \ |
16 | " | 28 | " |
29 | |||
30 | CFLAGS += "-Wno-error=deprecated-declarations" | ||
17 | 31 | ||
18 | do_compile() { | 32 | do_compile() { |
19 | oe_runmake all | 33 | cd ${S} |
34 | # Top level makefile doesn't seem to handle parallel make gracefully | ||
35 | oe_runmake xtest | ||
36 | oe_runmake ta | ||
37 | oe_runmake test_plugin | ||
20 | } | 38 | } |
21 | do_compile[cleandirs] = "${B}" | 39 | do_compile[cleandirs] = "${B}" |
22 | 40 | ||
23 | do_install () { | 41 | do_install () { |
24 | install -d ${D}${bindir} | 42 | install -D -p -m0755 ${B}/xtest/xtest ${D}${bindir}/xtest |
25 | install ${B}/xtest/xtest ${D}${bindir} | ||
26 | 43 | ||
27 | install -d ${D}${nonarch_base_libdir}/optee_armtz | 44 | # install path should match the value set in optee-client/tee-supplicant |
28 | find ${B}/ta -name '*.ta' | while read name; do | 45 | # default TEEC_LOAD_PATH is /lib |
29 | install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ | 46 | mkdir -p ${D}${nonarch_base_libdir}/optee_armtz/ |
30 | done | 47 | install -D -p -m0444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ |
48 | mkdir -p ${D}${libdir}/tee-supplicant/plugins | ||
49 | install -D -p -m0444 ${B}/supp_plugin/*.plugin ${D}${libdir}/tee-supplicant/plugins/ | ||
50 | } | ||
31 | 51 | ||
32 | install -d ${D}${libdir}/tee-supplicant/plugins/ | 52 | do_deploy () { |
33 | install ${B}/supp_plugin/*plugin ${D}${libdir}/tee-supplicant/plugins/ | 53 | install -d ${DEPLOYDIR}/${MLPREFIX}optee/ta |
54 | install -m 644 ${B}/ta/*/*.elf ${DEPLOYDIR}/${MLPREFIX}optee/ta | ||
34 | } | 55 | } |
35 | 56 | ||
36 | FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ ${libdir}/tee-supplicant/plugins/" | 57 | addtask deploy before do_build after do_install |
58 | |||
59 | FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ \ | ||
60 | ${libdir}/tee-supplicant/plugins/ \ | ||
61 | " | ||
37 | 62 | ||
38 | RDEPENDS:${PN} = "optee-os" | 63 | # Imports machine specific configs from staging to build |
64 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||