From: Fu Wei <fu.wei@linaro.org>
To: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
Stefano Stabellini <sstabellini@kernel.org>,
arvidjaar@gmail.com, Jon Masters <jcm@redhat.com>,
ian.campbell@docker.com, Leif Lindholm <leif.lindholm@linaro.org>,
Julien Grall <julien.grall@arm.com>,
xen-devel@lists.xensource.com,
Linaro UEFI Mailman List <linaro-uefi@lists.linaro.org>,
Daniel Kiper <dkiper@net-space.pl>
Subject: Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64
Date: Sun, 14 May 2017 15:53:04 +0800 [thread overview]
Message-ID: <CADyBb7vEveM4h2emCDk4PFB3Wv1XHL=kHMyD6OSAVmWaSTFFxw@mail.gmail.com> (raw)
In-Reply-To: <CADyBb7uecdFLF7kjOuVqwtPKLW14pL5s+CdECxm9RuYUGUWbFA@mail.gmail.com>
Hi Vladimir,
On 11 May 2017 at 22:25, Fu Wei <fu.wei@linaro.org> wrote:
> Hi Vladimir,
>
> On 11 May 2017 at 06:01, Vladimir 'phcoder' Serbinenko
> <phcoder@gmail.com> wrote:
>>
>>
>> On Tue, May 9, 2017, 11:02 Fu Wei <fu.wei@linaro.org> wrote:
>>>
>>> Hi Vladimir
>>>
>>> On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
>>> wrote:
>>> >
>>> >
>>> > Le Tue, May 2, 2017 à 9:06 AM, <fu.wei@linaro.org> a écrit :
>>> >>
>>> >> From: Fu Wei <fu.wei@linaro.org>
>>> >>
>>> >> This patch adds the support of xen_boot command for aarch64:
>>> >> xen_hypervisor
>>> >> xen_module
>>> >> These two commands are only for aarch64, since it has its own protocol
>>> >> and
>>> >> commands to boot xen hypervisor and Dom0, but not multiboot.
>>> >>
>>> >> For other architectures, they are still using multiboot and module
>>> >> commands.
>>> >>
>>> >> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>> >> ---
>>> >> util/grub.d/20_linux_xen.in | 13 ++++++++++---
>>> >> 1 file changed, 10 insertions(+), 3 deletions(-)
>>> >>
>>> >> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
>>> >> index c48af94..9777719 100644
>>> >> --- a/util/grub.d/20_linux_xen.in
>>> >> +++ b/util/grub.d/20_linux_xen.in
>>> >> @@ -122,16 +122,16 @@ linux_entry ()
>>> >> else
>>> >> xen_rm_opts="no-real-mode edd=off"
>>> >> fi
>>> >> - multiboot ${rel_xen_dirname}/${xen_basename} placeholder
>>> >> ${xen_args} \${xen_rm_opts}
>>> >> + ${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder
>>> >> ${xen_args} \${xen_rm_opts}
>>> >> echo '$(echo "$lmessage" | grub_quote)'
>>> >> - module ${rel_dirname}/${basename} placeholder
>>> >> root=${linux_root_device_thisversion} ro ${args}
>>> >> + ${module_loader} ${rel_dirname}/${basename} placeholder
>>> >> root=${linux_root_device_thisversion} ro ${args}
>>> >> EOF
>>> >> if test -n "${initrd}" ; then
>>> >> # TRANSLATORS: ramdisk isn't identifier. Should be translated.
>>> >> message="$(gettext_printf "Loading initial ramdisk ...")"
>>> >> sed "s/^/$submenu_indentation/" << EOF
>>> >> echo '$(echo "$message" | grub_quote)'
>>> >> - module --nounzip ${rel_dirname}/${initrd}
>>> >> + ${module_loader} --nounzip ${rel_dirname}/${initrd}
>>> >> EOF
>>> >> fi
>>> >> sed "s/^/$submenu_indentation/" << EOF
>>> >> @@ -206,6 +206,13 @@ 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
>>> >> + if [ "x$machine" != xaarch64 ]; then
>>> >
>>> > Machine of grub-mkconfig doesn't necessarily match the kernel. Think of
>>> > chroot or of having 32-bit userspace with 64-bit kernel. Better to do
>>> > this
>>> > on runtime. I know, it's not very nice but the whole grub-mkconfig is
>>> > trouble that needs redesign that I'm working on.
>>>
>>> So if we need to do this at run time(in grub shell), can I use
>>> "grub_cpu" variable instead?
>>
>> Yes, you can. Another possibility, probably better, is to check actual file
>> type, see grub-file
>
> Very good idea, will do in my v8 patchset, will send v8 in a day.
I have posted v8 patchset which is using “$grub_file”, please help me
to review it :-)
Great thanks!
>
>>>
>>>
>>> Thanks!
>>>
>>> >>
>>> >> + xen_loader="multiboot"
>>> >> + module_loader="module"
>>> >> + else
>>> >> + xen_loader="xen_hypervisor"
>>> >> + module_loader="xen_module"
>>> >> + fi
>>> >> while [ "x$list" != "x" ] ; do
>>> >> linux=`version_find_latest $list`
>>> >> gettext_printf "Found linux image: %s\n" "$linux" >&2
>>> >> --
>>> >> 2.9.3
>>> >>
>>> >
>>>
>>>
>>>
>>> --
>>> Best regards,
>>>
>>> Fu Wei
>>> Software Engineer
>>> Red Hat
>
>
>
> --
> Best regards,
>
> Fu Wei
> Software Engineer
> Red Hat
--
Best regards,
Fu Wei
Software Engineer
Red Hat
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2017-05-14 7:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-02 7:06 [PATCH v7 0/3] arm64,xen: add xen_boot support into grup-mkconfig fu.wei
2017-05-02 7:06 ` [PATCH v7 1/3] arm64: add "--nounzip" option support in xen_module command fu.wei
2017-05-09 6:56 ` Vladimir 'phcoder' Serbinenko
2017-05-09 8:42 ` Fu Wei
2017-05-02 7:06 ` [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64 fu.wei
2017-05-03 19:13 ` [Xen-devel] " Andrew Cooper
2017-05-03 20:53 ` Stefano Stabellini
2017-05-05 8:57 ` [Xen-devel] " Fu Wei
2017-05-05 9:01 ` Andrew Cooper
2017-05-05 9:25 ` Fu Wei
2017-05-05 10:11 ` [Xen-devel] " Julien Grall
2017-05-05 10:41 ` Fu Wei
2017-05-09 6:59 ` Vladimir 'phcoder' Serbinenko
2017-05-09 9:02 ` Fu Wei
2017-05-09 9:39 ` Fu Wei
2017-05-10 22:01 ` Vladimir 'phcoder' Serbinenko
2017-05-11 14:25 ` Fu Wei
2017-05-14 7:53 ` Fu Wei [this message]
2017-05-02 7:06 ` [PATCH v7 3/3] arm64: update the introduction of xen boot commands in docs/grub.texi fu.wei
2017-05-02 7:24 ` [PATCH v7 0/3] arm64, xen: add xen_boot support into grup-mkconfig Fu Wei
2017-05-04 16:00 ` Daniel Kiper
2017-05-05 8:52 ` Fu Wei
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='CADyBb7vEveM4h2emCDk4PFB3Wv1XHL=kHMyD6OSAVmWaSTFFxw@mail.gmail.com' \
--to=fu.wei@linaro.org \
--cc=arvidjaar@gmail.com \
--cc=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
--cc=ian.campbell@docker.com \
--cc=jcm@redhat.com \
--cc=julien.grall@arm.com \
--cc=leif.lindholm@linaro.org \
--cc=linaro-uefi@lists.linaro.org \
--cc=phcoder@gmail.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xensource.com \
/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).