grub2/0172-Use-linuxefi-and-initrdefi-where-appropriate.patch
Peter Jones 6b2dd0f731 Another arm building fix.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-07-12 10:56:34 -04:00

40 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 16 Jul 2012 18:57:11 -0400
Subject: [PATCH] Use "linuxefi" and "initrdefi" where appropriate.
---
util/grub.d/10_linux.in | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 87a7da34982..37d539fcf93 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -139,9 +139,16 @@ linux_entry ()
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
message="$(gettext_printf "Loading Linux %s ..." ${version})"
+ if [ -d /sys/firmware/efi ]; then
+ linuxcmd=linuxefi
+ initrdcmd=initrdefi
+ else
+ linuxcmd=linux
+ initrdcmd=initrd
+ fi
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
+ ${linuxcmd} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
@@ -152,7 +159,7 @@ EOF
done
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
- initrd $(echo $initrd_path)
+ ${initrdcmd} $(echo $initrd_path)
EOF
fi
sed "s/^/$submenu_indentation/" << EOF