forked from pool/grub2
2764c99fe0
I think it is good time to update to 2.02 so it can get more testing. Although internal changes are pretty extensive, externally it should be pretty much the same. The main user visible changes are - autogen is not used anymore, so we can finally simplify patches and recreate files during RPM build. So generated files need not be patched and shipped any more. - GRUB_HIDDEN_TIMEOUT is deprecated, we should use GRUB_TIMEOUT_STYLE instead. This will need perl-Bootloader and YaST changes. Old config is still accpepted so nothing should be broken. - native pvgrub2 support for Xen PV guests. - ARM support (32 and 64 bit), although it has rough edges. OBS-URL: https://build.opensuse.org/request/show/212604 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=62
64 lines
2.5 KiB
Diff
64 lines
2.5 KiB
Diff
From 795ac61cba9674376d745813efdab395e35cff41 Mon Sep 17 00:00:00 2001
|
|
From: Michael Chang <mchang@suse.com>
|
|
Date: Mon, 26 Nov 2012 15:38:54 +0800
|
|
Subject: [PATCH] provide option in config to enable linuxefi
|
|
|
|
References: fate#314485
|
|
Patch-Mainline: no
|
|
|
|
As linuxefi module requires kernel 3.6 or later which supports EFI
|
|
handover protocol, it may not be able to load kernels without that
|
|
supports in place.
|
|
|
|
In case that things would break, and the linuxefi is really too young to
|
|
take over the position of "linux" kernel loader module, we introduce a
|
|
option GRUB_USE_LINUXEFI in the config and only explicit set it to true
|
|
will enable it. Example usage is
|
|
|
|
GRUB_USE_LINUXEFI=true grub2-mkconfig -o /boot/efi/EFI/opensuse/grub.cfg
|
|
|
|
This will output a grub.cfg which uses linuxefi in replace of linux and
|
|
enable verification of kernel signature if in secureboot enabled and
|
|
has shim exported protocols available.
|
|
---
|
|
util/grub-mkconfig.in | 3 ++-
|
|
util/grub.d/10_linux.in | 4 ++--
|
|
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
Index: grub-2.00/util/grub-mkconfig.in
|
|
===================================================================
|
|
--- grub-2.00.orig/util/grub-mkconfig.in
|
|
+++ grub-2.00/util/grub-mkconfig.in
|
|
@@ -245,7 +245,8 @@ export GRUB_DEFAULT \
|
|
GRUB_BADRAM \
|
|
GRUB_OS_PROBER_SKIP_LIST \
|
|
GRUB_DISABLE_SUBMENU \
|
|
- GRUB_CMDLINE_LINUX_RECOVERY
|
|
+ GRUB_CMDLINE_LINUX_RECOVERY \
|
|
+ GRUB_USE_LINUXEFI
|
|
|
|
if test "x${grub_cfg}" != "x"; then
|
|
rm -f "${grub_cfg}.new"
|
|
Index: grub-2.00/util/grub.d/10_linux.in
|
|
===================================================================
|
|
--- grub-2.00.orig/util/grub.d/10_linux.in
|
|
+++ grub-2.00/util/grub.d/10_linux.in
|
|
@@ -133,7 +133,7 @@ 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
|
|
+ if [ -d /sys/firmware/efi ] && [ "x${GRUB_USE_LINUXEFI}" = "xtrue" ]; then
|
|
sed "s/^/$submenu_indentation/" << EOF
|
|
echo '$message'
|
|
linuxefi ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
|
@@ -147,7 +147,7 @@ EOF
|
|
if test -n "${initrd}" ; then
|
|
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
|
|
message="$(gettext_printf "Loading initial ramdisk ...")"
|
|
- if [ -d /sys/firmware/efi ]; then
|
|
+ if [ -d /sys/firmware/efi ] && [ "x${GRUB_USE_LINUXEFI}" = "xtrue" ]; then
|
|
sed "s/^/$submenu_indentation/" << EOF
|
|
echo '$message'
|
|
initrdefi ${rel_dirname}/${initrd}
|