summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2024-04-11 15:39:11 -0400
committerMike Gilbert <floppym@gentoo.org>2024-04-11 15:40:40 -0400
commit597323aae87e1857d2c048dde3450e3c3c0c92c7 (patch)
treecf419be49f35b4a3d1e271d198187f7b0efd7784 /sys-boot
parentx11-apps/iceauth: Stabilize 1.0.10 ppc, #929187 (diff)
downloadgentoo-597323aae87e1857d2c048dde3450e3c3c0c92c7.tar.gz
gentoo-597323aae87e1857d2c048dde3450e3c3c0c92c7.tar.bz2
gentoo-597323aae87e1857d2c048dde3450e3c3c0c92c7.zip
sys-boot/grub: add workaround for fwsetup issue
Bug: https://bugs.gentoo.org/925370 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-boot')
-rw-r--r--sys-boot/grub/files/grub-2.12-fwsetup.patch38
-rw-r--r--sys-boot/grub/grub-2.12-r4.ebuild (renamed from sys-boot/grub/grub-2.12-r3.ebuild)1
2 files changed, 39 insertions, 0 deletions
diff --git a/sys-boot/grub/files/grub-2.12-fwsetup.patch b/sys-boot/grub/files/grub-2.12-fwsetup.patch
new file mode 100644
index 000000000000..d328d3f110ae
--- /dev/null
+++ b/sys-boot/grub/files/grub-2.12-fwsetup.patch
@@ -0,0 +1,38 @@
+From 6e0b2277eba062bf7950536cd27f9789c545d20f Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Thu, 11 Apr 2024 15:33:45 -0400
+Subject: [PATCH] grub.d: avoid calling fwsetup unconditionally
+
+This causes grub to enter the firmware setup on boot when using a
+grub core that does not support the 'fwsetup --is-supported' option.
+
+Upstream has rejected attempts to resolve this, so we will carry this as
+a distro patch for a bit.
+
+Bug: https://bugs.gentoo.org/925370
+---
+ util/grub.d/30_uefi-firmware.in | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in
+index 1c2365ddb..b6041b55e 100644
+--- a/util/grub.d/30_uefi-firmware.in
++++ b/util/grub.d/30_uefi-firmware.in
+@@ -32,11 +32,8 @@ gettext_printf "Adding boot menu entry for UEFI Firmware Settings ...\n" >&2
+
+ cat << EOF
+ if [ "\$grub_platform" = "efi" ]; then
+- fwsetup --is-supported
+- if [ "\$?" = 0 ]; then
+- menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' {
+- fwsetup
+- }
+- fi
++ menuentry '$LABEL' \$menuentry_id_option 'uefi-firmware' {
++ fwsetup
++ }
+ fi
+ EOF
+--
+2.44.0
+
diff --git a/sys-boot/grub/grub-2.12-r3.ebuild b/sys-boot/grub/grub-2.12-r4.ebuild
index cfeaf9fca9f8..fe97c8b890c1 100644
--- a/sys-boot/grub/grub-2.12-r3.ebuild
+++ b/sys-boot/grub/grub-2.12-r4.ebuild
@@ -162,6 +162,7 @@ src_prepare() {
"${FILESDIR}"/gfxpayload.patch
"${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
"${FILESDIR}"/grub-2.06-test-words.patch
+ "${FILESDIR}"/grub-2.12-fwsetup.patch
"${WORKDIR}"/grub-2.12-bash-completion.patch
)