From 30aa72f516d023f008b5776d1fa1dd9e2caa21e0 Mon Sep 17 00:00:00 2001 From: Abdellatif El Khlifi Date: Thu, 13 Aug 2020 15:52:25 +0100 Subject: [PATCH] arm-bsp/trusted-firmware-a: adding support for corstone700 platform This commit adds support for trusted-firmware-a to the corstone700 platform. The trusted-firmware-a runs on the host processor. Change-Id: I70ae2715e640bf50c756229a734dcb663c2d8e4d Signed-off-by: Rui Miguel Silva Signed-off-by: Abdellatif El Khlifi Signed-off-by: Jon Mason --- .../conf/machine/corstone700-fvp.conf | 2 ++ .../conf/machine/include/corstone700.inc | 11 +++++++- .../trusted-firmware-a-corstone700.inc | 26 +++++++++++++++++++ .../trusted-firmware-a_2.3.bbappend | 1 + 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-corstone700.inc diff --git a/meta-arm-bsp/conf/machine/corstone700-fvp.conf b/meta-arm-bsp/conf/machine/corstone700-fvp.conf index a968b394..2ee3b521 100644 --- a/meta-arm-bsp/conf/machine/corstone700-fvp.conf +++ b/meta-arm-bsp/conf/machine/corstone700-fvp.conf @@ -8,3 +8,5 @@ require conf/machine/include/corstone700.inc # add the following line to local.conf to disable the feature: # MACHINE_FEATURES_remove = "eth_lan91c111" MACHINE_FEATURES += "eth_lan91c111" + +TFA_TARGET_PLATFORM = "fvp" diff --git a/meta-arm-bsp/conf/machine/include/corstone700.inc b/meta-arm-bsp/conf/machine/include/corstone700.inc index 67cf1535..495fc304 100644 --- a/meta-arm-bsp/conf/machine/include/corstone700.inc +++ b/meta-arm-bsp/conf/machine/include/corstone700.inc @@ -4,11 +4,20 @@ require conf/machine/include/tune-cortexa32.inc MACHINEOVERRIDES =. "corstone700:" +TFA_PLATFORM = "corstone700" + SERIAL_CONSOLES ?= "115200;ttyAMA0" PREFERRED_PROVIDER_virtual/kernel_corstone700 = "linux-stable" PREFERRED_VERSION_linux-stable ?= "5.6%" -VIRTUAL-RUNTIME_dev_manager = "busybox-mdev" +PREFERRED_PROVIDER_virtual/trusted-firmware-a ?= "trusted-firmware-a" +PREFERRED_VERSION_trusted-firmware-a ?= "2.3%" + +EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a" + +WKS_FILE_DEPENDS_append = " ${EXTRA_IMAGEDEPENDS}" WKS_FILE ?= "arm-reference-image.corstone700.wks" + +VIRTUAL-RUNTIME_dev_manager = "busybox-mdev" diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-corstone700.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-corstone700.inc new file mode 100644 index 00000000..175e333d --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-corstone700.inc @@ -0,0 +1,26 @@ +# Corstone700 machines specific TFA support + +COMPATIBLE_MACHINE = "(corstone700-*)" + +TFA_DEBUG = "1" +TFA_UBOOT = "1" +TFA_BUILD_TARGET = "all fip" +TFA_INSTALL_TARGET = "fip.bin" + +LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" + +# TF-A v2.3 is not used because the following commit is needed: +# corstone700: splitting the platform support into FVP and FPGA +SRCREV_tfa = "ef93cfa3a2591084307a41e64f1cbba327310749" + +PV = "2.3+git${SRCPV}" + +EXTRA_OEMAKE_append = " \ + ARCH=aarch32 \ + TARGET_PLATFORM=${TFA_TARGET_PLATFORM} \ + AARCH32_SP=sp_min \ + ARM_LINUX_KERNEL_AS_BL33=0 \ + RESET_TO_SP_MIN=1 \ + ENABLE_PIE=1 \ + ARM_PRELOADED_DTB_BASE=0x80400000 \ + " diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.3.bbappend b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.3.bbappend index 8743ec56..0e6fb1ea 100644 --- a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.3.bbappend +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.3.bbappend @@ -7,5 +7,6 @@ MACHINE_TFA_REQUIRE_foundation-armv8 = "trusted-firmware-a-fvp.inc" MACHINE_TFA_REQUIRE_fvp-base = "trusted-firmware-a-fvp.inc" MACHINE_TFA_REQUIRE_n1sdp = "trusted-firmware-a-n1sdp.inc" MACHINE_TFA_REQUIRE_juno = "trusted-firmware-a-juno.inc" +MACHINE_TFA_REQUIRE_corstone700 = "trusted-firmware-a-corstone700.inc" require ${MACHINE_TFA_REQUIRE}