From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: daniel.kiper@oracle.com, xen-devel@lists.xenproject.org,
grub-devel@gnu.org
Cc: Fu Wei <fu.wei@linaro.org>
Subject: Re: [PATCH 1/2] Fix util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
Date: Mon, 28 Aug 2017 14:42:18 -0400 [thread overview]
Message-ID: <20170828184218.GA28293@char.us.oracle.com> (raw)
In-Reply-To: <1503945615-1720-2-git-send-email-konrad.wilk@oracle.com>
On Mon, Aug 28, 2017 at 02:40:14PM -0400, Konrad Rzeszutek Wilk wrote:
> 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
>
> will result in 20_linux_xen exciting without continuing
> and also causing grub2-mkconfig to stop processing.
>
> As in:
git format-patch decided to eat this relevant part:
[root@tst063 grub]# ./grub-mkconfig | tail
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.13.0-0.rc5.git1.1.fc27.x86_64
Found initrd image: /boot/initramfs-4.13.0-0.rc5.git1.1.fc27.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2
Found initrd image: /boot/initramfs-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2.img
echo 'Loading Linux 0-rescue-ec082ee24aea41b9b16aca52a6d10cc2 ...'
linux /vmlinuz-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2 root=/dev/mapper/fedora_tst063-root ro single
echo 'Loading initial ramdisk ...'
initrd /initramfs-0-rescue-ec082ee24aea41b9b16aca52a6d10cc2.img
}
}
### END /usr/local/etc/grub.d/10_linux ###
### BEGIN /usr/local/etc/grub.d/20_linux_xen ###
root@tst063 grub]#
>
> [root@tst063 ~]#
>
> 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
> index c002fc9..083bcef 100644
> --- a/util/grub.d/20_linux_xen.in
> +++ b/util/grub.d/20_linux_xen.in
> @@ -206,13 +206,12 @@ while [ "x${xen_list}" != "x" ] ; do
> 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`
> --
> 2.1.4
>
next prev parent reply other threads:[~2017-08-28 18:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-28 18:40 [PATCH] Fix ARM multiboot2 breaking Fedora Konrad Rzeszutek Wilk
2017-08-28 18:40 ` [PATCH 1/2] Fix util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64 Konrad Rzeszutek Wilk
2017-08-28 18:42 ` Konrad Rzeszutek Wilk [this message]
2017-08-29 18:58 ` Daniel Kiper
2017-08-29 7:12 ` Fu Wei Fu
2017-08-29 13:29 ` Konrad Rzeszutek Wilk
2017-08-28 18:40 ` [PATCH 2/2] Use grub-file to figure out whether multiboot2 should be used for Xen.gz Konrad Rzeszutek Wilk
2017-08-29 19:04 ` Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170828184218.GA28293@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=daniel.kiper@oracle.com \
--cc=fu.wei@linaro.org \
--cc=grub-devel@gnu.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).