diff mbox series

[1/3] arm/edk2-firmware: update to edk2-stable202411

Message ID 20250320151400.19610-1-jon.mason@arm.com
State New
Headers show
Series [1/3] arm/edk2-firmware: update to edk2-stable202411 | expand

Commit Message

Jon Mason March 20, 2025, 3:13 p.m. UTC
Update to the latest version of edk2.  Unfortunately, sbsa-ref has a
kernel warning due to the CPU topology that was added.  So, hold this
platform back to 202408 and move those recipes to meta-arm-bsp.

Signed-off-by: Jon Mason <jon.mason@arm.com>
---
 meta-arm-bsp/conf/machine/sbsa-ref.conf       |  4 +++
 .../uefi/edk2-basetools-native_202408.bb      |  0
 .../recipes-bsp/uefi/edk2-firmware_202408.bb  |  2 ++
 .../0001-Platform-StMmRpmb-Fix-build.patch    |  0
 .../uefi/edk2-basetools-native_202411.bb      | 26 +++++++++++++++++++
 meta-arm/recipes-bsp/uefi/edk2-firmware.inc   |  1 -
 .../recipes-bsp/uefi/edk2-firmware_202411.bb  |  7 +++++
 ...-in-the-paths-to-the-SBSA-test-suite.patch |  4 +--
 ...02-Enforce-using-good-old-BFD-linker.patch |  6 ++---
 meta-arm/recipes-bsp/uefi/sbsa-acs_7.1.4.bb   |  2 +-
 10 files changed, 45 insertions(+), 7 deletions(-)
 rename {meta-arm => meta-arm-bsp}/recipes-bsp/uefi/edk2-basetools-native_202408.bb (100%)
 rename {meta-arm => meta-arm-bsp}/recipes-bsp/uefi/edk2-firmware_202408.bb (74%)
 rename {meta-arm => meta-arm-bsp}/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch (100%)
 create mode 100644 meta-arm/recipes-bsp/uefi/edk2-basetools-native_202411.bb
 create mode 100644 meta-arm/recipes-bsp/uefi/edk2-firmware_202411.bb
diff mbox series

Patch

diff --git a/meta-arm-bsp/conf/machine/sbsa-ref.conf b/meta-arm-bsp/conf/machine/sbsa-ref.conf
index ccfc45a8e296..116b4276319d 100644
--- a/meta-arm-bsp/conf/machine/sbsa-ref.conf
+++ b/meta-arm-bsp/conf/machine/sbsa-ref.conf
@@ -26,6 +26,10 @@  EFI_PROVIDER ?= "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd-boo
 SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0"
 
 EXTRA_IMAGEDEPENDS += "edk2-firmware"
+# FIXME - Currently seeing a kernel warning for the CPU topology when bumping
+# the version past this.  The issue is being tracked in
+# https://github.com/tianocore/edk2-platforms/issues/752
+PREFERRED_VERSION_edk2-firmware ?= "202408%"
 
 QB_SYSTEM_NAME = "qemu-system-aarch64"
 QB_MACHINE = "-machine sbsa-ref"
diff --git a/meta-arm/recipes-bsp/uefi/edk2-basetools-native_202408.bb b/meta-arm-bsp/recipes-bsp/uefi/edk2-basetools-native_202408.bb
similarity index 100%
rename from meta-arm/recipes-bsp/uefi/edk2-basetools-native_202408.bb
rename to meta-arm-bsp/recipes-bsp/uefi/edk2-basetools-native_202408.bb
diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware_202408.bb b/meta-arm-bsp/recipes-bsp/uefi/edk2-firmware_202408.bb
similarity index 74%
rename from meta-arm/recipes-bsp/uefi/edk2-firmware_202408.bb
rename to meta-arm-bsp/recipes-bsp/uefi/edk2-firmware_202408.bb
index 81bfc0002396..ea03d47ba1ea 100644
--- a/meta-arm/recipes-bsp/uefi/edk2-firmware_202408.bb
+++ b/meta-arm-bsp/recipes-bsp/uefi/edk2-firmware_202408.bb
@@ -1,6 +1,8 @@ 
 SRCREV_edk2           ?= "b158dad150bf02879668f72ce306445250838201"
 SRCREV_edk2-platforms ?= "a3c898956a4d48dc5980336fa6ce6eeb23c4f72b"
 
+SRC_URI += "file://0001-Platform-StMmRpmb-Fix-build.patch;patchdir=edk2-platforms"
+
 # FIXME - clang is having issues with antlr
 TOOLCHAIN:aarch64 = "gcc"
 
diff --git a/meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch b/meta-arm-bsp/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
similarity index 100%
rename from meta-arm/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
rename to meta-arm-bsp/recipes-bsp/uefi/files/0001-Platform-StMmRpmb-Fix-build.patch
diff --git a/meta-arm/recipes-bsp/uefi/edk2-basetools-native_202411.bb b/meta-arm/recipes-bsp/uefi/edk2-basetools-native_202411.bb
new file mode 100644
index 000000000000..d89a79015a83
--- /dev/null
+++ b/meta-arm/recipes-bsp/uefi/edk2-basetools-native_202411.bb
@@ -0,0 +1,26 @@ 
+# Install EDK2 Base Tools in native sysroot. Currently the BaseTools are not
+# built, they are just copied to native sysroot. This is sufficient for
+# generating UEFI capsules as it only depends on some python scripts. Other
+# tools need to be built first before adding to sysroot.
+
+SUMMARY = "EDK2 Base Tools"
+LICENSE = "BSD-2-Clause-Patent"
+
+# EDK2
+SRC_URI = "git://github.com/tianocore/edk2.git;branch=master;protocol=https"
+LIC_FILES_CHKSUM = "file://License.txt;md5=2b415520383f7964e96700ae12b4570a"
+
+SRCREV = "b158dad150bf02879668f72ce306445250838201"
+
+UPSTREAM_CHECK_GITTAGREGEX = "^edk2-stable(?P<pver>\d+)$"
+
+S = "${WORKDIR}/git"
+
+inherit native
+
+RDEPENDS:${PN} += "python3-core"
+
+do_install () {
+    mkdir -p ${D}${bindir}/edk2-BaseTools
+    cp -r ${WORKDIR}/git/BaseTools/* ${D}${bindir}/edk2-BaseTools/
+}
diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
index c10154aae09a..42668d9d9cd6 100644
--- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
+++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc
@@ -20,7 +20,6 @@  SRCBRANCH_edk2_platforms = "master"
 SRC_URI = "\
     ${SRC_URI_EDK2};branch=${SRCBRANCH_edk2_platforms};name=edk2;destsuffix=edk2 \
     ${SRC_URI_EDK2_PLATFORMS};branch=${SRCBRANCH_edk2};name=edk2-platforms;destsuffix=edk2/edk2-platforms \
-    file://0001-Platform-StMmRpmb-Fix-build.patch;patchdir=edk2-platforms \
 "
 
 SRCREV_FORMAT         = "edk2_edk2-platforms"
diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware_202411.bb b/meta-arm/recipes-bsp/uefi/edk2-firmware_202411.bb
new file mode 100644
index 000000000000..5892a485ec1b
--- /dev/null
+++ b/meta-arm/recipes-bsp/uefi/edk2-firmware_202411.bb
@@ -0,0 +1,7 @@ 
+SRCREV_edk2           ?= "0f3867fa6ef0553e26c42f7d71ff6bdb98429742"
+SRCREV_edk2-platforms ?= "2d66a9e048285af8ba4bfe4bdaab37a8e98288b3"
+
+# FIXME - clang is having issues with antlr
+TOOLCHAIN:aarch64 = "gcc"
+
+require recipes-bsp/uefi/edk2-firmware.inc
diff --git a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-Patch-in-the-paths-to-the-SBSA-test-suite.patch b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-Patch-in-the-paths-to-the-SBSA-test-suite.patch
index 6d626be5b8d3..e9f8c4173677 100644
--- a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-Patch-in-the-paths-to-the-SBSA-test-suite.patch
+++ b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-Patch-in-the-paths-to-the-SBSA-test-suite.patch
@@ -10,7 +10,7 @@  Signed-off-by: Ross Burton <ross.burton@arm.com>
  1 file changed, 3 insertions(+)
 
 diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc
-index 557b0ec0f3d6..85b3f4fc65d0 100644
+index 7e985f8280a7..ca7a716fadc7 100644
 --- a/ShellPkg/ShellPkg.dsc
 +++ b/ShellPkg/ShellPkg.dsc
 @@ -23,6 +23,8 @@
@@ -22,7 +22,7 @@  index 557b0ec0f3d6..85b3f4fc65d0 100644
    UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
    UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
    UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-@@ -88,6 +90,7 @@
+@@ -79,6 +81,7 @@
    # Build all the libraries when building this package.
    # This helps developers test changes and how they affect the package.
    #
diff --git a/meta-arm/recipes-bsp/uefi/sbsa-acs/0002-Enforce-using-good-old-BFD-linker.patch b/meta-arm/recipes-bsp/uefi/sbsa-acs/0002-Enforce-using-good-old-BFD-linker.patch
index 68a25c71c1d1..2d8a33f4a9da 100644
--- a/meta-arm/recipes-bsp/uefi/sbsa-acs/0002-Enforce-using-good-old-BFD-linker.patch
+++ b/meta-arm/recipes-bsp/uefi/sbsa-acs/0002-Enforce-using-good-old-BFD-linker.patch
@@ -1,4 +1,4 @@ 
-From 365fb8ebbefaa3c642e18e3c3a16eeccfa0dcc82 Mon Sep 17 00:00:00 2001
+From a91273485735b89e67050bb39a09b60a16055dbd Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 7 Apr 2021 00:16:07 -0700
 Subject: [PATCH] Enforce using good old BFD linker
@@ -17,10 +17,10 @@  Signed-off-by: Khem Raj <raj.khem@gmail.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
-index c34ecfd557c5..153d097a2688 100755
+index 14f3b643c43d..ce3d969625de 100755
 --- a/BaseTools/Conf/tools_def.template
 +++ b/BaseTools/Conf/tools_def.template
-@@ -747,7 +747,7 @@ DEFINE GCC_AARCH64_CC_FLAGS        = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-
+@@ -905,7 +905,7 @@ DEFINE GCC_AARCH64_CC_FLAGS        = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-
  DEFINE GCC_AARCH64_CC_XIPFLAGS     = -mstrict-align -mgeneral-regs-only
  DEFINE GCC_RISCV64_CC_XIPFLAGS     = -mstrict-align -mgeneral-regs-only
  DEFINE GCC_DLINK_FLAGS_COMMON      = -nostdlib --pie
diff --git a/meta-arm/recipes-bsp/uefi/sbsa-acs_7.1.4.bb b/meta-arm/recipes-bsp/uefi/sbsa-acs_7.1.4.bb
index b6361346c5b4..bb668bb48717 100644
--- a/meta-arm/recipes-bsp/uefi/sbsa-acs_7.1.4.bb
+++ b/meta-arm/recipes-bsp/uefi/sbsa-acs_7.1.4.bb
@@ -1,4 +1,4 @@ 
-require recipes-bsp/uefi/edk2-firmware_202408.bb
+require recipes-bsp/uefi/edk2-firmware_202411.bb
 PROVIDES:remove = "virtual/bootloader"
 
 LICENSE += "& Apache-2.0"