[PATCH 3/3] arm-bsp/corstone1000: Extract External System FVP options

Hugues KAMBA MPIANA <[email protected]>
Newsgroups org.yoctoproject.lists.meta-arm
Message-ID <[email protected]>
From: Michael Safwat <[email protected]>

- Introduce new file `corstone1000-extsys.inc` to define variables related
  to the external system.
- Ensure this file is included only when MACHINE_FEATURES do contain
  corstone1000-extsys.

This change makes external system configuration modular and only applied
when explicitly enabled through machine features.

Signed-off-by: Michael Safwat <[email protected]>
---
 meta-arm-bsp/conf/machine/corstone1000-fvp.conf           | 8 +++-----
 meta-arm-bsp/conf/machine/include/corstone1000-extsys.inc | 6 ++++++
 2 files changed, 9 insertions(+), 5 deletions(-)
 create mode 100644 meta-arm-bsp/conf/machine/include/corstone1000-extsys.inc

diff --git a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
index b897931c..c951de68 100644
--- a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
+++ b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
@@ -3,6 +3,9 @@
 #@DESCRIPTION: Machine configuration for Corstone1000 64-bit FVP
 require conf/machine/include/corstone1000.inc
 
+require ${@bb.utils.contains('MACHINE_FEATURES', 'corstone1000-extsys', \
+    'conf/machine/include/corstone1000-extsys.inc', '', d)}
+
 TFA_TARGET_PLATFORM = "fvp"
 
 TFM_PLATFORM_IS_FVP = "TRUE"
@@ -20,7 +23,6 @@ FVP_EXE ?= "FVP_Corstone-1000"
 FVP_CONSOLES[default] = "host_terminal_0"
 FVP_CONSOLES[tf-a] = "host_terminal_1"
 FVP_CONSOLES[se] = "secenc_terminal"
-FVP_CONSOLES[extsys] = "extsys_terminal"
 
 #Disable Time Annotation
 FASTSIM_DISABLE_TA = "0"
@@ -43,15 +45,11 @@ FVP_CONFIG[se.cryptocell.USER_OTP_FILTERING_DISABLE] ?= "1"
 # Boot image
 FVP_DATA ?= "board.flash0=corstone1000-flash-firmware-image-${MACHINE}.wic@0x68000000"
 
-# External system (cortex-M3)
-FVP_CONFIG[extsys_harness0.extsys_flashloader.fname] ?= "${@bb.utils.contains(\
-    'MACHINE_FEATURES', 'corstone1000-extsys', 'es_flashfw.bin', '', d)}"
 
 # FVP Terminals
 FVP_TERMINALS[host.host_terminal_0] ?= "Normal World Console"
 FVP_TERMINALS[host.host_terminal_1] ?= "Secure World Console"
 FVP_TERMINALS[se.secenc_terminal] ?= "Secure Enclave Console"
-FVP_TERMINALS[extsys0.extsys_terminal] ?= "Cortex M3"
 
 # MMC card configuration
 FVP_CONFIG[board.msd_mmc.card_type] ?= "SDHC"
diff --git a/meta-arm-bsp/conf/machine/include/corstone1000-extsys.inc b/meta-arm-bsp/conf/machine/include/corstone1000-extsys.inc
new file mode 100644
index 00000000..1b4d7197
--- /dev/null
+++ b/meta-arm-bsp/conf/machine/include/corstone1000-extsys.inc
@@ -0,0 +1,6 @@
+
+FVP_CONSOLES[extsys] = "extsys_terminal"
+
+FVP_CONFIG[extsys_harness0.extsys_flashloader.fname] = "es_flashfw.bin"
+
+FVP_TERMINALS[extsys0.extsys_terminal] = "Cortex M3"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.