File 0001-Avoid-efi_uga-on-non-x86-platform.patch of Package grub2

From 352a80898824a9787070efaa009afc898d339935 Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Thu, 22 Jan 2026 18:19:23 +0800
Subject: [PATCH] Avoid efi_uga on non x86 platform

---
 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 ffb50847f..63d8a1f38 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -179,7 +179,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 = xx86_64 -o x\$grub_cpu = xi386 ]; then
+        insmod efi_uga
+    fi
   elif [ x\$feature_all_video_module = xy ]; then
 EOF
 fi # end GRUB_FORCE_EFI_ALL_VIDEO
-- 
2.52.0

openSUSE Build Service is sponsored by