2018-04-11 18:42:03 +00:00
|
|
|
From cba0322cd88baf136ac693f5ec1826f3314daeff Mon Sep 17 00:00:00 2001
|
2017-10-24 16:49:30 +00:00
|
|
|
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
2018-01-17 22:04:09 +00:00
|
|
|
Date: Mon, 28 Aug 2017 13:51:14 -0400
|
2018-07-09 17:32:57 +00:00
|
|
|
Subject: [PATCH 193/251] Fix util/grub.d/20_linux_xen.in: Add xen_boot command
|
2017-10-24 16:49:30 +00:00
|
|
|
support for aarch64
|
|
|
|
|
|
|
|
Commit d33045ce7ffcb7c1e4a60c14d5ca64b36e3c5abe introduced
|
|
|
|
the support for this, but it does not work under x86 (as it stops
|
|
|
|
20_linux_xen from running).
|
|
|
|
|
|
|
|
The 20_linux_xen is run under a shell and any exits from within it:
|
|
|
|
|
|
|
|
(For example on x86):
|
|
|
|
+ /usr/bin/grub2-file --is-arm64-efi /boot/xen-4.9.0.gz
|
|
|
|
[root@tst063 grub]# echo $?
|
|
|
|
1
|
|
|
|
|
2018-01-17 22:04:09 +00:00
|
|
|
will result in 20_linux_xen exciting without continuing
|
2017-10-24 16:49:30 +00:00
|
|
|
and also causing grub2-mkconfig to stop processing.
|
|
|
|
|
|
|
|
As in:
|
|
|
|
|
2018-01-17 22:04:09 +00:00
|
|
|
[root@tst063 ~]#
|
2017-10-24 16:49:30 +00:00
|
|
|
|
|
|
|
And no more.
|
|
|
|
|
|
|
|
This patch wraps the invocation of grub-file to be a in subshell
|
|
|
|
and to process the return value in a conditional. That fixes
|
|
|
|
the issue.
|
|
|
|
|
|
|
|
RH-BZ 1486002: grub2-mkconfig does not work if xen.gz is installed.
|
|
|
|
CC: Fu Wei <fu.wei@linaro.org>
|
|
|
|
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
|
|
---
|
|
|
|
util/grub.d/20_linux_xen.in | 9 ++++-----
|
|
|
|
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
|
2018-02-27 18:56:41 +00:00
|
|
|
index 462f8e1f819..9b1bd716965 100644
|
2017-10-24 16:49:30 +00:00
|
|
|
--- a/util/grub.d/20_linux_xen.in
|
|
|
|
+++ b/util/grub.d/20_linux_xen.in
|
2018-01-17 22:04:09 +00:00
|
|
|
@@ -210,13 +210,12 @@ while [ "x${xen_list}" != "x" ] ; do
|
2017-10-24 16:49:30 +00:00
|
|
|
if [ "x$is_top_level" != xtrue ]; then
|
|
|
|
echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
|
|
|
|
fi
|
|
|
|
- $grub_file --is-arm64-efi $current_xen
|
|
|
|
- if [ $? -ne 0 ]; then
|
|
|
|
- xen_loader="multiboot"
|
|
|
|
- module_loader="module"
|
|
|
|
- else
|
|
|
|
+ if ($grub_file --is-arm64-efi $current_xen); then
|
|
|
|
xen_loader="xen_hypervisor"
|
|
|
|
module_loader="xen_module"
|
|
|
|
+ else
|
|
|
|
+ xen_loader="multiboot"
|
|
|
|
+ module_loader="module"
|
|
|
|
fi
|
|
|
|
while [ "x$list" != "x" ] ; do
|
|
|
|
linux=`version_find_latest $list`
|
|
|
|
--
|
2018-06-04 16:28:07 +00:00
|
|
|
2.17.1
|
2017-10-24 16:49:30 +00:00
|
|
|
|