diff options
Diffstat (limited to 'recipes-security/optee/optee-test.nxp.inc')
| -rw-r--r-- | recipes-security/optee/optee-test.nxp.inc | 61 |
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 000000000..868776c54 --- /dev/null +++ b/recipes-security/optee/optee-test.nxp.inc | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | # Copyright 2020-2021 NXP | ||
| 2 | |||
| 3 | SUMMARY = "OPTEE test" | ||
| 4 | HOMEPAGE = "http://www.optee.org/" | ||
| 5 | |||
| 6 | LICENSE = "BSD & GPLv2" | ||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" | ||
| 8 | |||
| 9 | DEPENDS = "python3-pycryptodome-native python3-pycryptodomex-native openssl" | ||
| 10 | inherit python3native cmake | ||
| 11 | |||
| 12 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test.git;nobranch=1" | ||
| 13 | SRCREV = "69722dab8c1f2683e30e0ee3b536053367e37aad" | ||
| 14 | |||
| 15 | S = "${WORKDIR}/git" | ||
| 16 | B = "${WORKDIR}/build" | ||
| 17 | |||
| 18 | TA_DEV_KIT_DIR ?= "${STAGING_INCDIR}/optee/export-user_ta" | ||
| 19 | OPTEE_CLIENT_EXPORT ?= "${STAGING_DIR_HOST}${prefix}" | ||
| 20 | |||
| 21 | EXTRA_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 | |||
| 30 | EXTRA_OECMAKE = " \ | ||
| 31 | -DOPTEE_TEST_SDK=${TA_DEV_KIT_DIR} \ | ||
| 32 | " | ||
| 33 | |||
| 34 | do_compile() { | ||
| 35 | export CXXFLAGS="${CXXFLAGS} --sysroot=${STAGING_DIR_HOST}" | ||
| 36 | oe_runmake xtest | ||
| 37 | oe_runmake ta | ||
| 38 | oe_runmake test_plugin | ||
| 39 | } | ||
| 40 | |||
| 41 | do_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 | |||
| 56 | FILES:${PN} += "${nonarch_base_libdir} ${libdir}/tee-supplicant/plugins/" | ||
| 57 | |||
| 58 | DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations" | ||
| 59 | FULL_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations" | ||
| 60 | |||
| 61 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
