mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sys-boot/grub: backport EFI video fix
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
41
sys-boot/grub/files/grub-2.14-efi_uga.patch
Normal file
41
sys-boot/grub/files/grub-2.14-efi_uga.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
https://gitlab.freedesktop.org/gnu-grub/grub/-/merge_requests/10
|
||||
|
||||
From 129588e498647842c6f13f7809ef9ac583e2351b Mon Sep 17 00:00:00 2001
|
||||
From: Egor Ignatov <egori@altlinux.org>
|
||||
Date: Thu, 19 Mar 2026 17:22:11 +0500
|
||||
Subject: [PATCH] util/grub.d/00_header.in: Load efi_uga only on x86 EFI
|
||||
platforms
|
||||
|
||||
The efi_uga module is only built for i386-efi and x86_64-efi firmware), but
|
||||
commit ea0b76dc4a ("Disable loading all_video for EFI") loads it unconditionally
|
||||
on all EFI platforms. This causes a "file not found" error on aarch64-efi and
|
||||
other non-x86 EFI targets.
|
||||
|
||||
Guard the insmod with a $grub_cpu check so the module is only
|
||||
loaded where it is actually available.
|
||||
|
||||
Fixes: ea0b76dc4 ("util/grub.d/00_header.in: Disable loading all_video for EFI")
|
||||
|
||||
Signed-off-by: Egor Ignatov <egori@altlinux.org>
|
||||
---
|
||||
util/grub.d/00_header.in | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
|
||||
index 77834cfaf..1afe41e67 100644
|
||||
--- a/util/grub.d/00_header.in
|
||||
+++ b/util/grub.d/00_header.in
|
||||
@@ -135,7 +135,9 @@ else # GRUB_FORCE_EFI_ALL_VIDEO is not set true
|
||||
cat <<EOF
|
||||
if [ x\$grub_platform = xefi ]; then
|
||||
insmod efi_gop
|
||||
- insmod efi_uga
|
||||
+ if [ x\$grub_cpu = xi386 -o x\$grub_cpu = xx86_64 ]; then
|
||||
+ insmod efi_uga
|
||||
+ fi
|
||||
elif [ x\$feature_all_video_module = xy ]; then
|
||||
EOF
|
||||
fi # end GRUB_FORCE_EFI_ALL_VIDEO
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -181,6 +181,7 @@ src_prepare() {
|
||||
|
||||
local PATCHES=(
|
||||
"${WORKDIR}/${P}-patches"
|
||||
"${FILESDIR}/${P}-efi_uga.patch"
|
||||
)
|
||||
|
||||
default
|
||||
Reference in New Issue
Block a user