From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1d9oL0-0000z2-35 for mharc-grub-devel@gnu.org; Sun, 14 May 2017 03:53:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9oKx-0000yY-8Z for grub-devel@gnu.org; Sun, 14 May 2017 03:53:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9oKw-0002cw-9O for grub-devel@gnu.org; Sun, 14 May 2017 03:53:07 -0400 Received: from mail-it0-x232.google.com ([2607:f8b0:4001:c0b::232]:36096) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d9oKw-0002cq-2H for grub-devel@gnu.org; Sun, 14 May 2017 03:53:06 -0400 Received: by mail-it0-x232.google.com with SMTP id o5so29304280ith.1 for ; Sun, 14 May 2017 00:53:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=6iMaVRTkR/L2GHkDi0wM41QCdq8cGyBrwwTXrpNGm/A=; b=LtxQUYe017aFSNewE+tu8CI8XVTIcLPMQo9GY+fhBwvxDTvO6Pux5Z8nfO4SyYWh/p Uo91v8wIi3++wyLhQGdL0Dga+GRA2LML6TrE3kehA2VvfKHf1XJrgiloQ+J6K7Ob6maR OqH1Uo2lYvDSbs/6QzughFUwNsXdmDWV7nmpM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=6iMaVRTkR/L2GHkDi0wM41QCdq8cGyBrwwTXrpNGm/A=; b=jbbcUDVdX3FFD/lOizX44D3ahza/I+7eAE6iaeJcUF33UuZBpLsqY5Sq2hIK9OpcI/ 4bW8CNFxR+RWEaUWYRbHXQFGJYQ8Cg6rfNjYtk1gDZ+s+BXosqrI2LTp+226YnhUzbHC ht840mck7kqWsGAbHORFaMZShK9ZzMp466eZIvpexOpXDYDYlx4d+7Q2SmE4PwKljxpE dKTkV3XeE2Hk2ph5Pp5fX1Ej6ZlYwRLkwuH0CqijQQo1gQg0JyIKBegb1Fk9VLbiy73U Yx4io8hIgifxcAEit9W0N3W+0OqzSNdGJqBvobutngcbc64yzVbSfLBePVQfiWraXNe9 wyvA== X-Gm-Message-State: AODbwcCBVhA+lezafGcWRlLxh1yXHePk6Urxlf9v0D9kF+wqYD1BKwrK um/PAHG48xLEDC7QaibzovUXTBvMZUZ3 X-Received: by 10.36.228.141 with SMTP id o135mr305482ith.40.1494748384963; Sun, 14 May 2017 00:53:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.171.72 with HTTP; Sun, 14 May 2017 00:53:04 -0700 (PDT) In-Reply-To: References: <20170502070627.11389-1-fu.wei@linaro.org> <20170502070627.11389-3-fu.wei@linaro.org> From: Fu Wei Date: Sun, 14 May 2017 15:53:04 +0800 Message-ID: Subject: Re: [PATCH v7 2/3] * util/grub.d/20_linux_xen.in: Add xen_boot command support for aarch64 To: "Vladimir 'phcoder' Serbinenko" Cc: Daniel Kiper , Jon Masters , Julien Grall , Leif Lindholm , Linaro UEFI Mailman List , Stefano Stabellini , The development of GNU GRUB , arvidjaar@gmail.com, ian.campbell@docker.com, xen-devel@lists.xensource.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::232 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 07:53:08 -0000 Hi Vladimir, On 11 May 2017 at 22:25, Fu Wei wrote: > Hi Vladimir, > > On 11 May 2017 at 06:01, Vladimir 'phcoder' Serbinenko > wrote: >> >> >> On Tue, May 9, 2017, 11:02 Fu Wei wrote: >>> >>> Hi Vladimir >>> >>> On 9 May 2017 at 14:59, Vladimir 'phcoder' Serbinenko >>> wrote: >>> > >>> > >>> > Le Tue, May 2, 2017 =C3=A0 9:06 AM, a =C3=A9crit = : >>> >> >>> >> From: Fu Wei >>> >> >>> >> 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 protoc= ol >>> >> 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 >>> >> --- >>> >> 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=3D"no-real-mode edd=3Doff" >>> >> fi >>> >> - multiboot ${rel_xen_dirname}/${xen_basename} placehold= er >>> >> ${xen_args} \${xen_rm_opts} >>> >> + ${xen_loader} ${rel_xen_dirname}/${xen_basename} placehold= er >>> >> ${xen_args} \${xen_rm_opts} >>> >> echo '$(echo "$lmessage" | grub_quote)' >>> >> - module ${rel_dirname}/${basename} placeholder >>> >> root=3D${linux_root_device_thisversion} ro ${args} >>> >> + ${module_loader} ${rel_dirname}/${basename} placehold= er >>> >> root=3D${linux_root_device_thisversion} ro ${args} >>> >> EOF >>> >> if test -n "${initrd}" ; then >>> >> # TRANSLATORS: ramdisk isn't identifier. Should be translated. >>> >> message=3D"$(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}" !=3D "x" ] ; do >>> >> if [ "x$is_top_level" !=3D 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" !=3D 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 f= ile >> 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 =E2=80=9C$grub_file=E2=80=9D, plea= se help me to review it :-) Great thanks! > >>> >>> >>> Thanks! >>> >>> >> >>> >> + xen_loader=3D"multiboot" >>> >> + module_loader=3D"module" >>> >> + else >>> >> + xen_loader=3D"xen_hypervisor" >>> >> + module_loader=3D"xen_module" >>> >> + fi >>> >> while [ "x$list" !=3D "x" ] ; do >>> >> linux=3D`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 --=20 Best regards, Fu Wei Software Engineer Red Hat