Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | SUMMARY = "OP-TEE sanity testsuite" |
| 2 | DESCRIPTION = "Open Portable Trusted Execution Environment - Test suite" |
| 3 | HOMEPAGE = "https://www.op-tee.org/" |
| 4 | |
| 5 | LICENSE = "BSD-2-Clause & GPL-2.0-only" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" |
| 7 | |
| 8 | inherit python3native ptest |
Andrew Geissler | 23e0279 | 2023-07-21 09:06:10 -0500 | [diff] [blame] | 9 | inherit deploy |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 10 | require optee.inc |
| 11 | |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 12 | DEPENDS = "optee-client optee-os-tadevkit python3-cryptography-native openssl" |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 13 | |
| 14 | SRC_URI = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https \ |
| 15 | file://run-ptest \ |
| 16 | " |
| 17 | |
| 18 | S = "${WORKDIR}/git" |
| 19 | B = "${WORKDIR}/build" |
| 20 | |
| 21 | EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 22 | OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR} \ |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 23 | CROSS_COMPILE_HOST=${HOST_PREFIX} \ |
| 24 | CROSS_COMPILE_TA=${HOST_PREFIX} \ |
| 25 | O=${B} \ |
| 26 | " |
| 27 | |
Patrick Williams | ac13d5f | 2023-11-24 18:59:46 -0600 | [diff] [blame] | 28 | CFLAGS += "-Wno-error=deprecated-declarations" |
| 29 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 30 | do_compile() { |
| 31 | cd ${S} |
| 32 | # Top level makefile doesn't seem to handle parallel make gracefully |
| 33 | oe_runmake xtest |
| 34 | oe_runmake ta |
| 35 | oe_runmake test_plugin |
| 36 | } |
| 37 | do_compile[cleandirs] = "${B}" |
| 38 | |
| 39 | do_install () { |
| 40 | install -D -p -m0755 ${B}/xtest/xtest ${D}${bindir}/xtest |
| 41 | |
| 42 | # install path should match the value set in optee-client/tee-supplicant |
| 43 | # default TEEC_LOAD_PATH is /lib |
| 44 | mkdir -p ${D}${nonarch_base_libdir}/optee_armtz/ |
| 45 | install -D -p -m0444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ |
| 46 | mkdir -p ${D}${libdir}/tee-supplicant/plugins |
| 47 | install -D -p -m0444 ${B}/supp_plugin/*.plugin ${D}${libdir}/tee-supplicant/plugins/ |
| 48 | } |
| 49 | |
Andrew Geissler | 23e0279 | 2023-07-21 09:06:10 -0500 | [diff] [blame] | 50 | do_deploy () { |
| 51 | install -d ${DEPLOYDIR}/${MLPREFIX}optee/ta |
| 52 | install -m 644 ${B}/ta/*/*.elf ${DEPLOYDIR}/${MLPREFIX}optee/ta |
| 53 | } |
| 54 | |
| 55 | addtask deploy before do_build after do_install |
| 56 | |
Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 57 | FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ \ |
| 58 | ${libdir}/tee-supplicant/plugins/ \ |
| 59 | " |
| 60 | |
| 61 | # Imports machine specific configs from staging to build |
| 62 | PACKAGE_ARCH = "${MACHINE_ARCH}" |