summaryrefslogtreecommitdiff
path: root/config/grub/default/patches
diff options
context:
space:
mode:
Diffstat (limited to 'config/grub/default/patches')
-rw-r--r--config/grub/default/patches/0001-mitigate-grub-s-missing-characters-for-borders-arrow.patch4
-rw-r--r--config/grub/default/patches/0002-say-the-name-libreboot-in-the-grub-menu.patch8
-rw-r--r--config/grub/default/patches/0003-at_keyboard-coreboot-force-scancodes2-translate.patch4
-rw-r--r--config/grub/default/patches/0004-keylayouts-don-t-print-Unknown-key-message.patch4
-rw-r--r--config/grub/default/patches/0005-don-t-print-missing-prefix-errors-on-the-screen.patch4
-rw-r--r--config/grub/default/patches/0006-don-t-print-error-if-module-not-found.patch4
-rw-r--r--config/grub/default/patches/0007-don-t-print-empty-error-messages.patch4
-rw-r--r--config/grub/default/patches/0008-kern-coreboot-mmap-Map-to-reserved.patch4
-rw-r--r--config/grub/default/patches/0009-Revert-configure-Check-linker-for-image-base-support.patch13
-rw-r--r--config/grub/default/patches/0010-Revert-configure-Print-a-more-helpful-error-if-autoc.patch30
-rw-r--r--config/grub/default/patches/0011-bootstrap-Don-t-download-po-files.patch91
11 files changed, 146 insertions, 24 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
+