[meta-arm,v2,4/9] arm-bsp/trusted-firmware-a: adding support for corstone700 platform

Submitted by abdellatif.elkhlifi@arm.com on Aug. 13, 2020, 2:52 p.m. | Patch ID: 175301

Details

Message ID 20200813145230.22140-5-abdellatif.elkhlifi@arm.com
State New
Headers show

Commit Message

abdellatif.elkhlifi@arm.com Aug. 13, 2020, 2:52 p.m.
From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>

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 <rui.silva@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
---
 .../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

Patch hide | download patch | download mbox

diff --git a/meta-arm-bsp/conf/machine/corstone700-fvp.conf b/meta-arm-bsp/conf/machine/corstone700-fvp.conf
index a968b39..2ee3b52 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 67cf153..495fc30 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 0000000..175e333
--- /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 8743ec5..0e6fb1e 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}