grub2/grub2-ppc64le-fix-bug-about-petitboot-doesn-t-ignore-EFI-entries.patch

34 lines
850 B
Diff
Raw Normal View History

From 801733fd3971ee681146f9eb6381cbaf78c3d4c4 Mon Sep 17 00:00:00 2001
From: peng_zou <peng.zou@shingroup.cn>
Date: Mon, 15 Jul 2024 14:45:16 +0800
Subject: [PATCH] fix bug about petitboot doesn't ignore EFI entries for
ppc64le
---
util/grub.d/95_textmode.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/util/grub.d/95_textmode.in b/util/grub.d/95_textmode.in
index d6c1dbf..9171f95 100644
--- a/util/grub.d/95_textmode.in
+++ b/util/grub.d/95_textmode.in
@@ -1,12 +1,13 @@
#!/bin/sh
cat <<EOF
-if [ "\${grub_platform}" = "efi" ]; then
+if [ -d /sys/firmware/efi ]; then
+ echo "
# On EFI systems we can only have graphics *or* serial, so allow the user
# to switch between the two
hiddenentry 'Text mode' --hotkey 't' {
set textmode=true
terminal_output console
- }
+ }"
fi
EOF
--
2.43.0