diff mbox series

[1/1] arm-bsp/corstone1000: Ensures external-system only built when enabled.

Message ID 20250721131641.149839-1-frazer.carsley@arm.com
State New
Headers show
Series [1/1] arm-bsp/corstone1000: Ensures external-system only built when enabled. | expand

Commit Message

Frazer Carsley July 21, 2025, 1:16 p.m. UTC
The external-system component was marked as a dependency for the
corstone1000-recovery image regardless of whether external-system was
requested or not. This ensures that is no longer the case.

Signed-off-by: Frazer Carsley <frazer.carsley@arm.com>
---
 kas/corstone1000-extsys.yml                                  | 3 +++
 kas/corstone1000-image-configuration.yml                     | 3 ---
 meta-arm-bsp/conf/machine/corstone1000-fvp.conf              | 3 ++-
 .../images/corstone1000-firmware-deploy-image.inc            | 5 ++++-
 .../recipes-bsp/images/corstone1000-flash-firmware-image.bb  | 3 ++-
 5 files changed, 11 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/kas/corstone1000-extsys.yml b/kas/corstone1000-extsys.yml
index 0534b09c..6e795654 100644
--- a/kas/corstone1000-extsys.yml
+++ b/kas/corstone1000-extsys.yml
@@ -4,3 +4,6 @@  header:
 local_conf_header:
   extsys: |
     MACHINE_FEATURES += "corstone1000-extsys"
+
+    # external system firmware
+    CORE_IMAGE_EXTRA_INSTALL:firmware += "external-system-elf"
diff --git a/kas/corstone1000-image-configuration.yml b/kas/corstone1000-image-configuration.yml
index 4c3172a5..f955d7ab 100644
--- a/kas/corstone1000-image-configuration.yml
+++ b/kas/corstone1000-image-configuration.yml
@@ -40,9 +40,6 @@  local_conf_header:
     CORE_IMAGE_EXTRA_INSTALL += "packagegroup-ts-tests-psa"
     CORE_IMAGE_EXTRA_INSTALL:firmware += "packagegroup-ts-tests-psa"
 
-    # external system firmware
-    CORE_IMAGE_EXTRA_INSTALL:firmware += "external-system-elf"
-
   capsule: |
     CAPSULE_EXTENSION = "uefi.capsule"
     CAPSULE_FW_VERSION = "6"
diff --git a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
index a605a695..df0275ef 100644
--- a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
+++ b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
@@ -42,7 +42,8 @@  FVP_CONFIG[se.cryptocell.USER_OTP_FILTERING_DISABLE] ?= "1"
 FVP_DATA ?= "board.flash0=corstone1000-flash-firmware-image-${MACHINE}.wic@0x68000000"
 
 # External system (cortex-M3)
-FVP_CONFIG[extsys_harness0.extsys_flashloader.fname] ?= "es_flashfw.bin"
+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"
diff --git a/meta-arm-bsp/recipes-bsp/images/corstone1000-firmware-deploy-image.inc b/meta-arm-bsp/recipes-bsp/images/corstone1000-firmware-deploy-image.inc
index f959573d..dfd88971 100644
--- a/meta-arm-bsp/recipes-bsp/images/corstone1000-firmware-deploy-image.inc
+++ b/meta-arm-bsp/recipes-bsp/images/corstone1000-firmware-deploy-image.inc
@@ -2,7 +2,10 @@  COMPATIBLE_MACHINE = "corstone1000"
 
 FIRMWARE_BINARIES = "corstone1000-flash-firmware-image-${MACHINE}.wic \
                      bl1.bin \
-                     es_flashfw.bin \
+                     ${@bb.utils.contains('MACHINE_FEATURES', \
+                                          'corstone1000-extsys', \
+                                          'es_flashfw.bin', \
+                                          '', d)} \
                      ${CAPSULE_NAME}.${CAPSULE_EXTENSION} \
                      corstone1000_capsule_cert.crt \
                      corstone1000_capsule_key.key \
diff --git a/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb b/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb
index 73cc32aa..5d313c7b 100644
--- a/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb
+++ b/meta-arm-bsp/recipes-bsp/images/corstone1000-flash-firmware-image.bb
@@ -14,7 +14,8 @@  inherit tfm_sign_image
 inherit uefi_capsule
 inherit deploy
 
-DEPENDS += "external-system \
+DEPENDS += "${@bb.utils.contains('MACHINE_FEATURES', 'corstone1000-extsys', \
+                                 'external-system', '', d)} \
             trusted-firmware-a \
             trusted-firmware-m \
             u-boot \