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