diff mbox series

[1/3] arm-bsp/fvp-base: update to u-boot 2023.01

Message ID 20230307161650.476217-1-jon.mason@arm.com
State New
Headers show
Series [1/3] arm-bsp/fvp-base: update to u-boot 2023.01 | expand

Commit Message

Jon Mason March 7, 2023, 4:16 p.m. UTC
Update to the latest version of u-boot.  This requires removing the new
way DRAM is handled, since we don't use dtb the way u-boot is expecting.
Also, change the default bootcmd to make things work (as that expects
env things as well).

Signed-off-by: Jon Mason <jon.mason@arm.com>
---
 meta-arm-bsp/conf/machine/fvp-base.conf       |  2 +-
 ...rt-vexpress64-pick-DRAM-size-from-DT.patch | 44 +++++++++++++++++++
 .../u-boot/u-boot/fvp-base/bootargs.cfg       |  1 +
 .../recipes-bsp/u-boot/u-boot_%.bbappend      |  4 +-
 4 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch

Comments

Jon Mason March 8, 2023, 1:03 p.m. UTC | #1
On Tue, 7 Mar 2023 11:16:48 -0500, Jon Mason wrote:
> Update to the latest version of u-boot.  This requires removing the new
> way DRAM is handled, since we don't use dtb the way u-boot is expecting.
> Also, change the default bootcmd to make things work (as that expects
> env things as well).

Applied, thanks!

[1/3] arm-bsp/fvp-base: update to u-boot 2023.01
      commit: b55cd3d627627f6c3ed1eb95043735af75ddce79
[2/3] arm-bsp/fvp-base-arm32: remove support
      commit: e7c5876380968f1fb40a0f2d9096bfba8c78c09a
[3/3] ci: add external-toolchain to qemuarm-secureboot
      commit: 4bfa191ada5c44baaa1f4b8aabbeb314961c0134

Best regards,
diff mbox series

Patch

diff --git a/meta-arm-bsp/conf/machine/fvp-base.conf b/meta-arm-bsp/conf/machine/fvp-base.conf
index 1ba07082..bc29e888 100644
--- a/meta-arm-bsp/conf/machine/fvp-base.conf
+++ b/meta-arm-bsp/conf/machine/fvp-base.conf
@@ -9,7 +9,7 @@  require conf/machine/include/arm/arch-armv8a.inc
 
 TUNE_FEATURES = "aarch64"
 
-PREFERRED_VERSION_u-boot ?= "2022.04"
+PREFERRED_VERSION_u-boot ?= "2023.01"
 
 # FVP u-boot configuration
 UBOOT_MACHINE = "vexpress_aemv8a_semi_defconfig"
diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch
new file mode 100644
index 00000000..d5516224
--- /dev/null
+++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch
@@ -0,0 +1,44 @@ 
+From 4f649e0a3e0f9ed1f0d6efdff5b14cdc40d84201 Mon Sep 17 00:00:00 2001
+From: Jon Mason <jon.mason@arm.com
+Date: Thu, 2 Mar 2023 15:22:08 +0000
+Subject: [PATCH] Revert "vexpress64: pick DRAM size from DT"
+
+This reverts commit 1a1143a45457161e90ea4cd5f3b0561d924ed8fe.
+
+DRAM is determined via dtb in recent versions.  Since fvp isn't
+reading and specifying a dtb, this fails and hangs u-boot.  Remove this
+and go back to the way things were.
+
+Signed-off-by: Jon Mason <jon.mason@arm.com>
+Upstream-Status: Inappropriate
+---
+ board/armltd/vexpress64/vexpress64.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
+index af326dc6f453..e8ce88b22c5a 100644
+--- a/board/armltd/vexpress64/vexpress64.c
++++ b/board/armltd/vexpress64/vexpress64.c
+@@ -88,12 +88,20 @@ int board_init(void)
+ 
+ int dram_init(void)
+ {
+-	return fdtdec_setup_mem_size_base();
++	gd->ram_size = PHYS_SDRAM_1_SIZE;
++	return 0;
+ }
+ 
+ int dram_init_banksize(void)
+ {
+-	return fdtdec_setup_memory_banksize();
++	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
++	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
++#ifdef PHYS_SDRAM_2
++	gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
++	gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
++#endif
++
++	return 0;
+ }
+ 
+ /* Assigned in lowlevel_init.S
diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg
index 716600f4..13f4cb47 100644
--- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg
+++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg
@@ -1,3 +1,4 @@ 
 CONFIG_BOOTARGS="console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda1 rw rootwait"
+CONFIG_BOOTCOMMAND="booti $kernel_addr_r - $fdt_addr_r"
 # Our FVP support CRC instructions
 CONFIG_ARM64_CRC32=y
diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend b/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend
index 9cc1bcd9..10ba76ae 100644
--- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend
+++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend
@@ -49,7 +49,9 @@  SRC_URI:append:corstone1000 = " \
 #
 # FVP BASE
 #
-SRC_URI:append:fvp-base = " file://bootargs.cfg"
+SRC_URI:append:fvp-base = " file://bootargs.cfg \
+	file://0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch \
+	"
 
 #
 # FVP BASE ARM32