@@ -82,7 +82,7 @@ corstone1000-fvp:
extends: .build
parallel:
matrix:
- - TESTING: testimage
+ - TESTING: [testimage,tftf]
tags:
- x86_64
new file mode 100644
@@ -0,0 +1,7 @@
+header:
+ version: 9
+
+local_conf_header:
+ tftf: |
+ TFA_UBOOT = "0"
+ TFTF_TESTS = "1"
@@ -31,7 +31,7 @@ repos:
meta-arm-image:
url: https://git.gitlab.arm.com/arm-reference-solutions/meta-arm-image.git
- refspec: 9f611833ef58394b707836d69356c4e27d0265fc
+ refspec: e075959fd718bc3dcedf68965eb9f9205b88d5d0
local_conf_header:
base: |
new file mode 100644
@@ -0,0 +1,7 @@
+header:
+ version: 9
+
+local_conf_header:
+ tftf: |
+ TFA_UBOOT = "0"
+ TFTF_TESTS = "1"
@@ -65,4 +65,3 @@ SERIAL_CONSOLES ?= "115200;ttyAMA0"
WKS_FILE_DEPENDS:append = " ${EXTRA_IMAGEDEPENDS}"
WKS_FILE ?= "corstone1000-image.corstone1000.wks"
-
new file mode 100644
@@ -0,0 +1,3 @@
+# Machine specific TFAs
+
+COMPATIBLE_MACHINE:corstone1000 = "corstone1000"
@@ -11,7 +11,7 @@ SRC_URI:remove = " \
"
TFA_DEBUG = "1"
-TFA_UBOOT = "1"
+TFA_UBOOT ?= "1"
TFA_MBEDTLS = "1"
TFA_BUILD_TARGET = "bl2 bl31 fip"
new file mode 100644
@@ -0,0 +1,53 @@
+DESCRIPTION = "Trusted Firmware-A tests(aka TFTF)"
+LICENSE = "BSD-3-Clause & NCSA"
+
+LIC_FILES_CHKSUM += "file://docs/license.rst;md5=6175cc0aa2e63b6d21a32aa0ee7d1b4a"
+
+inherit deploy
+
+COMPATIBLE_MACHINE ?= "invalid"
+
+SRC_URI = "git://git.trustedfirmware.org/TF-A/tf-a-tests.git;protocol=https;branch=master"
+# post v2.6 snapshot
+SRCREV ?= "af5a517ae9f295455122109100fe5d55668e8eaf"
+PV .= "+git${SRCPV}"
+
+DEPENDS += "optee-os"
+
+EXTRA_OEMAKE += "USE_NVM=0"
+EXTRA_OEMAKE += "SHELL_COLOR=1"
+EXTRA_OEMAKE += "DEBUG=1"
+
+# Platform must be set for each machine
+TFA_PLATFORM ?= "invalid"
+
+EXTRA_OEMAKE += "ARCH=aarch64"
+EXTRA_OEMAKE += "LOG_LEVEL=50"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
+
+# Add platform parameter
+EXTRA_OEMAKE += "BUILD_BASE=${B} PLAT=${TFA_PLATFORM}"
+
+# Requires CROSS_COMPILE set by hand as there is no configure script
+export CROSS_COMPILE="${TARGET_PREFIX}"
+
+do_compile() {
+ oe_runmake -C ${S} tftf
+}
+
+do_compile[cleandirs] = "${B}"
+
+FILES:${PN} = "/firmware/tftf.bin"
+SYSROOT_DIRS += "/firmware"
+
+do_install() {
+ install -d -m 755 ${D}/firmware
+ install -m 0644 ${B}/${TFA_PLATFORM}/debug/tftf.bin ${D}/firmware/tftf.bin
+}
+
+do_deploy() {
+ cp -rf ${D}/firmware/* ${DEPLOYDIR}/
+}
+addtask deploy after do_install
@@ -135,6 +135,10 @@ EXTRA_OEMAKE += "${@bb.utils.contains('TFA_UBOOT', '1', 'BL33=${DEPLOY_DIR_IMAGE
DEPENDS += " ${@bb.utils.contains('TFA_UEFI', '1', 'edk2-firmware', '', d)}"
EXTRA_OEMAKE += "${@bb.utils.contains('TFA_UEFI', '1', 'BL33=${RECIPE_SYSROOT}/firmware/uefi.bin', '', d)}"
+# TFTF test support
+DEPENDS += " ${@bb.utils.contains('TFTF_TESTS', '1', 'tf-a-tests', '', d)}"
+EXTRA_OEMAKE += "${@bb.utils.contains('TFTF_TESTS', '1', 'BL33=${RECIPE_SYSROOT}/firmware/tftf.bin', '',d)}"
+
# Hafnium support
SEL2_SPMC = "${@'${TFA_SPMD_SPM_AT_SEL2}' if d.getVar('TFA_SPD', True) == 'spmd' else ''}"