Skip to contentSkip to conversation

arm-bsp/u-boot: fix Corstone1000 FVP detection in patch set

PATCH Applied Michael Safwat 2 participants 3 messages Apr 27 – May 3

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm-bsp/u-boot: fix Corstone1000 FVP detection in patch set

Update the Corstone1000 U-Boot patches to detect FVP platforms by matching "fvp" in the device tree name instead of relying on the exact arm/corstone1000-fvp string.

This fixes FVP-specific handling for Corstone1000 variants, including capsule image selection and virtio setup.

Also restore CONFIG_BOARD_LATE_INIT in the Corstone1000 defconfigs, since the virtio probing runs from board_late_init() and would otherwise never execute.

---
 ...corstone1000-Enable-virtio-net-support.patch | 17 +++++++++++++----
 ...00-a320-Add-Corstone1000-board-variant.patch | 15 ++++++++-------
 2 files changed, 21 insertions(+), 11 deletions(-)
meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0030-corstone1000-Enable-virtio-net-support.patch +13 -4
index b9007b7c..f166633c 100644
@@ -7,12 +7,13 @@ Add virtio-net support in Corstone1000 FVP
 
 Signed-off-by: Emekcan Aras <[email protected]>
 Signed-off-by: Abdellatif El Khlifi <[email protected]>
+Signed-off-by: Michael Safwat <[email protected]>
 Upstream-Status: Pending [Not submitted to upstream yet]
 ---
  arch/arm/dts/corstone1000-fvp.dts        |  6 ++++
  board/armltd/corstone1000/corstone1000.c | 42 ++++++++++++++++++++----
- configs/corstone1000_defconfig           |  2 ++
- 3 files changed, 44 insertions(+), 6 deletions(-)
+ configs/corstone1000_defconfig           |  3 ++
+ 3 files changed, 45 insertions(+), 6 deletions(-)
 
 diff --git a/arch/arm/dts/corstone1000-fvp.dts b/arch/arm/dts/corstone1000-fvp.dts
 index 3076fb9f344..cd8a132271e 100644
@@ -97,10 +98,18 @@ index 9189640ef75..39fd10ed653 100644
 +	return 0;
 +}
 diff --git a/configs/corstone1000_defconfig b/configs/corstone1000_defconfig
-index 00c3bb5f557..450d69762ab 100644
+index 00c3bb5f557..4ec23b4af1c 100644
 --- a/configs/corstone1000_defconfig
 +++ b/configs/corstone1000_defconfig
-@@ -78,6 +78,8 @@ CONFIG_TEE=y
+@@ -37,6 +37,7 @@ CONFIG_LOGLEVEL=7
+ # CONFIG_DISPLAY_CPUINFO is not set
+ # CONFIG_DISPLAY_BOARDINFO is not set
+ CONFIG_BOARD_INIT=y
++CONFIG_BOARD_LATE_INIT=y
+ CONFIG_SYS_PROMPT="corstone1000# "
+ # CONFIG_CMD_CONSOLE is not set
+ CONFIG_CMD_FWU_METADATA=y
+@@ -78,6 +79,8 @@ CONFIG_TEE=y
  CONFIG_OPTEE=y
  CONFIG_USB=y
  CONFIG_USB_ISP1760=y
meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0039-corstone1000-a320-Add-Corstone1000-board-variant.patch +8 -7
index 59bf7aa2..5b2240ce 100644
@@ -50,9 +50,9 @@ Signed-off-by: Michael Safwat <[email protected]>
  board/armltd/corstone1000-a320/Kconfig        |  12 +
  board/armltd/corstone1000-a320/MAINTAINERS    |   7 +
  board/armltd/corstone1000/corstone1000.c      |   6 +-
- configs/corstone1000-a320_defconfig           |  89 ++++++++
+ configs/corstone1000-a320_defconfig           |  90 ++++++++
  .../arm/arm,corstone1000-a320.yml             |  31 +++
- 9 files changed, 405 insertions(+), 3 deletions(-)
+ 9 files changed, 406 insertions(+), 3 deletions(-)
  create mode 100644 arch/arm/dts/corstone1000-a320-fvp.dts
  create mode 100644 arch/arm/dts/corstone1000-a320.dtsi
  create mode 100644 board/armltd/corstone1000-a320/Kconfig
@@ -400,7 +400,7 @@ index 00000000000..e62978b487e
 +F:	board/armltd/corstone1000-a320/
 +F:	configs/corstone1000-a320_defconfig
 diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c
-index db8919298e1..0557865f59b 100644
+index db8919298e1..2f65eac7bf4 100644
 --- a/board/armltd/corstone1000/corstone1000.c
 +++ b/board/armltd/corstone1000/corstone1000.c
 @@ -1,6 +1,6 @@
@@ -416,7 +416,7 @@ index db8919298e1..0557865f59b 100644
  {
  #if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
 -	if (!strcmp(DEVICE_TREE, "arm/corstone1000-fvp"))
-+	if (!strstr(DEVICE_TREE, "fvp"))
++	if (strstr(DEVICE_TREE, "fvp"))
  		update_info.images = fw_fvp_images;
  	else
  		update_info.images = fw_mps3_images;
@@ -425,16 +425,16 @@ index db8919298e1..0557865f59b 100644
  	int ret;
  
 -	if (!strcmp(cmp_dtb, "arm/corstone1000-fvp")) {
-+	if (!strstr(cmp_dtb, "fvp")) {
++	if (strstr(cmp_dtb, "fvp")) {
  		ret = uclass_first_device_err(UCLASS_VIRTIO, &virtio_bus);
  		if (!virtio_bus) {
  			log_err("Cannot find virtio device, err (%d)\n", ret);
 diff --git a/configs/corstone1000-a320_defconfig b/configs/corstone1000-a320_defconfig
 new file mode 100644
-index 00000000000..d0ae1e745db
+index 00000000000..c7636bf45f8
 --- /dev/null
 +++ b/configs/corstone1000-a320_defconfig
-@@ -0,0 +1,89 @@
+@@ -0,0 +1,90 @@
 +CONFIG_ARM=y
 +CONFIG_SKIP_LOWLEVEL_INIT=y
 +CONFIG_TARGET_CORSTONE1000=y
@@ -474,6 +474,7 @@ index 00000000000..d0ae1e745db
 +# CONFIG_DISPLAY_CPUINFO is not set
 +# CONFIG_DISPLAY_BOARDINFO is not set
 +CONFIG_BOARD_INIT=y
++CONFIG_BOARD_LATE_INIT=y
 +CONFIG_SYS_PROMPT="corstone1000# "
 +# CONFIG_CMD_CONSOLE is not set
 +CONFIG_CMD_FWU_METADATA=y
#1 lore raw

PATCH 2/2 arm-bsp/u-boot: corstone1000: disable EFI debug support

Add a U-Boot patch to disable CONFIG_EFI_DEBUG_SUPPORT in the Corstone1000 defconfigs.

EFI debug support is now enabled by default and changes the EFI memory layout. On Corstone1000 this can cause a boot failure after ExitBootServices(), reproduced on the Cortex-A320 FVP path with MTE enabled.

---
 .../u-boot/u-boot-corstone1000.inc            |  5 ++
 ...rstone1000-disable-EFI-debug-support.patch | 46 +++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0040-configs-corstone1000-disable-EFI-debug-support.patch
meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc +5 -0
index 9660fbc6..e3dec3c0 100644
@@ -81,6 +81,11 @@ SRC_URI:append = " \
     file://0039-corstone1000-a320-Add-Corstone1000-board-variant.patch \
 "
 
+# Disable the debug feature
+SRC_URI:append = " \
+    file://0040-configs-corstone1000-disable-EFI-debug-support.patch \
+"
+
 uboot_configure_config:append() {
    openssl req -x509 -sha256 -newkey rsa:2048 -subj /CN=CRT/ -keyout ${B}/CRT.key -out ${S}/CRT.crt -nodes -days 365
 }
meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0040-configs-corstone1000-disable-EFI-debug-support.patch new file +46 -0

46 lines not on this page · raw message

Applied
#2 lore raw
In reply to Michael Safwat
Quoted 8 lines · Michael Safwat

Update the Corstone1000 U-Boot patches to detect FVP platforms by matching "fvp" in the device tree name instead of relying on the exact arm/corstone1000-fvp string.

This fixes FVP-specific handling for Corstone1000 variants, including capsule image selection and virtio setup.

[...]

Applied, thanks!

[1/2] arm-bsp/u-boot: fix Corstone1000 FVP detection in patch set

      commit: 325134ea69f74df439d56ee00b97947a3a4dce77
[2/2] arm-bsp/u-boot: corstone1000: disable EFI debug support
      commit: eb9b2afff9e2f5136274c9bbbf6b711716db1098

Best regards,

Signature · 1 line
Jon Mason <[email protected]>