blob: 160ada6732210095d912609314df8279ab3889f5 [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001DESCRIPTION = "Trusted Firmware-A tests(aka TFTF)"
2LICENSE = "BSD-3-Clause & NCSA"
3
4LIC_FILES_CHKSUM += "file://docs/license.rst;md5=6175cc0aa2e63b6d21a32aa0ee7d1b4a"
5
6inherit deploy
7
8COMPATIBLE_MACHINE ?= "invalid"
9
Andrew Geisslerea144b02023-01-27 16:03:57 -060010SRC_URI_TRUSTED_FIRMWARE_A_TESTS ?= "git://git.trustedfirmware.org/TF-A/tf-a-tests.git;protocol=https"
11SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_A_TESTS};branch=${SRCBRANCH} \
Patrick Williams92b42cb2022-09-03 06:53:57 -050012 file://tf-a-tests-no-warn-rwx-segments.patch"
Patrick Williams520786c2023-06-25 16:20:36 -050013SRCBRANCH = "lts-v2.8"
14SRCREV = "85442d2943440718c2c2c9c5c690202b4b4f5725"
Brad Bishopbec4ebc2022-08-03 09:55:16 -040015
16DEPENDS += "optee-os"
17
18EXTRA_OEMAKE += "USE_NVM=0"
19EXTRA_OEMAKE += "SHELL_COLOR=1"
20EXTRA_OEMAKE += "DEBUG=1"
21
Patrick Williams169d7bc2024-01-05 11:33:25 -060022# Modify mode based on debug or release mode
23TFTF_MODE ?= "debug"
24
Brad Bishopbec4ebc2022-08-03 09:55:16 -040025# Platform must be set for each machine
26TFA_PLATFORM ?= "invalid"
27
28EXTRA_OEMAKE += "ARCH=aarch64"
29EXTRA_OEMAKE += "LOG_LEVEL=50"
30
31S = "${WORKDIR}/git"
32B = "${WORKDIR}/build"
33
34# Add platform parameter
35EXTRA_OEMAKE += "BUILD_BASE=${B} PLAT=${TFA_PLATFORM}"
36
37# Requires CROSS_COMPILE set by hand as there is no configure script
38export CROSS_COMPILE="${TARGET_PREFIX}"
39
40do_compile() {
41 oe_runmake -C ${S} tftf
42}
43
44do_compile[cleandirs] = "${B}"
45
46FILES:${PN} = "/firmware/tftf.bin"
47SYSROOT_DIRS += "/firmware"
48
49do_install() {
50 install -d -m 755 ${D}/firmware
Patrick Williams169d7bc2024-01-05 11:33:25 -060051 install -m 0644 ${B}/${TFA_PLATFORM}/${TFTF_MODE}/tftf.bin ${D}/firmware/tftf.bin
Brad Bishopbec4ebc2022-08-03 09:55:16 -040052}
53
54do_deploy() {
55 cp -rf ${D}/firmware/* ${DEPLOYDIR}/
56}
57addtask deploy after do_install