diff mbox series

[1/6] machine/corstone1000: Add Cortex‑A320 support

Message ID 20251204152500.78818-2-hugues.kambampiana@arm.com
State New
Headers show
Series Initial support for Corstone-1000 with Cortex-A320 target platform | expand

Commit Message

Hugues KAMBA MPIANA Dec. 4, 2025, 3:19 p.m. UTC
Enable the Corstone‑1000 Cortex‑A320 variant by:

- Introduce `machine/include/corstone1000-a320.inc` to configure the
  default Ethos‑U MAC count when `cortexa320` is in MACHINE_FEATURES,
  and allow override via `ETHOSU_NUM_MACS`.
- Add a KAS profile at `kas/corstone1000-a320.yml` for Cortex‑A320
  FVP-based builds.
- Extend corstone1000.inc to detect MACHINE_FEATURES (cortexa320) and
  pull in the matching tune-<core>.inc (default still Cortex-A35).
- Add the `meta-ethos` layer as a dependency of `meta-arm-bsp` for
  Cortex‑A320 builds and define a new KMachine override to pull in
  the Ethos‑U driver recipe.
- In `conf/machine/corstone1000-fvp.conf`, inspect `MACHINE_FEATURES`
  and set `FVP_EXE` to `FVP_Corstone-1000_with_Cortex-A320` when
  `cortexa320` is enabled, otherwise fall back to `FVP_Corstone-1000`.
- In `recipes-devtools/fvp/fvp-corstone1000.bb`, add a
  `SRC_URI:cortexa320` entry (with checksums) for the Cortex‑A320 FVP
  build archive.
- Disable the rootfs CPIO file compression so it is not compressed
  twice when bundled with the kernel

Signed-off-by: Michael Safwat <michael.safwat@arm.com>
Signed-off-by: Frazer Carsley <frazer.carsley@arm.com>
Signed-off-by: Hugues KAMBA MPIANA <hugues.kambampiana@arm.com>
---
 kas/corstone1000-a320.yml                     | 17 +++++++++++++
 meta-arm-bsp/conf/layer.conf                  |  1 +
 .../conf/machine/corstone1000-fvp.conf        |  4 ++++
 .../machine/include/corstone1000-a320.inc     |  5 ++++
 .../conf/machine/include/corstone1000.inc     |  4 +++-
 .../linux/files/corstone1000/defconfig        |  1 +
 .../linux/linux-arm-platforms.inc             | 22 +++++++++++++++--
 .../recipes-devtools/fvp/fvp-corstone1000.bb  | 24 +++++++++++++++----
 8 files changed, 70 insertions(+), 8 deletions(-)
 create mode 100644 kas/corstone1000-a320.yml
 create mode 100644 meta-arm-bsp/conf/machine/include/corstone1000-a320.inc
diff mbox series

Patch

diff --git a/kas/corstone1000-a320.yml b/kas/corstone1000-a320.yml
new file mode 100644
index 00000000..8a7739af
--- /dev/null
+++ b/kas/corstone1000-a320.yml
@@ -0,0 +1,17 @@ 
+# yaml-language-server: $schema=https://raw.githubusercontent.com/siemens/kas/master/kas/schema-kas.json
+
+header:
+  version: 14
+
+local_conf_header:
+  a320: |
+    MACHINE_FEATURES += "cortexa320"
+    OVERRIDES .= ":cortexa320"
+
+repos:
+  meta-ethos:
+    url: https://gitlab.arm.com/iot/meta-ethos.git
+    branch: whinlatter
+  meta-sca:
+    url: https://github.com/priv-kweihmann/meta-sca.git
+    branch: master
diff --git a/meta-arm-bsp/conf/layer.conf b/meta-arm-bsp/conf/layer.conf
index 655a8c96..a06d27d9 100644
--- a/meta-arm-bsp/conf/layer.conf
+++ b/meta-arm-bsp/conf/layer.conf
@@ -14,6 +14,7 @@  LAYERSERIES_COMPAT_meta-arm-bsp = "walnascar whinlatter"
 LAYERDEPENDS_meta-arm-bsp = "core meta-arm"
 # This won't be used by layerindex-fetch, but works everywhere else
 LAYERDEPENDS_meta-arm-bsp:append:corstone1000 = " meta-python openembedded-layer efi-secure-boot"
+LAYERDEPENDS_meta-arm-bsp:append:corstone1000:cortexa320 = " meta-ethos"
 LAYERDEPENDS_meta-arm-bsp:append:musca-b1 = " meta-python"
 LAYERDEPENDS_meta-arm-bsp:append:musca-s1 = " meta-python"
 
diff --git a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
index c951de68..9fa2a63d 100644
--- a/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
+++ b/meta-arm-bsp/conf/machine/corstone1000-fvp.conf
@@ -6,6 +6,9 @@  require conf/machine/include/corstone1000.inc
 require ${@bb.utils.contains('MACHINE_FEATURES', 'corstone1000-extsys', \
     'conf/machine/include/corstone1000-extsys.inc', '', d)}
 
+require ${@bb.utils.contains('MACHINE_FEATURES', 'cortexa320', \
+    'conf/machine/include/corstone1000-a320.inc', '', d)}
+
 TFA_TARGET_PLATFORM = "fvp"
 
 TFM_PLATFORM_IS_FVP = "TRUE"
@@ -20,6 +23,7 @@  DEFAULT_TEST_SUITES:append = " fvp_boot fvp_devices"
 # FVP Config
 FVP_PROVIDER ?= "fvp-corstone1000-native"
 FVP_EXE ?= "FVP_Corstone-1000"
+FVP_EXE:cortexa320 = "FVP_Corstone-1000-A320"
 FVP_CONSOLES[default] = "host_terminal_0"
 FVP_CONSOLES[tf-a] = "host_terminal_1"
 FVP_CONSOLES[se] = "secenc_terminal"
diff --git a/meta-arm-bsp/conf/machine/include/corstone1000-a320.inc b/meta-arm-bsp/conf/machine/include/corstone1000-a320.inc
new file mode 100644
index 00000000..c7ff2df7
--- /dev/null
+++ b/meta-arm-bsp/conf/machine/include/corstone1000-a320.inc
@@ -0,0 +1,5 @@ 
+ETHOSU_NUM_MACS ?= "256"
+
+FVP_CONFIG[host.ethosu.num_macs] = "${ETHOSU_NUM_MACS}"
+
+IMAGE_INSTALL:append = " arm-npu-ethosu"
diff --git a/meta-arm-bsp/conf/machine/include/corstone1000.inc b/meta-arm-bsp/conf/machine/include/corstone1000.inc
index 6027b633..09468c7c 100644
--- a/meta-arm-bsp/conf/machine/include/corstone1000.inc
+++ b/meta-arm-bsp/conf/machine/include/corstone1000.inc
@@ -1,4 +1,6 @@ 
-require conf/machine/include/arm/armv8a/tune-cortexa35.inc
+TUNE_FILE = "conf/machine/include/arm/armv8a/tune-cortexa35.inc"
+TUNE_FILE:cortexa320 = "conf/machine/include/arm/arch-armv9-2a.inc"
+require ${TUNE_FILE}
 
 MACHINEOVERRIDES =. "corstone1000:"
 
diff --git a/meta-arm-bsp/recipes-kernel/linux/files/corstone1000/defconfig b/meta-arm-bsp/recipes-kernel/linux/files/corstone1000/defconfig
index d67e9484..bf4be697 100644
--- a/meta-arm-bsp/recipes-kernel/linux/files/corstone1000/defconfig
+++ b/meta-arm-bsp/recipes-kernel/linux/files/corstone1000/defconfig
@@ -122,3 +122,4 @@  CONFIG_EXT4_FS=y
 # CONFIG_EXT4_FS_POSIX_ACL is not set
 # CONFIG_EXT4_FS_SECURITY is not set
 # CONFIG_EXT4_DEBUG is not set
+CONFIG_INITRAMFS_COMPRESSION_NONE=y
diff --git a/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc b/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc
index 8e964e17..ff19169e 100644
--- a/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc
+++ b/meta-arm-bsp/recipes-kernel/linux/linux-arm-platforms.inc
@@ -24,8 +24,6 @@  COMPATIBLE_MACHINE:corstone1000 = "${MACHINE}"
 KCONFIG_MODE:corstone1000 = "--alldefconfig"
 KMACHINE:corstone1000 = "corstone1000"
 LINUX_KERNEL_TYPE:corstone1000 = "standard"
-#disabling the rootfs cpio file compression so it is not compressed twice when bundled with the kernel
-KERNEL_EXTRA_ARGS:corstone1000 += "CONFIG_INITRAMFS_COMPRESSION_NONE=y"
 SRC_URI:append:corstone1000 = " \
            file://defconfig  \
         "
@@ -57,6 +55,26 @@  SRC_URI:append:corstone1000 = " \
 KERNEL_EXTRA_FEATURES:corstone1000 = ""
 KERNEL_FEATURES:corstone1000 = ""
 
+#
+# Corstone1000 with CORTEX-A320 KMACHINE
+#
+FILESEXTRAPATHS:prepend:cortexa320 := "${ARMBSPFILESPATHS}"
+COMPATIBLE_MACHINE:corstone1000:cortexa320 = "${MACHINE}"
+KCONFIG_MODE:corstone1000:cortexa320 = "--alldefconfig"
+KMACHINE:corstone1000:cortexa320 = "corstone1000-a320"
+LINUX_KERNEL_TYPE:corstone1000:cortexa320 = "standard"
+SRC_URI:append:corstone1000:cortexa320 = " \
+    file://defconfig  \
+"
+
+# Default kernel features not needed for Corstone-1000 with
+# Cortex-A320; otherwise the extra kernel modules will
+# increase the rootfs size but the board has limited flash
+# memory constraints
+KERNEL_EXTRA_FEATURES:corstone1000:cortexa320 = ""
+KERNEL_FEATURES:corstone1000:cortexa320 = ""
+
+
 #
 # FVP BASE KMACHINE
 #
diff --git a/meta-arm/recipes-devtools/fvp/fvp-corstone1000.bb b/meta-arm/recipes-devtools/fvp/fvp-corstone1000.bb
index e200d94c..1cf8a457 100644
--- a/meta-arm/recipes-devtools/fvp/fvp-corstone1000.bb
+++ b/meta-arm/recipes-devtools/fvp/fvp-corstone1000.bb
@@ -1,17 +1,31 @@ 
 require fvp-ecosystem.inc
 
 MODEL = "Corstone-1000"
+MODEL:cortexa320 = "Corstone-1000-with-Cortex-A320"
 MODEL_CODE = "FVP_Corstone_1000"
+MODEL_CODE:cortexa320 = "FVP_Corstone_1000-A320"
 PV = "11.23.25"
+PV:cortexa320 = "11.30.27"
+
+FVP_AARCH64_SHA256SUM = "e299e81d5fa8b3d2afee0850fd03be31c1a1c3fad07f79849c63e46ee5e36acc"
+FVP_AARCH64_SHA256SUM:cortexa320 = "a45898fead5549779153263c3544fa1032c285d532275eb678f58cae3317b01f"
+FVP_X86_64_SHA256SUM = "ec34c9564ccb5b1eb62fc2757673343a353db1d116a7cb1b5f82f9d985d99cdf"
+FVP_X86_64_SHA256SUM:cortexa320 = "d57b248a1c1bc5a6040605d50af94a5151adc4da26ec9acc456ec86b819ffb76"
+
+SRC_URI = "https://developer.arm.com/-/cdn-downloads/permalink/FVPs-Corstone-IoT/${MODEL}/${MODEL_CODE}_${PV_URL}_${FVP_ARCH}.tgz;subdir=${BP};name=fvp-${HOST_ARCH}"
+SRC_URI[fvp-aarch64.sha256sum] = "${FVP_AARCH64_SHA256SUM}"
+SRC_URI[fvp-x86_64.sha256sum] = "${FVP_X86_64_SHA256SUM}"
 
-SRC_URI = "https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/${MODEL}/${MODEL_CODE}_${PV_URL}_${FVP_ARCH}.tgz;subdir=${BP};name=fvp-${HOST_ARCH}"
-SRC_URI[fvp-aarch64.sha256sum] = "e299e81d5fa8b3d2afee0850fd03be31c1a1c3fad07f79849c63e46ee5e36acc"
-SRC_URI[fvp-x86_64.sha256sum] = "ec34c9564ccb5b1eb62fc2757673343a353db1d116a7cb1b5f82f9d985d99cdf"
 
 # The CSS used in the FVP homepage make it too difficult to query with the tooling currently in Yocto
 UPSTREAM_VERSION_UNKNOWN = "1"
 
-LIC_FILES_CHKSUM = "file://license_terms/license_agreement.txt;md5=1a33828e132ba71861c11688dbb0bd16 \
-                    file://license_terms/third_party_licenses/third_party_licenses.txt;md5=0c32ac6f58ebff83065105042ab98211"
+LIC_FILES_CHKSUM_MD5 = "0c32ac6f58ebff83065105042ab98211"
+LIC_FILES_CHKSUM_MD5:cortexa320 = "a5ce56e117d0ab63791fbb7c35ec2211"
+
+LIC_FILES_CHKSUM = "\
+    file://license_terms/license_agreement.txt;md5=1a33828e132ba71861c11688dbb0bd16 \
+    file://license_terms/third_party_licenses/third_party_licenses.txt;md5=${LIC_FILES_CHKSUM_MD5} \
+"
 
 COMPATIBLE_HOST = "(aarch64|x86_64).*-linux"