Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] boot/grub2: bump to version 2.16
@ 2026-10-20 19:57 Julien Olivain via buildroot
  2026-10-20 19:57 ` [Buildroot] [PATCH v2 2/2] boot/edk2: bump to version edk2-stable202608 Julien Olivain via buildroot
  2026-10-21 19:40 ` [Buildroot] [PATCH v2 1/2] boot/grub2: bump to version 2.16 Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Julien Olivain via buildroot @ 2026-10-20 19:57 UTC (permalink / raw)
  To: buildroot
  Cc: Dick Olsson, Thomas Petazzoni, Vincent Stehlé,
	Julien Olivain

For release notes, see [1] and [2].

The grub2 project moved to gitlab. See [3] and [4].
This commit updates GRUB2_SITE accordingly.

The commit removes the package patches which are included in this
release, and also adds an upstream patch to fix an issue on arm64
platform.

Tested by compiling and booting the defconfigs using grub2:

    qemu_aarch64_sbsa_defconfig
    qemu_arm_ebbr_defconfig
    qemu_loongarch64_virt_efi_defconfig
    qemu_riscv64_virt_efi_defconfig
    qemu_x86_64_efi_defconfig
    pc_x86_64_bios_defconfig
    pc_x86_64_efi_defconfig

and running the runtime tests with:

    support/testing/run-tests \
        -d dl -o output_folder \
            tests.boot.test_grub \
            tests.fs.test_iso9660

[1] https://gitlab.freedesktop.org/gnu-grub/grub/-/releases/grub-2.16
[2] https://gitlab.freedesktop.org/gnu-grub/grub/-/blob/grub-2.16/NEWS
[3] https://gitlab.freedesktop.org/gnu-grub/grub/-/commit/754a3d867d015ffc242a7bb67fd6b88624667af9
[4] https://lists.gnu.org/archive/html/grub-devel/2026-03/msg00036.html

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Changes v1 -> v2:
- No change.

Note: runtime tests using i386 CPU are failing due to unrelated
reasons (illegal instruction in libc form /sbin/init). Without
this bump, those tests are failing the same way. Since the
failure happens in user space, it means the boot still work with
this bump.
---
 ...it-memory-allocations-to-4GB-boundar.patch | 34 +++++++++
 ...-Check-linker-for-image-base-support.patch | 75 -------------------
 ...-Print-a-more-helpful-error-if-autoc.patch | 36 ---------
 boot/grub2/grub2.hash                         |  4 +-
 boot/grub2/grub2.mk                           |  4 +-
 5 files changed, 38 insertions(+), 115 deletions(-)
 create mode 100644 boot/grub2/0001-Revert-arm64-Limit-memory-allocations-to-4GB-boundar.patch
 delete mode 100644 boot/grub2/0001-Revert-configure-Check-linker-for-image-base-support.patch
 delete mode 100644 boot/grub2/0002-Revert-configure-Print-a-more-helpful-error-if-autoc.patch

diff --git a/boot/grub2/0001-Revert-arm64-Limit-memory-allocations-to-4GB-boundar.patch b/boot/grub2/0001-Revert-arm64-Limit-memory-allocations-to-4GB-boundar.patch
new file mode 100644
index 0000000000..ec83b2fa79
--- /dev/null
+++ b/boot/grub2/0001-Revert-arm64-Limit-memory-allocations-to-4GB-boundar.patch
@@ -0,0 +1,34 @@
+From ec277f1056227689c8875d1c73602b47bfe72633 Mon Sep 17 00:00:00 2001
+From: Neal Gompa <neal@gompa.dev>
+Date: Mon, 28 Sep 2026 18:12:45 -0400
+Subject: [PATCH] Revert "arm64: Limit memory allocations to 4GB boundary"
+
+This causes failed memory allocations on some ARM-based platforms,
+notably Apple Silicon Macs.
+
+This reverts commit 1cae861314f43540cde773fab8b6ed769dc5f106.
+
+Reviewed-by: Leo Sandoval <lsandova@redhat.com>
+Signed-off-by: Neal Gompa <neal@gompa.dev>
+Part-of: <https://gitlab.freedesktop.org/gnu-grub/grub/-/merge_requests/274>
+Upstream: https://gitlab.freedesktop.org/gnu-grub/grub/-/commit/711110daccaf15df695b270d13f76b5bc84a64dd
+Signed-off-by: Julien Olivain <ju.o@free.fr>
+---
+ include/grub/arm64/efi/memory.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/grub/arm64/efi/memory.h b/include/grub/arm64/efi/memory.h
+index 2c64918e3..c6cb32417 100644
+--- a/include/grub/arm64/efi/memory.h
++++ b/include/grub/arm64/efi/memory.h
+@@ -1,6 +1,6 @@
+ #ifndef GRUB_MEMORY_CPU_HEADER
+ #include <grub/efi/memory.h>
+ 
+-#define GRUB_EFI_MAX_USABLE_ADDRESS 0xffffffff
++#define GRUB_EFI_MAX_USABLE_ADDRESS 0xffffffffffffULL
+ 
+ #endif /* ! GRUB_MEMORY_CPU_HEADER */
+-- 
+2.56.0
+
diff --git a/boot/grub2/0001-Revert-configure-Check-linker-for-image-base-support.patch b/boot/grub2/0001-Revert-configure-Check-linker-for-image-base-support.patch
deleted file mode 100644
index edfaea2de8..0000000000
--- a/boot/grub2/0001-Revert-configure-Check-linker-for-image-base-support.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 3a9d2dd2f5fb07b75a74c307d61b9b9fc5d20a62 Mon Sep 17 00:00:00 2001
-From: Yi Zhao <yi.zhao@windriver.com>
-Date: Fri, 27 Feb 2026 11:46:54 +0800
-Subject: [PATCH] Revert "configure: Check linker for --image-base support"
-
-This reverts commit 1a5417f39a0ccefcdd5440f2a67f84d2d2e26960.
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-Upstream: temporary revert, until upstream fixes the issue, see
-discussion at
-https://lists.gnu.org/archive/html/grub-devel/2026-02/msg00039.html
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
----
- acinclude.m4 |  5 -----
- configure.ac | 14 ++------------
- 2 files changed, 2 insertions(+), 17 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 70c1912f8..fa7840f09 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -79,11 +79,6 @@ AC_DEFUN([grub_PROG_OBJCOPY_ABSOLUTE],
- [AC_MSG_CHECKING([whether ${TARGET_OBJCOPY} works for absolute addresses])
- AC_CACHE_VAL(grub_cv_prog_objcopy_absolute,
- [cat > conftest.c <<\EOF
--asm (
--    ".globl start, _start, __start\n"
--    ".ifdef cmain; .set start = _start = __start = cmain\n.endif\n"
--    ".ifdef _cmain; .set start = _start = __start = _cmain\n.endif\n"
--);
- void cmain (void);
- void
- cmain (void)
-diff --git a/configure.ac b/configure.ac
-index d8ca1b7c1..041cfbab4 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1461,6 +1461,7 @@ elif test x$grub_cv_target_cc_link_format = x-mi386pe || test x$grub_cv_target_c
-   TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/i386-cygwin-img-ld.sc"
-   TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT}"
-   TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/i386-cygwin-img-ld.sc"
-+  TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
-   TARGET_IMG_CFLAGS=
- else
-   TARGET_APPLE_LINKER=0
-@@ -1468,6 +1469,7 @@ else
-   TARGET_IMG_LDSCRIPT=
-   TARGET_IMG_LDFLAGS='-Wl,-N'
-   TARGET_IMG_LDFLAGS_AC='-Wl,-N'
-+  TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
-   TARGET_IMG_CFLAGS=
- fi
- 
-@@ -1798,18 +1800,6 @@ grub_PROG_TARGET_CC
- m4_ifndef([AX_CHECK_LINK_FLAG], [m4_fatal([autoconf-archive is missing. You must install it to generate the configure script.])])
- 
- if test "x$TARGET_APPLE_LINKER" != x1 ; then
--AX_CHECK_LINK_FLAG([-Wl,--image-base,0x400000],
--    [TARGET_IMG_BASE_LDOPT="-Wl,--image-base"],
--    [TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"],
--    [],
--    [AC_LANG_SOURCE([
--asm (".globl start; start:");
--asm (".globl _start; _start:");
--asm (".globl __start; __start:");
--void __main (void);
--void __main (void) {}
--int main (void);
--    ])])
- grub_PROG_OBJCOPY_ABSOLUTE
- fi
- grub_PROG_LD_BUILD_ID_NONE
--- 
-2.43.0
-
diff --git a/boot/grub2/0002-Revert-configure-Print-a-more-helpful-error-if-autoc.patch b/boot/grub2/0002-Revert-configure-Print-a-more-helpful-error-if-autoc.patch
deleted file mode 100644
index 8e38bb9d3f..0000000000
--- a/boot/grub2/0002-Revert-configure-Print-a-more-helpful-error-if-autoc.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From d0f516385dc73e8dd92b78ce08c1df100434fe67 Mon Sep 17 00:00:00 2001
-From: Yi Zhao <yi.zhao@windriver.com>
-Date: Fri, 27 Feb 2026 13:58:44 +0800
-Subject: [PATCH] Revert "configure: Print a more helpful error if
- autoconf-archive is not installed"
-
-This reverts commit ac042f3f58d33ce9cd5ff61750f06da1a1d7b0eb.
-
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-Upstream: temporary revert, until upstream fixes the issue, see
-discussion at
-https://lists.gnu.org/archive/html/grub-devel/2026-02/msg00039.html
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
----
- configure.ac | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 041cfbab4..209c0fb11 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1794,11 +1794,6 @@ LIBS=""
- # Defined in acinclude.m4.
- grub_ASM_USCORE
- grub_PROG_TARGET_CC
--
--# The error message produced by autoconf if autoconf-archive is not installed is
--# quite misleading and not very helpful. So, try point people in the right direction.
--m4_ifndef([AX_CHECK_LINK_FLAG], [m4_fatal([autoconf-archive is missing. You must install it to generate the configure script.])])
--
- if test "x$TARGET_APPLE_LINKER" != x1 ; then
- grub_PROG_OBJCOPY_ABSOLUTE
- fi
--- 
-2.43.0
-
diff --git a/boot/grub2/grub2.hash b/boot/grub2/grub2.hash
index 5b5ac28eda..cf46011359 100644
--- a/boot/grub2/grub2.hash
+++ b/boot/grub2/grub2.hash
@@ -1,5 +1,5 @@
 # Locally calculated after checking signature
-# https://ftp.gnu.org/gnu/grub/grub-2.14.tar.xz.sig
-sha256  bc8d3c73535b8838d8c8e2654d73edc4e6ae8c8acdb45d5df5dc9a1547446d43  grub-2.14.tar.xz
+# https://gitlab.freedesktop.org/api/v4/projects/26558/packages/generic/source-assets/grub-2.16/grub-2.16.tar.xz.sig
+sha256  f0db0104927df0b9a48bc41b735c702936190d17eb2d73d3018fa77474a0cabe  grub-2.16.tar.xz
 # Locally computed:
 sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk
index de9f913e93..d34415d467 100644
--- a/boot/grub2/grub2.mk
+++ b/boot/grub2/grub2.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-GRUB2_VERSION = 2.14
-GRUB2_SITE = $(BR2_GNU_MIRROR)/grub
+GRUB2_VERSION = 2.16
+GRUB2_SITE = https://gitlab.freedesktop.org/api/v4/projects/26558/packages/generic/source-assets/grub-$(GRUB2_VERSION)
 GRUB2_SOURCE = grub-$(GRUB2_VERSION).tar.xz
 GRUB2_LICENSE = GPL-3.0+
 GRUB2_LICENSE_FILES = COPYING
-- 
2.56.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-21 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 19:57 [Buildroot] [PATCH v2 1/2] boot/grub2: bump to version 2.16 Julien Olivain via buildroot
2026-10-20 19:57 ` [Buildroot] [PATCH v2 2/2] boot/edk2: bump to version edk2-stable202608 Julien Olivain via buildroot
2026-10-21 19:40 ` [Buildroot] [PATCH v2 1/2] boot/grub2: bump to version 2.16 Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox