blob: 58f101392bf6675d04d305e8478c622370261c02 [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001SUMMARY = "OP-TEE sanity testsuite"
2DESCRIPTION = "Open Portable Trusted Execution Environment - Test suite"
3HOMEPAGE = "https://www.op-tee.org/"
4
5LICENSE = "BSD-2-Clause & GPL-2.0-only"
6LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
7
8inherit python3native ptest
Andrew Geissler23e02792023-07-21 09:06:10 -05009inherit deploy
Brad Bishopbec4ebc2022-08-03 09:55:16 -040010require optee.inc
11
Patrick Williamsac13d5f2023-11-24 18:59:46 -060012DEPENDS = "optee-client optee-os-tadevkit python3-cryptography-native openssl"
Brad Bishopbec4ebc2022-08-03 09:55:16 -040013
14SRC_URI = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https \
15 file://run-ptest \
16 "
17
18S = "${WORKDIR}/git"
19B = "${WORKDIR}/build"
20
21EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
Patrick Williamsac13d5f2023-11-24 18:59:46 -060022 OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR} \
Brad Bishopbec4ebc2022-08-03 09:55:16 -040023 CROSS_COMPILE_HOST=${HOST_PREFIX} \
24 CROSS_COMPILE_TA=${HOST_PREFIX} \
25 O=${B} \
26 "
27
Patrick Williamsac13d5f2023-11-24 18:59:46 -060028CFLAGS += "-Wno-error=deprecated-declarations"
29
Brad Bishopbec4ebc2022-08-03 09:55:16 -040030do_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}
37do_compile[cleandirs] = "${B}"
38
39do_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 Geissler23e02792023-07-21 09:06:10 -050050do_deploy () {
51 install -d ${DEPLOYDIR}/${MLPREFIX}optee/ta
52 install -m 644 ${B}/ta/*/*.elf ${DEPLOYDIR}/${MLPREFIX}optee/ta
53}
54
55addtask deploy before do_build after do_install
56
Brad Bishopbec4ebc2022-08-03 09:55:16 -040057FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ \
58 ${libdir}/tee-supplicant/plugins/ \
59 "
60
61# Imports machine specific configs from staging to build
62PACKAGE_ARCH = "${MACHINE_ARCH}"