aboutsummaryrefslogtreecommitdiffstats
path: root/main/grub/0003-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch
diff options
context:
space:
mode:
authorWilliam Johansson <radar@radhuset.org>2020-01-11 13:24:43 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2020-01-14 15:13:34 +0100
commitb7caea4ed901b29d13b4b4b51f475bc08db4f821 (patch)
tree4e970357540e584d1590cc79aa9756e02a3ed28d /main/grub/0003-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch
parent1e2c55d2816f515098c333d4346a6321f5bffcdb (diff)
downloadaports-b7caea4ed901b29d13b4b4b51f475bc08db4f821.tar.bz2
aports-b7caea4ed901b29d13b4b4b51f475bc08db4f821.tar.xz
main/grub: fix booting Xen under EFI
Need to use multiboot2 while booting Xen under EFI, and not multiboot as is used when generating grub.cfg with grub-mkconfig. Backport commits included in upstream Grub 2.04. Diskless setups are not affected, as grub.cfg is generated manually by the mkimage scipts. (cherry picked from commit 6b9be75ec9776ac0f8ced9d888106194ae61b4f0)
Diffstat (limited to 'main/grub/0003-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch')
-rw-r--r--main/grub/0003-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/main/grub/0003-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch b/main/grub/0003-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch
new file mode 100644
index 0000000000..63ade92a27
--- /dev/null
+++ b/main/grub/0003-Use-grub-file-to-figure-out-whether-multiboot2-shoul.patch
@@ -0,0 +1,40 @@
+From b4148dbeceee4a2fe4e99acdeeb86edc5e4eed01 Mon Sep 17 00:00:00 2001
+From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Date: Tue, 29 Aug 2017 16:40:53 -0400
+Subject: [PATCH 3/3] Use grub-file to figure out whether multiboot2 should be
+ used for Xen.gz
+
+The multiboot2 is much more preferable than multiboot. Especiall
+if booting under EFI where multiboot does not have the functionality
+to pass ImageHandler.
+
+Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+(cherry picked from commit b4d709b6ee789cdaf3fa7a80fd90c721a16f48c2)
+---
+ util/grub.d/20_linux_xen.in | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
+index 083bcef5d..0cb0f4e49 100644
+--- a/util/grub.d/20_linux_xen.in
++++ b/util/grub.d/20_linux_xen.in
+@@ -210,8 +210,13 @@ while [ "x${xen_list}" != "x" ] ; do
+ xen_loader="xen_hypervisor"
+ module_loader="xen_module"
+ else
+- xen_loader="multiboot"
+- module_loader="module"
++ if ($grub_file --is-x86-multiboot2 $current_xen); then
++ xen_loader="multiboot2"
++ module_loader="module2"
++ else
++ xen_loader="multiboot"
++ module_loader="module"
++ fi
+ fi
+ while [ "x$list" != "x" ] ; do
+ linux=`version_find_latest $list`
+--
+2.24.1
+