[6/6] arm-bsp/u-boot: Enable fdt overlays for fvp-baser-aemv8r64

Message ID 20220422160900.1861031-6-peter.hoyes@arm.com
State New
Headers show
Series [1/6] arm/fvp-base-r-aem: Automatically download FVP tarball | expand

Commit Message

Peter Hoyes April 22, 2022, 4:09 p.m. UTC
From: Peter Hoyes <Peter.Hoyes@arm.com>

Enable the OF_LIBFDT_OVERLAY configuration flag so that U-Boot can apply
fdt overlays using the "fdt apply" command.

This can be used to modify the device tree at runtime to boot a
different payload without changing the firmware.

Issue-Id: SCM-4386
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I6e32c5ce833ca7c61f0f73fc256031564e55f1b8
---
 .../documentation/fvp-baser-aemv8r64.md       |  1 +
 ...e-LIBFDT_OVERLAY-in-the-vexpress_aem.patch | 27 +++++++++++++++++++
 .../recipes-bsp/u-boot/u-boot_%.bbappend      |  1 +
 3 files changed, 29 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0013-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch

Patch

diff --git a/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md b/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md
index 2638502..4e98e42 100644
--- a/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md
+++ b/meta-arm-bsp/documentation/fvp-baser-aemv8r64.md
@@ -234,6 +234,7 @@  Known Issues and Limitations
 
 Change Log
 ----------
+- Enabled the ability for U-Boot to apply device tree overlays
 - Fixed bug in U-Boot that caused changes to the `memory` node in the device
   tree to be ignored.
 - Added boot-wrapper-aarch64 support for booting SMP payloads at S-EL2.
diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0013-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0013-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch
new file mode 100644
index 0000000..2824acc
--- /dev/null
+++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-baser-aemv8r64/0013-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch
@@ -0,0 +1,27 @@ 
+From 0ca75ef2a29f8b37f356af005dac3c83c9b50e2a Mon Sep 17 00:00:00 2001
+From: Peter Hoyes <Peter.Hoyes@arm.com>
+Date: Tue, 22 Feb 2022 15:32:51 +0000
+Subject: [PATCH 2/2] vexpress64: Enable LIBFDT_OVERLAY in the vexpress_aemv8r
+ defconfig
+
+Issue-Id: SCM-3874
+Upstream-Status: Inappropriate [other]
+  Implementation pending further discussion
+Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
+Change-Id: Ide0532cf2de89f1bca9c8d4bd2ed0c1a1c57599f
+---
+ configs/vexpress_aemv8r_defconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configs/vexpress_aemv8r_defconfig b/configs/vexpress_aemv8r_defconfig
+index 37c393b66f..aff34e86b0 100644
+--- a/configs/vexpress_aemv8r_defconfig
++++ b/configs/vexpress_aemv8r_defconfig
+@@ -25,3 +25,4 @@ CONFIG_ARMV8_SWITCH_TO_EL1=y
+ CONFIG_ARMV8_DISABLE_HVC=n
+ CONFIG_ARMV8_EXCEPTION_VECTORS=n
+ CONFIG_ARCH_FIXUP_FDT_MEMORY=n
++CONFIG_OF_LIBFDT_OVERLAY=y
+-- 
+2.25.1
+
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 db395fe..f7336ad 100644
--- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend
+++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend
@@ -72,6 +72,7 @@  SRC_URI:append:fvp-baser-aemv8r64 = " \
     file://0010-vexpress64-Do-not-set-COUNTER_FREQUENCY.patch \
     file://0011-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch \
     file://0012-vexpress64-Configure-memory-using-device-tree.patch \
+    file://0013-vexpress64-Enable-LIBFDT_OVERLAY-in-the-vexpress_aem.patch \
     "
 
 #