diff options
Diffstat (limited to 'config/grub')
49 files changed, 471 insertions, 105 deletions
diff --git a/config/grub/default/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch b/config/grub/default/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch index f3ec1935..7112b0aa 100644 --- a/config/grub/default/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch +++ b/config/grub/default/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch @@ -1,7 +1,7 @@ -From 3334727192bca5c64e9e1321da23c4b1e745deb2 Mon Sep 17 00:00:00 2001 +From 5a2c887181e7cdbd6b38d544e460d02623c902e6 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 31 Oct 2021 03:47:05 +0000 -Subject: [PATCH 1/8] mitigate grub's missing characters for borders/arrow +Subject: [PATCH 01/10] mitigate grub's missing characters for borders/arrow characters This cleans up the display on the main screen in GRUB. diff --git a/config/grub/default/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch b/config/grub/default/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch index a833d0f9..af139ffc 100644 --- a/config/grub/default/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch +++ b/config/grub/default/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch @@ -1,14 +1,14 @@ -From cc6d74da1a6a77935e094601f4f212cd410f5b53 Mon Sep 17 00:00:00 2001 +From 25d7d35e0af74361a5510c3e6313b8ce5e00cd6a Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sat, 19 Nov 2022 16:30:24 +0000 -Subject: [PATCH 2/8] say the name libreboot, in the grub menu +Subject: [PATCH 02/10] say the name libreboot, in the grub menu --- grub-core/normal/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c -index de9a3f961..1fabb9c86 100644 +index de9a3f961..bed502cde 100644 --- a/grub-core/normal/main.c +++ b/grub-core/normal/main.c @@ -215,7 +215,7 @@ grub_normal_init_page (struct grub_term_output *term, @@ -16,7 +16,7 @@ index de9a3f961..1fabb9c86 100644 grub_term_cls (term); - msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION); -+ msg_formatted = grub_xasprintf (_("Libreboot 25.06 Luminous Lemon (GRUB menu): https://libreboot.org/")); ++ msg_formatted = grub_xasprintf (_("Libreboot 26.01 Magnanimous Max (GRUB menu): https://libreboot.org/")); if (!msg_formatted) return; diff --git a/config/grub/default/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch b/config/grub/default/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch index 6ba279b9..bb07abd6 100644 --- a/config/grub/default/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch +++ b/config/grub/default/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch @@ -1,7 +1,7 @@ -From d5aead07155d6eeb36971c0a2e5ee1392a025f91 Mon Sep 17 00:00:00 2001 +From acff2df937bb4172f9bdb46d12e82edbbcad7996 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Mon, 30 Oct 2023 22:19:21 +0000 -Subject: [PATCH 3/8] at_keyboard coreboot: force scancodes2+translate +Subject: [PATCH 03/10] at_keyboard coreboot: force scancodes2+translate Scan code set 2 with translation should be assumed in every case, as the default starting position. diff --git a/config/grub/default/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch b/config/grub/default/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch index b25fbd33..fbcbb2c3 100644 --- a/config/grub/default/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch +++ b/config/grub/default/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch @@ -1,7 +1,7 @@ -From 22a0e4608428f7f0131789b6bc0e0203b994163f Mon Sep 17 00:00:00 2001 +From 247133e1f9820bcb81f7d27fc1395d64dc7b0a89 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Tue, 31 Oct 2023 10:33:28 +0000 -Subject: [PATCH 4/8] keylayouts: don't print "Unknown key" message +Subject: [PATCH 04/10] keylayouts: don't print "Unknown key" message on keyboards with stuck keys, this results in GRUB just spewing it repeatedly, preventing use of GRUB. diff --git a/config/grub/default/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch b/config/grub/default/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch index 68191318..93b0c505 100644 --- a/config/grub/default/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch +++ b/config/grub/default/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch @@ -1,7 +1,7 @@ -From d04a862006aaf754af4d0ec8efee33e9a59c7d0c Mon Sep 17 00:00:00 2001 +From c5ad46b7ba93136764fd1eae1bd0c0c32ce1c5b2 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 5 Nov 2023 16:14:58 +0000 -Subject: [PATCH 5/8] don't print missing prefix errors on the screen +Subject: [PATCH 05/10] don't print missing prefix errors on the screen we do actually set the prefix. this patch modifies grub to still set grub_errno and return accordingly, diff --git a/config/grub/default/patches/0006-don-t-print-error-if-module-not-found.patch b/config/grub/default/patches/0006-don-t-print-error-if-module-not-found.patch index ef805b48..2dbf6d87 100644 --- a/config/grub/default/patches/0006-don-t-print-error-if-module-not-found.patch +++ b/config/grub/default/patches/0006-don-t-print-error-if-module-not-found.patch @@ -1,7 +1,7 @@ -From 1d72be25322037c703c5fa95ee29b8ee7b7d7106 Mon Sep 17 00:00:00 2001 +From 6522ceca8949105b2e1575ada2f05b3061bfe8f3 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 5 Nov 2023 16:36:22 +0000 -Subject: [PATCH 6/8] don't print error if module not found +Subject: [PATCH 06/10] don't print error if module not found still set grub_errno accordingly, and otherwise behave the same. in libreboot, we remove a lot of diff --git a/config/grub/default/patches/0007-don-t-print-empty-error-messages.patch b/config/grub/default/patches/0007-don-t-print-empty-error-messages.patch index 5dfdb676..67ae7d66 100644 --- a/config/grub/default/patches/0007-don-t-print-empty-error-messages.patch +++ b/config/grub/default/patches/0007-don-t-print-empty-error-messages.patch @@ -1,7 +1,7 @@ -From a0e49c6ae97114afa386286f6005dd9b3a896797 Mon Sep 17 00:00:00 2001 +From 557d3e583e6aaa887d7b3876c6980ba0e0e671a3 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 5 Nov 2023 17:25:20 +0000 -Subject: [PATCH 7/8] don't print empty error messages +Subject: [PATCH 07/10] don't print empty error messages this is part two of the quest to kill the prefix error message. after i disabled prefix-related diff --git a/config/grub/default/patches/0008-kern-coreboot-mmap-Map-to-reserved.patch b/config/grub/default/patches/0008-kern-coreboot-mmap-Map-to-reserved.patch index a14e118b..7ce1bf09 100644 --- a/config/grub/default/patches/0008-kern-coreboot-mmap-Map-to-reserved.patch +++ b/config/grub/default/patches/0008-kern-coreboot-mmap-Map-to-reserved.patch @@ -1,7 +1,7 @@ -From b6f5e33972320c171d0fe44ac2afe4eac0b4b3eb Mon Sep 17 00:00:00 2001 +From 101ea5afcfbe459e624df27c422f59b4ded07000 Mon Sep 17 00:00:00 2001 From: Paul Menzel <pmenzel@molgen.mpg.de> Date: Mon, 17 May 2021 10:24:36 +0200 -Subject: [PATCH 8/8] kern/coreboot/mmap: Map to reserved +Subject: [PATCH 08/10] kern/coreboot/mmap: Map to reserved https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50 diff --git a/config/grub/default/patches/0009-Revert-configure-Check-linker-for-image-base-support.patch b/config/grub/default/patches/0009-Revert-configure-Check-linker-for-image-base-support.patch index 6ec818ff..9bb2563d 100644 --- a/config/grub/default/patches/0009-Revert-configure-Check-linker-for-image-base-support.patch +++ b/config/grub/default/patches/0009-Revert-configure-Check-linker-for-image-base-support.patch @@ -1,7 +1,8 @@ -From 70e4ffed2f1cd9b6871341260cae31a5e68c3081 Mon Sep 17 00:00:00 2001 +From a56ceedd60bd6515ad3c84ec6aa4c3d66a8bac87 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Wed, 24 Dec 2025 01:42:17 +0100 -Subject: [PATCH 1/1] Revert "configure: Check linker for --image-base support" +Subject: [PATCH 09/10] Revert "configure: Check linker for --image-base + support" This reverts commit 1a5417f39a0ccefcdd5440f2a67f84d2d2e26960. --- @@ -26,7 +27,7 @@ index 70c1912f8..fa7840f09 100644 void cmain (void) diff --git a/configure.ac b/configure.ac -index a282bf7bf..17937baf4 100644 +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 @@ -45,9 +46,9 @@ index a282bf7bf..17937baf4 100644 TARGET_IMG_CFLAGS= fi -@@ -1793,18 +1795,6 @@ LIBS="" - grub_ASM_USCORE - grub_PROG_TARGET_CC +@@ -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"], diff --git a/config/grub/default/patches/0010-Revert-configure-Print-a-more-helpful-error-if-autoc.patch b/config/grub/default/patches/0010-Revert-configure-Print-a-more-helpful-error-if-autoc.patch new file mode 100644 index 00000000..0c968993 --- /dev/null +++ b/config/grub/default/patches/0010-Revert-configure-Print-a-more-helpful-error-if-autoc.patch @@ -0,0 +1,30 @@ +From 66028b6bc149a25894fe5ca395b22804f389a18e Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Mon, 19 Jan 2026 15:27:23 +0000 +Subject: [PATCH 10/10] Revert "configure: Print a more helpful error if + autoconf-archive is not installed" + +This reverts commit ac042f3f58d33ce9cd5ff61750f06da1a1d7b0eb. +--- + 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.47.3 + diff --git a/config/grub/default/patches/0011-bootstrap-Don-t-download-po-files.patch b/config/grub/default/patches/0011-bootstrap-Don-t-download-po-files.patch new file mode 100644 index 00000000..cfb66047 --- /dev/null +++ b/config/grub/default/patches/0011-bootstrap-Don-t-download-po-files.patch @@ -0,0 +1,91 @@ +From 5d18c96a22d98d137ea40bfc6aabadce933c2d45 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Sun, 1 Feb 2026 20:30:55 +0100 +Subject: [PATCH 1/1] bootstrap: Don't download po files + +GRUB doesn't verify checksums at all, and it pulls from +this URL recursively: + +https://translationproject.org/latest/grub/ + +These files can change at any time, and GRUB is just +downloading them trustingly. Even if the upstream is +totally benevolent, what if they got hacked? + +I downloaded them, hashed them and decided to mirror +them on my RSYNC mirror. In this way, Libreboot can now +use them in a deterministic fashion. + +Simply adding them to the GRUB source code would mean +patching GRUB, which would add 8MB to lbmk. I won't do +it. + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + bootstrap | 31 +++++++++++++------------------ + 1 file changed, 13 insertions(+), 18 deletions(-) + +diff --git a/bootstrap b/bootstrap +index dc9fb4383..9fc5a5c36 100755 +--- a/bootstrap ++++ b/bootstrap +@@ -1,5 +1,16 @@ + #! /bin/sh +-# DO NOT EDIT! GENERATED AUTOMATICALLY! ++# THIS FILE WAS EDITED BY LIBREBOOT TO REMOVE ++# HACKY GRUB BEHAVIOUR; po files now downloaded ++# by lbmk, via config/submodule/grub/ - so that ++# versioned files are possible, with proper checksum ++# verification, and mirrors are used. ++ ++# Yes. This file has been modified. I intend to ++# eventually remove this hacky script. Probably ++# replace the entire GRUB build system. ++ ++# Please do fix/edit or (when possible) remove ++# this file. Thank you. + + # Bootstrap this package from checked-out sources. + +@@ -145,13 +156,6 @@ bootstrap_post_import_hook() { :; } + # Override it via your own definition in bootstrap.conf. + bootstrap_epilogue() { :; } + +-# The command to download all .po files for a specified domain into a +-# specified directory. Fill in the first %s with the destination +-# directory and the second with the domain name. +-po_download_command_format=\ +-"wget --mirror --level=1 -nd -nv -A.po -P '%s' \ +- https://translationproject.org/latest/%s/" +- + # When extracting the package name from an AC_INIT invocation, + # prefer a non-empty tarname (4th argument of AC_INIT if given), else + # fall back to the package name (1st argument with munging). +@@ -909,14 +913,6 @@ autopull() + + # ----------------------------- Get translations. ----------------------------- + +-download_po_files() { +- subdir=$1 +- domain=$2 +- echo "$me: getting translations into $subdir for $domain..." +- cmd=$(printf "$po_download_command_format" "$subdir" "$domain") +- eval "$cmd" +-} +- + # Mirror .po files to $po_dir/.reference and copy only the new + # or modified ones into $po_dir. Also update $po_dir/LINGUAS. + # Note po files that exist locally only are left in $po_dir but will +@@ -932,8 +928,7 @@ update_po_files() { + ref_po_dir="$po_dir/.reference" + + test -d $ref_po_dir || mkdir $ref_po_dir || return +- download_po_files $ref_po_dir $domain \ +- && ls "$ref_po_dir"/*.po 2>/dev/null | ++ ls "$ref_po_dir"/*.po 2>/dev/null | + sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return + + for po in x $(ls $ref_po_dir | sed -n 's/\.po$//p'); do +-- +2.47.3 + diff --git a/config/grub/default/target.cfg b/config/grub/default/target.cfg index 38ad2e60..2ce61fff 100644 --- a/config/grub/default/target.cfg +++ b/config/grub/default/target.cfg @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later tree="default" -rev="25b7f6b9344a4bac18c26ce143a156ac2bcb3ec4" +rev="eaa3b8f0f90605a82c6bfda4c5c4b73c58eb81ac" diff --git a/config/grub/nvme/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch b/config/grub/nvme/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch index 3fd43739..41194e98 100644 --- a/config/grub/nvme/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch +++ b/config/grub/nvme/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch @@ -1,7 +1,7 @@ -From 248018d7623fa1dc0e1b4ef3a430eac04cbe51bf Mon Sep 17 00:00:00 2001 +From 2c953c9160cbed357437891cf1790aeb1c2bd0f5 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 31 Oct 2021 03:47:05 +0000 -Subject: [PATCH 1/9] mitigate grub's missing characters for borders/arrow +Subject: [PATCH 01/10] mitigate grub's missing characters for borders/arrow characters This cleans up the display on the main screen in GRUB. diff --git a/config/grub/nvme/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch b/config/grub/nvme/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch index d3b273ce..359f31f8 100644 --- a/config/grub/nvme/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch +++ b/config/grub/nvme/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch @@ -1,14 +1,14 @@ -From d029792781fe280b8dac1bed457ef78b2af84ee2 Mon Sep 17 00:00:00 2001 +From 71623385f90580b2138110cf00ee66b7a05abcf6 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sat, 19 Nov 2022 16:30:24 +0000 -Subject: [PATCH 2/9] say the name libreboot, in the grub menu +Subject: [PATCH 02/10] say the name libreboot, in the grub menu --- grub-core/normal/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c -index de9a3f961..1fabb9c86 100644 +index de9a3f961..bed502cde 100644 --- a/grub-core/normal/main.c +++ b/grub-core/normal/main.c @@ -215,7 +215,7 @@ grub_normal_init_page (struct grub_term_output *term, @@ -16,7 +16,7 @@ index de9a3f961..1fabb9c86 100644 grub_term_cls (term); - msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION); -+ msg_formatted = grub_xasprintf (_("Libreboot 25.06 Luminous Lemon (GRUB menu): https://libreboot.org/")); ++ msg_formatted = grub_xasprintf (_("Libreboot 26.01 Magnanimous Max (GRUB menu): https://libreboot.org/")); if (!msg_formatted) return; diff --git a/config/grub/nvme/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch b/config/grub/nvme/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch index 8397b689..ab26c6b2 100644 --- a/config/grub/nvme/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch +++ b/config/grub/nvme/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch @@ -1,7 +1,7 @@ -From b42452eca17efb562e1ffe809ff8d3bdbbda3728 Mon Sep 17 00:00:00 2001 +From a21c5e997d6247d713717745b5f7bd380b98fce1 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Mon, 30 Oct 2023 22:19:21 +0000 -Subject: [PATCH 3/9] at_keyboard coreboot: force scancodes2+translate +Subject: [PATCH 03/10] at_keyboard coreboot: force scancodes2+translate Scan code set 2 with translation should be assumed in every case, as the default starting position. diff --git a/config/grub/nvme/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch b/config/grub/nvme/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch index c6a9ee64..68dfb2f7 100644 --- a/config/grub/nvme/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch +++ b/config/grub/nvme/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch @@ -1,7 +1,7 @@ -From 831d6824c79032db08a68acbbea6ea374399dba4 Mon Sep 17 00:00:00 2001 +From 062379b1cd5a4f99324c625fb371c29eb00ad4a2 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Tue, 31 Oct 2023 10:33:28 +0000 -Subject: [PATCH 4/9] keylayouts: don't print "Unknown key" message +Subject: [PATCH 04/10] keylayouts: don't print "Unknown key" message on keyboards with stuck keys, this results in GRUB just spewing it repeatedly, preventing use of GRUB. diff --git a/config/grub/nvme/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch b/config/grub/nvme/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch index abdd93ff..53dbdd87 100644 --- a/config/grub/nvme/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch +++ b/config/grub/nvme/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch @@ -1,7 +1,7 @@ -From 095ecdc8ad06ac2581a06e4dacbf4091aba8ec6a Mon Sep 17 00:00:00 2001 +From e77ca67985c1bef8afd93587232da3d298a8dd51 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 5 Nov 2023 16:14:58 +0000 -Subject: [PATCH 5/9] don't print missing prefix errors on the screen +Subject: [PATCH 05/10] don't print missing prefix errors on the screen we do actually set the prefix. this patch modifies grub to still set grub_errno and return accordingly, diff --git a/config/grub/nvme/patches/0006-don-t-print-error-if-module-not-found.patch b/config/grub/nvme/patches/0006-don-t-print-error-if-module-not-found.patch index 339160d6..3851c7fe 100644 --- a/config/grub/nvme/patches/0006-don-t-print-error-if-module-not-found.patch +++ b/config/grub/nvme/patches/0006-don-t-print-error-if-module-not-found.patch @@ -1,7 +1,7 @@ -From 198cb517f44ada4eb561e3182e61b1598535c51b Mon Sep 17 00:00:00 2001 +From 9412b6be27bce2d79f154761387d35f44184c069 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 5 Nov 2023 16:36:22 +0000 -Subject: [PATCH 6/9] don't print error if module not found +Subject: [PATCH 06/10] don't print error if module not found still set grub_errno accordingly, and otherwise behave the same. in libreboot, we remove a lot of diff --git a/config/grub/nvme/patches/0007-don-t-print-empty-error-messages.patch b/config/grub/nvme/patches/0007-don-t-print-empty-error-messages.patch index 9bec9774..aa42420f 100644 --- a/config/grub/nvme/patches/0007-don-t-print-empty-error-messages.patch +++ b/config/grub/nvme/patches/0007-don-t-print-empty-error-messages.patch @@ -1,7 +1,7 @@ -From e344c1bb1bc0bc4df4cf9c049e1e4ba2daf8c2af Mon Sep 17 00:00:00 2001 +From 2ad50d482cae148df832ccd68f90b8111684ecde Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 5 Nov 2023 17:25:20 +0000 -Subject: [PATCH 7/9] don't print empty error messages +Subject: [PATCH 07/10] don't print empty error messages this is part two of the quest to kill the prefix error message. after i disabled prefix-related diff --git a/config/grub/nvme/patches/0008-Add-native-NVMe-driver-based-on-SeaBIOS.patch b/config/grub/nvme/patches/0008-Add-native-NVMe-driver-based-on-SeaBIOS.patch index e3007b05..e0b40f2f 100644 --- a/config/grub/nvme/patches/0008-Add-native-NVMe-driver-based-on-SeaBIOS.patch +++ b/config/grub/nvme/patches/0008-Add-native-NVMe-driver-based-on-SeaBIOS.patch @@ -1,7 +1,7 @@ -From e390ed303e135f6509889ff1ef3f5e3bcb28e89f Mon Sep 17 00:00:00 2001 +From 202e20bef3766480aee18e679b9306387be615dc Mon Sep 17 00:00:00 2001 From: Mate Kukri <km@mkukri.xyz> Date: Mon, 20 May 2024 11:43:35 +0100 -Subject: [PATCH 8/9] Add native NVMe driver based on SeaBIOS +Subject: [PATCH 08/10] Add native NVMe driver based on SeaBIOS Tested to successfully boot Debian on QEMU and OptiPlex 3050. @@ -31,10 +31,10 @@ index 43635d5ff..2c86dbbf6 100644 endif diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index fa4bc54aa..c608d0450 100644 +index 0cf155128..176d35364 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def -@@ -2768,3 +2768,9 @@ module = { +@@ -2773,3 +2773,9 @@ module = { cflags = '-Wno-uninitialized'; cppflags = '-I$(srcdir)/lib/libtasn1-grub -I$(srcdir)/tests/asn1/'; }; diff --git a/config/grub/nvme/patches/0009-kern-coreboot-mmap-Map-to-reserved.patch b/config/grub/nvme/patches/0009-kern-coreboot-mmap-Map-to-reserved.patch index f85bbb66..11b82429 100644 --- a/config/grub/nvme/patches/0009-kern-coreboot-mmap-Map-to-reserved.patch +++ b/config/grub/nvme/patches/0009-kern-coreboot-mmap-Map-to-reserved.patch @@ -1,7 +1,7 @@ -From 53e9097777bfc3830b9d986e9fd2ff00f40b2aa8 Mon Sep 17 00:00:00 2001 +From 9ec8534a4d27db37cf4feebd44fd9f8973a89e59 Mon Sep 17 00:00:00 2001 From: Paul Menzel <pmenzel@molgen.mpg.de> Date: Mon, 17 May 2021 10:24:36 +0200 -Subject: [PATCH 9/9] kern/coreboot/mmap: Map to reserved +Subject: [PATCH 09/10] kern/coreboot/mmap: Map to reserved https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50 diff --git a/config/grub/nvme/patches/0010-Revert-configure-Check-linker-for-image-base-support.patch b/config/grub/nvme/patches/0010-Revert-configure-Check-linker-for-image-base-support.patch index 6ec818ff..8e78e8b7 100644 --- a/config/grub/nvme/patches/0010-Revert-configure-Check-linker-for-image-base-support.patch +++ b/config/grub/nvme/patches/0010-Revert-configure-Check-linker-for-image-base-support.patch @@ -1,7 +1,8 @@ -From 70e4ffed2f1cd9b6871341260cae31a5e68c3081 Mon Sep 17 00:00:00 2001 +From 7b0d621389fc1857c918058f82093f9630ea7730 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Wed, 24 Dec 2025 01:42:17 +0100 -Subject: [PATCH 1/1] Revert "configure: Check linker for --image-base support" +Subject: [PATCH 10/10] Revert "configure: Check linker for --image-base + support" This reverts commit 1a5417f39a0ccefcdd5440f2a67f84d2d2e26960. --- @@ -26,7 +27,7 @@ index 70c1912f8..fa7840f09 100644 void cmain (void) diff --git a/configure.ac b/configure.ac -index a282bf7bf..17937baf4 100644 +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 @@ -45,9 +46,9 @@ index a282bf7bf..17937baf4 100644 TARGET_IMG_CFLAGS= fi -@@ -1793,18 +1795,6 @@ LIBS="" - grub_ASM_USCORE - grub_PROG_TARGET_CC +@@ -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"], diff --git a/config/grub/nvme/patches/0011-Revert-configure-Print-a-more-helpful-error-if-autoc.patch b/config/grub/nvme/patches/0011-Revert-configure-Print-a-more-helpful-error-if-autoc.patch new file mode 100644 index 00000000..c0a504ff --- /dev/null +++ b/config/grub/nvme/patches/0011-Revert-configure-Print-a-more-helpful-error-if-autoc.patch @@ -0,0 +1,30 @@ +From abf2bf6e2973ccaa994f63ff851ba11cbd45f1eb Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Mon, 19 Jan 2026 15:27:23 +0000 +Subject: [PATCH 1/1] Revert "configure: Print a more helpful error if + autoconf-archive is not installed" + +This reverts commit ac042f3f58d33ce9cd5ff61750f06da1a1d7b0eb. +--- + 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.47.3 + diff --git a/config/grub/nvme/patches/0012-bootstrap-Don-t-download-po-files.patch b/config/grub/nvme/patches/0012-bootstrap-Don-t-download-po-files.patch new file mode 100644 index 00000000..cfb66047 --- /dev/null +++ b/config/grub/nvme/patches/0012-bootstrap-Don-t-download-po-files.patch @@ -0,0 +1,91 @@ +From 5d18c96a22d98d137ea40bfc6aabadce933c2d45 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Sun, 1 Feb 2026 20:30:55 +0100 +Subject: [PATCH 1/1] bootstrap: Don't download po files + +GRUB doesn't verify checksums at all, and it pulls from +this URL recursively: + +https://translationproject.org/latest/grub/ + +These files can change at any time, and GRUB is just +downloading them trustingly. Even if the upstream is +totally benevolent, what if they got hacked? + +I downloaded them, hashed them and decided to mirror +them on my RSYNC mirror. In this way, Libreboot can now +use them in a deterministic fashion. + +Simply adding them to the GRUB source code would mean +patching GRUB, which would add 8MB to lbmk. I won't do +it. + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + bootstrap | 31 +++++++++++++------------------ + 1 file changed, 13 insertions(+), 18 deletions(-) + +diff --git a/bootstrap b/bootstrap +index dc9fb4383..9fc5a5c36 100755 +--- a/bootstrap ++++ b/bootstrap +@@ -1,5 +1,16 @@ + #! /bin/sh +-# DO NOT EDIT! GENERATED AUTOMATICALLY! ++# THIS FILE WAS EDITED BY LIBREBOOT TO REMOVE ++# HACKY GRUB BEHAVIOUR; po files now downloaded ++# by lbmk, via config/submodule/grub/ - so that ++# versioned files are possible, with proper checksum ++# verification, and mirrors are used. ++ ++# Yes. This file has been modified. I intend to ++# eventually remove this hacky script. Probably ++# replace the entire GRUB build system. ++ ++# Please do fix/edit or (when possible) remove ++# this file. Thank you. + + # Bootstrap this package from checked-out sources. + +@@ -145,13 +156,6 @@ bootstrap_post_import_hook() { :; } + # Override it via your own definition in bootstrap.conf. + bootstrap_epilogue() { :; } + +-# The command to download all .po files for a specified domain into a +-# specified directory. Fill in the first %s with the destination +-# directory and the second with the domain name. +-po_download_command_format=\ +-"wget --mirror --level=1 -nd -nv -A.po -P '%s' \ +- https://translationproject.org/latest/%s/" +- + # When extracting the package name from an AC_INIT invocation, + # prefer a non-empty tarname (4th argument of AC_INIT if given), else + # fall back to the package name (1st argument with munging). +@@ -909,14 +913,6 @@ autopull() + + # ----------------------------- Get translations. ----------------------------- + +-download_po_files() { +- subdir=$1 +- domain=$2 +- echo "$me: getting translations into $subdir for $domain..." +- cmd=$(printf "$po_download_command_format" "$subdir" "$domain") +- eval "$cmd" +-} +- + # Mirror .po files to $po_dir/.reference and copy only the new + # or modified ones into $po_dir. Also update $po_dir/LINGUAS. + # Note po files that exist locally only are left in $po_dir but will +@@ -932,8 +928,7 @@ update_po_files() { + ref_po_dir="$po_dir/.reference" + + test -d $ref_po_dir || mkdir $ref_po_dir || return +- download_po_files $ref_po_dir $domain \ +- && ls "$ref_po_dir"/*.po 2>/dev/null | ++ ls "$ref_po_dir"/*.po 2>/dev/null | + sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return + + for po in x $(ls $ref_po_dir | sed -n 's/\.po$//p'); do +-- +2.47.3 + diff --git a/config/grub/nvme/target.cfg b/config/grub/nvme/target.cfg index 1063406e..e2a67cc0 100644 --- a/config/grub/nvme/target.cfg +++ b/config/grub/nvme/target.cfg @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later tree="nvme" -rev="25b7f6b9344a4bac18c26ce143a156ac2bcb3ec4" +rev="eaa3b8f0f90605a82c6bfda4c5c4b73c58eb81ac" diff --git a/config/grub/xhci_nvme/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch b/config/grub/xhci_nvme/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch index 46e5059f..7f489819 100644 --- a/config/grub/xhci_nvme/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch +++ b/config/grub/xhci_nvme/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch @@ -1,7 +1,7 @@ -From 5e70ef9fa3a6474ec827c15329d13c9c984f147a Mon Sep 17 00:00:00 2001 +From 8ce8095abbbcc69b50466cb2b890a59be5a9baed Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 31 Oct 2021 03:47:05 +0000 -Subject: [PATCH 01/20] mitigate grub's missing characters for borders/arrow +Subject: [PATCH 01/21] mitigate grub's missing characters for borders/arrow characters This cleans up the display on the main screen in GRUB. diff --git a/config/grub/xhci_nvme/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch b/config/grub/xhci_nvme/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch index ace80aa7..fdf97c16 100644 --- a/config/grub/xhci_nvme/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch +++ b/config/grub/xhci_nvme/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch @@ -1,7 +1,7 @@ -From f87a74e198cea4ee79051fc789a06ad3695ad1db Mon Sep 17 00:00:00 2001 +From d073d6a6d3c63a2b37df754bb890f88482ef2a75 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sat, 19 Nov 2022 16:30:24 +0000 -Subject: [PATCH 02/20] say the name libreboot, in the grub menu +Subject: [PATCH 02/21] say the name libreboot, in the grub menu --- grub-core/normal/main.c | 2 +- @@ -16,7 +16,7 @@ index de9a3f961..1fabb9c86 100644 grub_term_cls (term); - msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION); -+ msg_formatted = grub_xasprintf (_("Libreboot 25.06 Luminous Lemon (GRUB menu): https://libreboot.org/")); ++ msg_formatted = grub_xasprintf (_("Libreboot 26.01 Magnanimous Max (GRUB menu): https://libreboot.org/")); if (!msg_formatted) return; diff --git a/config/grub/xhci_nvme/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch b/config/grub/xhci_nvme/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch index d3547d11..3e6d9203 100644 --- a/config/grub/xhci_nvme/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch +++ b/config/grub/xhci_nvme/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch @@ -1,7 +1,7 @@ -From e647f6b06788022a746e8f38ed2b092013d1d570 Mon Sep 17 00:00:00 2001 +From befc0d1c61b4ba0c43981774eeff0f0f026f513d Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Mon, 30 Oct 2023 22:19:21 +0000 -Subject: [PATCH 03/20] at_keyboard coreboot: force scancodes2+translate +Subject: [PATCH 03/21] at_keyboard coreboot: force scancodes2+translate Scan code set 2 with translation should be assumed in every case, as the default starting position. diff --git a/config/grub/xhci_nvme/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch b/config/grub/xhci_nvme/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch index b3fd8956..0fdcaac7 100644 --- a/config/grub/xhci_nvme/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch +++ b/config/grub/xhci_nvme/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch @@ -1,7 +1,7 @@ -From 1f0c3362178d1ad44998a98782bcb1e412af9d79 Mon Sep 17 00:00:00 2001 +From abe0aa9a6edba181b0f964f3cf4bcd7155322ac1 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Tue, 31 Oct 2023 10:33:28 +0000 -Subject: [PATCH 04/20] keylayouts: don't print "Unknown key" message +Subject: [PATCH 04/21] keylayouts: don't print "Unknown key" message on keyboards with stuck keys, this results in GRUB just spewing it repeatedly, preventing use of GRUB. diff --git a/config/grub/xhci_nvme/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch b/config/grub/xhci_nvme/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch index 0d49f993..cec589e1 100644 --- a/config/grub/xhci_nvme/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch +++ b/config/grub/xhci_nvme/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch @@ -1,7 +1,7 @@ -From b902f68dacba764fe4d4200cae000cf23385df8e Mon Sep 17 00:00:00 2001 +From f8d8c00b9ff65bbaef029b087d6b2ad1091b39e4 Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 5 Nov 2023 16:14:58 +0000 -Subject: [PATCH 05/20] don't print missing prefix errors on the screen +Subject: [PATCH 05/21] don't print missing prefix errors on the screen we do actually set the prefix. this patch modifies grub to still set grub_errno and return accordingly, diff --git a/config/grub/xhci_nvme/patches/0006-don-t-print-error-if-module-not-found.patch b/config/grub/xhci_nvme/patches/0006-don-t-print-error-if-module-not-found.patch index 07c5713f..afffefca 100644 --- a/config/grub/xhci_nvme/patches/0006-don-t-print-error-if-module-not-found.patch +++ b/config/grub/xhci_nvme/patches/0006-don-t-print-error-if-module-not-found.patch @@ -1,7 +1,7 @@ -From 2da7fd383afee0a91c1eeb5120a46e165b9386c3 Mon Sep 17 00:00:00 2001 +From 807a54732c3a9b056d33a0fdb0baedd44b581f0b Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 5 Nov 2023 16:36:22 +0000 -Subject: [PATCH 06/20] don't print error if module not found +Subject: [PATCH 06/21] don't print error if module not found still set grub_errno accordingly, and otherwise behave the same. in libreboot, we remove a lot of diff --git a/config/grub/xhci_nvme/patches/0007-don-t-print-empty-error-messages.patch b/config/grub/xhci_nvme/patches/0007-don-t-print-empty-error-messages.patch index 108f4b5f..44a9c432 100644 --- a/config/grub/xhci_nvme/patches/0007-don-t-print-empty-error-messages.patch +++ b/config/grub/xhci_nvme/patches/0007-don-t-print-empty-error-messages.patch @@ -1,7 +1,7 @@ -From 5c26d4bb0cc69cb9f4b9e4f6de794f309d5210f4 Mon Sep 17 00:00:00 2001 +From 53ae675a60c53792b0296828fb66d414b2d3f70e Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Sun, 5 Nov 2023 17:25:20 +0000 -Subject: [PATCH 07/20] don't print empty error messages +Subject: [PATCH 07/21] don't print empty error messages this is part two of the quest to kill the prefix error message. after i disabled prefix-related diff --git a/config/grub/xhci_nvme/patches/0008-grub-core-bus-usb-Parse-SuperSpeed-companion-descrip.patch b/config/grub/xhci_nvme/patches/0008-grub-core-bus-usb-Parse-SuperSpeed-companion-descrip.patch index 6144f1e0..95e9fb7b 100644 --- a/config/grub/xhci_nvme/patches/0008-grub-core-bus-usb-Parse-SuperSpeed-companion-descrip.patch +++ b/config/grub/xhci_nvme/patches/0008-grub-core-bus-usb-Parse-SuperSpeed-companion-descrip.patch @@ -1,7 +1,7 @@ -From b47687966ebad85b16d58469237b048c10f86610 Mon Sep 17 00:00:00 2001 +From 64769f3b285e8bf2c21a65fba81673a0a4f6dde3 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph <patrick.rudolph@9elements.com> Date: Sun, 15 Nov 2020 19:00:27 +0100 -Subject: [PATCH 08/20] grub-core/bus/usb: Parse SuperSpeed companion +Subject: [PATCH 08/21] grub-core/bus/usb: Parse SuperSpeed companion descriptors Parse the SS_ENDPOINT_COMPANION descriptor, which is only present on USB 3.0 diff --git a/config/grub/xhci_nvme/patches/0009-usb-Add-enum-for-xHCI.patch b/config/grub/xhci_nvme/patches/0009-usb-Add-enum-for-xHCI.patch index 4f88de35..5b79d33c 100644 --- a/config/grub/xhci_nvme/patches/0009-usb-Add-enum-for-xHCI.patch +++ b/config/grub/xhci_nvme/patches/0009-usb-Add-enum-for-xHCI.patch @@ -1,7 +1,7 @@ -From 05b2607120d0ccfb826bc83d4f4d2741f4f0a6a1 Mon Sep 17 00:00:00 2001 +From 43522cfb0ec375be1b6a226103e9a55d4b88ee1d Mon Sep 17 00:00:00 2001 From: Patrick Rudolph <patrick.rudolph@9elements.com> Date: Mon, 7 Dec 2020 08:41:22 +0100 -Subject: [PATCH 09/20] usb: Add enum for xHCI +Subject: [PATCH 09/21] usb: Add enum for xHCI Will be used in future patches. diff --git a/config/grub/xhci_nvme/patches/0010-usbtrans-Set-default-maximum-packet-size.patch b/config/grub/xhci_nvme/patches/0010-usbtrans-Set-default-maximum-packet-size.patch index 938b2266..c6196f87 100644 --- a/config/grub/xhci_nvme/patches/0010-usbtrans-Set-default-maximum-packet-size.patch +++ b/config/grub/xhci_nvme/patches/0010-usbtrans-Set-default-maximum-packet-size.patch @@ -1,7 +1,7 @@ -From 8de1eafa067bfaae5d58ca0c5616e159356dc6c8 Mon Sep 17 00:00:00 2001 +From 296f9b732393315bc3a91f8531f6ac9e7b9f43e0 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph <patrick.rudolph@9elements.com> Date: Mon, 7 Dec 2020 08:41:23 +0100 -Subject: [PATCH 10/20] usbtrans: Set default maximum packet size +Subject: [PATCH 10/21] usbtrans: Set default maximum packet size Set the maximum packet size to 512 for SuperSpeed devices. diff --git a/config/grub/xhci_nvme/patches/0011-grub-core-bus-usb-Add-function-pointer-for-attach-de.patch b/config/grub/xhci_nvme/patches/0011-grub-core-bus-usb-Add-function-pointer-for-attach-de.patch index 41f5c1e3..ac53118a 100644 --- a/config/grub/xhci_nvme/patches/0011-grub-core-bus-usb-Add-function-pointer-for-attach-de.patch +++ b/config/grub/xhci_nvme/patches/0011-grub-core-bus-usb-Add-function-pointer-for-attach-de.patch @@ -1,7 +1,7 @@ -From 4cda4c986931067b1442c165d6d207d6948529b8 Mon Sep 17 00:00:00 2001 +From de471d16aeaab3cf12956d783604f22944ea7ed0 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph <patrick.rudolph@9elements.com> Date: Sun, 15 Nov 2020 19:51:42 +0100 -Subject: [PATCH 11/20] grub-core/bus/usb: Add function pointer for +Subject: [PATCH 11/21] grub-core/bus/usb: Add function pointer for attach/detach events The xHCI code needs to be called for attaching or detaching a device. diff --git a/config/grub/xhci_nvme/patches/0012-grub-core-bus-usb-usbhub-Add-new-private-fields-for-.patch b/config/grub/xhci_nvme/patches/0012-grub-core-bus-usb-usbhub-Add-new-private-fields-for-.patch index 9e947020..fbedfc77 100644 --- a/config/grub/xhci_nvme/patches/0012-grub-core-bus-usb-usbhub-Add-new-private-fields-for-.patch +++ b/config/grub/xhci_nvme/patches/0012-grub-core-bus-usb-usbhub-Add-new-private-fields-for-.patch @@ -1,7 +1,7 @@ -From e29dd6f6ccc73f2e4c04261c0367e1c6a0dbbce6 Mon Sep 17 00:00:00 2001 +From 8966fadb8c19fd5c30dd585a53f465767c1cd627 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph <patrick.rudolph@9elements.com> Date: Mon, 7 Dec 2020 08:41:25 +0100 -Subject: [PATCH 12/20] grub-core/bus/usb/usbhub: Add new private fields for +Subject: [PATCH 12/21] grub-core/bus/usb/usbhub: Add new private fields for xHCI controller Store the root port number, the route, consisting out of the port ID diff --git a/config/grub/xhci_nvme/patches/0013-grub-core-bus-usb-Add-xhci-support.patch b/config/grub/xhci_nvme/patches/0013-grub-core-bus-usb-Add-xhci-support.patch index 9661a425..1393092a 100644 --- a/config/grub/xhci_nvme/patches/0013-grub-core-bus-usb-Add-xhci-support.patch +++ b/config/grub/xhci_nvme/patches/0013-grub-core-bus-usb-Add-xhci-support.patch @@ -1,7 +1,7 @@ -From aa09b16597347353c561f55a32eb27f662b41053 Mon Sep 17 00:00:00 2001 +From 764e79efa273fadb8fc4b5ec286dd9e5688a58e8 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph <patrick.rudolph@9elements.com> Date: Mon, 7 Dec 2020 08:41:26 +0100 -Subject: [PATCH 13/20] grub-core/bus/usb: Add xhci support +Subject: [PATCH 13/21] grub-core/bus/usb: Add xhci support Add support for xHCI USB controllers. The code is based on seabios implementation, but has been heavily @@ -67,7 +67,7 @@ index 43635d5ff..65016f856 100644 endif diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index fa4bc54aa..208badbdf 100644 +index 0cf155128..ec4c76ea8 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -675,6 +675,13 @@ module = { diff --git a/config/grub/xhci_nvme/patches/0014-grub-core-bus-usb-usbhub-Add-xHCI-non-root-hub-suppo.patch b/config/grub/xhci_nvme/patches/0014-grub-core-bus-usb-usbhub-Add-xHCI-non-root-hub-suppo.patch index 98f38569..bb5c4fd8 100644 --- a/config/grub/xhci_nvme/patches/0014-grub-core-bus-usb-usbhub-Add-xHCI-non-root-hub-suppo.patch +++ b/config/grub/xhci_nvme/patches/0014-grub-core-bus-usb-usbhub-Add-xHCI-non-root-hub-suppo.patch @@ -1,7 +1,7 @@ -From 861b218be772b8abf090647fc24eb7c7ccc1d2db Mon Sep 17 00:00:00 2001 +From f289290da21c2eafdf52ae4859623971a3da07bb Mon Sep 17 00:00:00 2001 From: Patrick Rudolph <patrick.rudolph@9elements.com> Date: Mon, 7 Dec 2020 08:41:27 +0100 -Subject: [PATCH 14/20] grub-core/bus/usb/usbhub: Add xHCI non root hub support +Subject: [PATCH 14/21] grub-core/bus/usb/usbhub: Add xHCI non root hub support Tested on Intel PCH C246, the USB3 hub can be configured by grub. diff --git a/config/grub/xhci_nvme/patches/0015-xHCI-also-accept-SBRN-0x31-and-0x32.patch b/config/grub/xhci_nvme/patches/0015-xHCI-also-accept-SBRN-0x31-and-0x32.patch index 69d0e653..9deb581d 100644 --- a/config/grub/xhci_nvme/patches/0015-xHCI-also-accept-SBRN-0x31-and-0x32.patch +++ b/config/grub/xhci_nvme/patches/0015-xHCI-also-accept-SBRN-0x31-and-0x32.patch @@ -1,7 +1,7 @@ -From 0a1a2f3a2f4b3908f094133c86fda0e882dabda5 Mon Sep 17 00:00:00 2001 +From e8bb5e7445dad3514c88d5286563781f27233e5e Mon Sep 17 00:00:00 2001 From: Sven Anderson <sven@anderson.de> Date: Sat, 28 May 2022 21:39:23 +0200 -Subject: [PATCH 15/20] xHCI: also accept SBRN 0x31 and 0x32 +Subject: [PATCH 15/21] xHCI: also accept SBRN 0x31 and 0x32 Signed-off-by: Sven Anderson <sven@anderson.de> --- diff --git a/config/grub/xhci_nvme/patches/0016-xhci-fix-port-indexing.patch b/config/grub/xhci_nvme/patches/0016-xhci-fix-port-indexing.patch index bdbaf417..b1cb368a 100644 --- a/config/grub/xhci_nvme/patches/0016-xhci-fix-port-indexing.patch +++ b/config/grub/xhci_nvme/patches/0016-xhci-fix-port-indexing.patch @@ -1,7 +1,7 @@ -From 9343cdda106d47561f25ce1e39a86d62cb0bfd08 Mon Sep 17 00:00:00 2001 +From 3db55ea63bc2c4fb41f7489a77a42c821256bbf5 Mon Sep 17 00:00:00 2001 From: Sven Anderson <sven@anderson.de> Date: Mon, 13 Jan 2025 19:51:41 +0100 -Subject: [PATCH 16/20] xhci: fix port indexing +Subject: [PATCH 16/21] xhci: fix port indexing --- grub-core/bus/usb/xhci.c | 10 +++++----- diff --git a/config/grub/xhci_nvme/patches/0017-xhci-configure-TT-for-non-root-hubs.patch b/config/grub/xhci_nvme/patches/0017-xhci-configure-TT-for-non-root-hubs.patch index 83410e2e..fb8ed0b4 100644 --- a/config/grub/xhci_nvme/patches/0017-xhci-configure-TT-for-non-root-hubs.patch +++ b/config/grub/xhci_nvme/patches/0017-xhci-configure-TT-for-non-root-hubs.patch @@ -1,7 +1,7 @@ -From 41e966e3054862e1921e14bd2ecec3bfb20cba8f Mon Sep 17 00:00:00 2001 +From a82ef95fffc0a869e90467ce4f7c28282c084518 Mon Sep 17 00:00:00 2001 From: Sven Anderson <sven@anderson.de> Date: Mon, 13 Jan 2025 20:26:32 +0100 -Subject: [PATCH 17/20] xhci: configure TT for non-root-hubs +Subject: [PATCH 17/21] xhci: configure TT for non-root-hubs --- grub-core/bus/usb/usbhub.c | 6 +++++ diff --git a/config/grub/xhci_nvme/patches/0018-Fix-compilation-on-x86_64.patch b/config/grub/xhci_nvme/patches/0018-Fix-compilation-on-x86_64.patch index 405cfeb9..70a1a22c 100644 --- a/config/grub/xhci_nvme/patches/0018-Fix-compilation-on-x86_64.patch +++ b/config/grub/xhci_nvme/patches/0018-Fix-compilation-on-x86_64.patch @@ -1,7 +1,7 @@ -From 114346473d1e5d3660ea0dae4ed9f4c8ad98bbeb Mon Sep 17 00:00:00 2001 +From cc671d76816c8370a85e289d5ac7bdf1f687ff3a Mon Sep 17 00:00:00 2001 From: Patrick Rudolph <patrick.rudolph@9elements.com> Date: Wed, 24 Feb 2021 08:25:41 +0100 -Subject: [PATCH 18/20] Fix compilation on x86_64 +Subject: [PATCH 18/21] Fix compilation on x86_64 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> --- diff --git a/config/grub/xhci_nvme/patches/0019-Add-native-NVMe-driver-based-on-SeaBIOS.patch b/config/grub/xhci_nvme/patches/0019-Add-native-NVMe-driver-based-on-SeaBIOS.patch index 57762843..f09ae69d 100644 --- a/config/grub/xhci_nvme/patches/0019-Add-native-NVMe-driver-based-on-SeaBIOS.patch +++ b/config/grub/xhci_nvme/patches/0019-Add-native-NVMe-driver-based-on-SeaBIOS.patch @@ -1,7 +1,7 @@ -From 2b255ee97a48f280a20acd807386bec52ea447c8 Mon Sep 17 00:00:00 2001 +From 467fe4c5a98c0cfc1b357ec8acc360a03b5f7038 Mon Sep 17 00:00:00 2001 From: Mate Kukri <km@mkukri.xyz> Date: Mon, 20 May 2024 11:43:35 +0100 -Subject: [PATCH 19/20] Add native NVMe driver based on SeaBIOS +Subject: [PATCH 19/21] Add native NVMe driver based on SeaBIOS Tested to successfully boot Debian on QEMU and OptiPlex 3050. @@ -31,10 +31,10 @@ index 65016f856..7bc0866ba 100644 endif diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def -index 208badbdf..219282524 100644 +index ec4c76ea8..08b83ad06 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def -@@ -2775,3 +2775,9 @@ module = { +@@ -2780,3 +2780,9 @@ module = { cflags = '-Wno-uninitialized'; cppflags = '-I$(srcdir)/lib/libtasn1-grub -I$(srcdir)/tests/asn1/'; }; diff --git a/config/grub/xhci_nvme/patches/0020-kern-coreboot-mmap-Map-to-reserved.patch b/config/grub/xhci_nvme/patches/0020-kern-coreboot-mmap-Map-to-reserved.patch index 9cf94a25..ffa01e7a 100644 --- a/config/grub/xhci_nvme/patches/0020-kern-coreboot-mmap-Map-to-reserved.patch +++ b/config/grub/xhci_nvme/patches/0020-kern-coreboot-mmap-Map-to-reserved.patch @@ -1,7 +1,7 @@ -From 4ece79a5e4708b96c2fd06a80b1aac0b6e232675 Mon Sep 17 00:00:00 2001 +From 331af0cc985aa5ec57964c6e3ab69f65c23f6481 Mon Sep 17 00:00:00 2001 From: Paul Menzel <pmenzel@molgen.mpg.de> Date: Mon, 17 May 2021 10:24:36 +0200 -Subject: [PATCH 20/20] kern/coreboot/mmap: Map to reserved +Subject: [PATCH 20/21] kern/coreboot/mmap: Map to reserved https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50 diff --git a/config/grub/xhci_nvme/patches/0021-Revert-configure-Check-linker-for-image-base-support.patch b/config/grub/xhci_nvme/patches/0021-Revert-configure-Check-linker-for-image-base-support.patch index 6ec818ff..0e563fd5 100644 --- a/config/grub/xhci_nvme/patches/0021-Revert-configure-Check-linker-for-image-base-support.patch +++ b/config/grub/xhci_nvme/patches/0021-Revert-configure-Check-linker-for-image-base-support.patch @@ -1,7 +1,8 @@ -From 70e4ffed2f1cd9b6871341260cae31a5e68c3081 Mon Sep 17 00:00:00 2001 +From cf791012987ea90f7a88edd21a0f619fbc40986d Mon Sep 17 00:00:00 2001 From: Leah Rowe <leah@libreboot.org> Date: Wed, 24 Dec 2025 01:42:17 +0100 -Subject: [PATCH 1/1] Revert "configure: Check linker for --image-base support" +Subject: [PATCH 21/21] Revert "configure: Check linker for --image-base + support" This reverts commit 1a5417f39a0ccefcdd5440f2a67f84d2d2e26960. --- @@ -26,7 +27,7 @@ index 70c1912f8..fa7840f09 100644 void cmain (void) diff --git a/configure.ac b/configure.ac -index a282bf7bf..17937baf4 100644 +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 @@ -45,9 +46,9 @@ index a282bf7bf..17937baf4 100644 TARGET_IMG_CFLAGS= fi -@@ -1793,18 +1795,6 @@ LIBS="" - grub_ASM_USCORE - grub_PROG_TARGET_CC +@@ -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"], diff --git a/config/grub/xhci_nvme/patches/0022-Revert-configure-Print-a-more-helpful-error-if-autoc.patch b/config/grub/xhci_nvme/patches/0022-Revert-configure-Print-a-more-helpful-error-if-autoc.patch new file mode 100644 index 00000000..c0a504ff --- /dev/null +++ b/config/grub/xhci_nvme/patches/0022-Revert-configure-Print-a-more-helpful-error-if-autoc.patch @@ -0,0 +1,30 @@ +From abf2bf6e2973ccaa994f63ff851ba11cbd45f1eb Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Mon, 19 Jan 2026 15:27:23 +0000 +Subject: [PATCH 1/1] Revert "configure: Print a more helpful error if + autoconf-archive is not installed" + +This reverts commit ac042f3f58d33ce9cd5ff61750f06da1a1d7b0eb. +--- + 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.47.3 + diff --git a/config/grub/xhci_nvme/patches/0023-bootstrap-Don-t-download-po-files.patch b/config/grub/xhci_nvme/patches/0023-bootstrap-Don-t-download-po-files.patch new file mode 100644 index 00000000..cfb66047 --- /dev/null +++ b/config/grub/xhci_nvme/patches/0023-bootstrap-Don-t-download-po-files.patch @@ -0,0 +1,91 @@ +From 5d18c96a22d98d137ea40bfc6aabadce933c2d45 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Sun, 1 Feb 2026 20:30:55 +0100 +Subject: [PATCH 1/1] bootstrap: Don't download po files + +GRUB doesn't verify checksums at all, and it pulls from +this URL recursively: + +https://translationproject.org/latest/grub/ + +These files can change at any time, and GRUB is just +downloading them trustingly. Even if the upstream is +totally benevolent, what if they got hacked? + +I downloaded them, hashed them and decided to mirror +them on my RSYNC mirror. In this way, Libreboot can now +use them in a deterministic fashion. + +Simply adding them to the GRUB source code would mean +patching GRUB, which would add 8MB to lbmk. I won't do +it. + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + bootstrap | 31 +++++++++++++------------------ + 1 file changed, 13 insertions(+), 18 deletions(-) + +diff --git a/bootstrap b/bootstrap +index dc9fb4383..9fc5a5c36 100755 +--- a/bootstrap ++++ b/bootstrap +@@ -1,5 +1,16 @@ + #! /bin/sh +-# DO NOT EDIT! GENERATED AUTOMATICALLY! ++# THIS FILE WAS EDITED BY LIBREBOOT TO REMOVE ++# HACKY GRUB BEHAVIOUR; po files now downloaded ++# by lbmk, via config/submodule/grub/ - so that ++# versioned files are possible, with proper checksum ++# verification, and mirrors are used. ++ ++# Yes. This file has been modified. I intend to ++# eventually remove this hacky script. Probably ++# replace the entire GRUB build system. ++ ++# Please do fix/edit or (when possible) remove ++# this file. Thank you. + + # Bootstrap this package from checked-out sources. + +@@ -145,13 +156,6 @@ bootstrap_post_import_hook() { :; } + # Override it via your own definition in bootstrap.conf. + bootstrap_epilogue() { :; } + +-# The command to download all .po files for a specified domain into a +-# specified directory. Fill in the first %s with the destination +-# directory and the second with the domain name. +-po_download_command_format=\ +-"wget --mirror --level=1 -nd -nv -A.po -P '%s' \ +- https://translationproject.org/latest/%s/" +- + # When extracting the package name from an AC_INIT invocation, + # prefer a non-empty tarname (4th argument of AC_INIT if given), else + # fall back to the package name (1st argument with munging). +@@ -909,14 +913,6 @@ autopull() + + # ----------------------------- Get translations. ----------------------------- + +-download_po_files() { +- subdir=$1 +- domain=$2 +- echo "$me: getting translations into $subdir for $domain..." +- cmd=$(printf "$po_download_command_format" "$subdir" "$domain") +- eval "$cmd" +-} +- + # Mirror .po files to $po_dir/.reference and copy only the new + # or modified ones into $po_dir. Also update $po_dir/LINGUAS. + # Note po files that exist locally only are left in $po_dir but will +@@ -932,8 +928,7 @@ update_po_files() { + ref_po_dir="$po_dir/.reference" + + test -d $ref_po_dir || mkdir $ref_po_dir || return +- download_po_files $ref_po_dir $domain \ +- && ls "$ref_po_dir"/*.po 2>/dev/null | ++ ls "$ref_po_dir"/*.po 2>/dev/null | + sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return + + for po in x $(ls $ref_po_dir | sed -n 's/\.po$//p'); do +-- +2.47.3 + diff --git a/config/grub/xhci_nvme/target.cfg b/config/grub/xhci_nvme/target.cfg index d2be2d30..15e3e00e 100644 --- a/config/grub/xhci_nvme/target.cfg +++ b/config/grub/xhci_nvme/target.cfg @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-3.0-or-later tree="xhci_nvme" -rev="25b7f6b9344a4bac18c26ce143a156ac2bcb3ec4" +rev="eaa3b8f0f90605a82c6bfda4c5c4b73c58eb81ac" |
