From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZFPU1-0006dr-CB for mharc-grub-devel@gnu.org; Wed, 15 Jul 2015 12:24:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFPTz-0006cJ-ID for grub-devel@gnu.org; Wed, 15 Jul 2015 12:24:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFPTq-0001bY-14 for grub-devel@gnu.org; Wed, 15 Jul 2015 12:24:31 -0400 Received: from mail-wg0-x231.google.com ([2a00:1450:400c:c00::231]:36637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFPTp-0001ZM-NJ for grub-devel@gnu.org; Wed, 15 Jul 2015 12:24:21 -0400 Received: by wgxm20 with SMTP id m20so37879174wgx.3 for ; Wed, 15 Jul 2015 09:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=KlWP8QLUymm0MJvBumXjg02yb7mFKTUlzKx34f64R40=; b=TIVzGrCjQqdb5gwM/GkCX1BbwQbneu9iGyZSbUQoGyqMKvec09oLxr/RzwPiu8Y9lg xAs0/TRRfzpdtw+mB4ISUVZ/GNUWLyUsDNsnQyekwiT9NtKAdg/5xZFPzh/8uAfRD+Iq Iwnu3/LdDXK1b5NrJHEsjmZtGMFBIcMSlIhn29+em9AHGxEucLruoDzRVMRVDWzrl3e4 +nAABWbHT8Uh9oeaqtg70vFpihpQFnHkfuGcLEdyg/dxKIxy7Z37lBxy9KccHA2+/Ipb /Ua6xYYBDxslmXlcd6D3y6SGDqJEGQqMIqS5aY4Pw+QmYdfUX0LEsB8fVZqtlXWY5Q5e LP/w== X-Received: by 10.180.14.101 with SMTP id o5mr603708wic.82.1436977460735; Wed, 15 Jul 2015 09:24:20 -0700 (PDT) Received: from ?IPv6:2620:0:105f:fd00:863a:4bff:fe50:abc4? ([2620:0:105f:fd00:863a:4bff:fe50:abc4]) by smtp.gmail.com with ESMTPSA id sc16sm8644758wjb.28.2015.07.15.09.24.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jul 2015 09:24:19 -0700 (PDT) Message-ID: <55A68933.70705@gmail.com> Date: Wed, 15 Jul 2015 18:24:19 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Fu Wei , Andrei Borzenkov Subject: Re: [PATCH v2 2/3] util/grub.d/20_linux_xen.in: Add arm64 support References: <=fu.wei@linaro.org> <1436777640-31871-1-git-send-email-fu.wei@linaro.org> <1436777640-31871-3-git-send-email-fu.wei@linaro.org> <20150714065317.36dc83aa@opensuse.site> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ofUgFPNSpVSGjRBImo5tSAQP0srgUhhHD" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::231 Cc: The development of GNU GRUB , xen-devel@lists.xensource.com, Ian Campbell , Stefano Stabellini , Jon Masters , Leif Lindholm , Ryan Harkin , Linaro UEFI Mailman List X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2015 16:24:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ofUgFPNSpVSGjRBImo5tSAQP0srgUhhHD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 14.07.2015 15:09, Fu Wei wrote: > Hi Andrei, >=20 > Great thanks for your review. >=20 > So Are you suggesting this: > (1) in util/grub.d/20_linux_xen.in, we only use xen_hypervisor/xen_modu= le. > (2) in xen_boot.c, we only register command xen_hypervisor/xen_module. > (3) in grub-core/loader/i386/xen.c, we *add* > --------------- > cmd_xen_hypervisort =3D grub_register_command ("xen_hypervisor", grub= _cmd_xen, > 0, N_("Load Linux.")); > cmd_xen_module =3D grub_register_command ("xen_module", grub_cmd_modu= le, > 0, N_("Load module.")); No. This is for pvgrub2. > --------------- > (4)in grub-core/loader/multiboot.c, we *add* > --------------- > #if defined (__i386__) || defined (__aarch64__) > cmd_xen_hypervisort =3D > grub_register_command ("xen_hypervisor", grub_cmd_multiboot, > 0, N_("Load a multiboot kernel.")); > cmd_xen_module =3D > grub_register_command ("xen_module", grub_cmd_module, > 0, N_("Load a multiboot module.")); > #endif No. Don't mix arm64 xen with multiboot. Neither in command names nor in the descriptions. > --------------- >=20 > BTW, from the source code, MIPS isn't supported by multiboot, IS > supported by multiboot2. >=20 > Please correct me. If I misunderstand your suggestion. :-) >=20 > Thanks again! >=20 >=20 > On 14 July 2015 at 11:53, Andrei Borzenkov wrote:= >> =D0=92 Mon, 13 Jul 2015 16:53:59 +0800 >> fu.wei@linaro.org =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> >>> From: Fu Wei >>> >>> This patch adds the support of boot command on arm64 for XEN: >>> xen_hypervisor >>> xen_module >>> >>> Signed-off-by: Fu Wei >>> --- >>> util/grub.d/20_linux_xen.in | 14 +++++++++++--- >>> 1 file changed, 11 insertions(+), 3 deletions(-) >>> >>> diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.i= n >>> index f532fb9..b52c50d 100644 >>> --- a/util/grub.d/20_linux_xen.in >>> +++ b/util/grub.d/20_linux_xen.in >>> @@ -120,16 +120,16 @@ linux_entry () >>> else >>> xen_rm_opts=3D"no-real-mode edd=3Doff" >>> fi >>> - multiboot ${rel_xen_dirname}/${xen_basename} placeholder = ${xen_args} \${xen_rm_opts} >>> + ${multiboot_cmd} ${rel_xen_dirname}/${xen_basename} plac= eholder ${xen_args} \${xen_rm_opts} >>> echo '$(echo "$lmessage" | grub_quote)' >>> - module ${rel_dirname}/${basename} placeholder root=3D${linux_r= oot_device_thisversion} ro ${args} >>> + ${module_cmd} ${rel_dirname}/${basename} placeholder 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_cmd} --nounzip ${rel_dirname}/${initrd} >>> EOF >>> fi >>> sed "s/^/$submenu_indentation/" << EOF >>> @@ -185,6 +185,14 @@ case "$machine" in >>> *) GENKERNEL_ARCH=3D"$machine" ;; >>> esac >>> >>> +if [ "x$machine" !=3D xaarch64 ]; then >>> + multiboot_cmd=3D"multiboot" >>> + module_cmd=3D"module" >>> +else >>> + multiboot_cmd=3D"xen_hypervisor" >>> + module_cmd=3D"xen_module" >>> +fi >>> + >> >> Strictly speaking, this is boot-time decision. As mentioned by >> Vladimir, better would be to provide alias xen_hypervisor and >> xen_module in multiboot for platforms supporting Xen (is MIPS really >> supported?) and use it consistently. >> >>> # Extra indentation to add to menu entries in a submenu. We're not i= n a submenu >>> # yet, so it's empty. In a submenu it will be equal to '\t' (one tab= ). >>> submenu_indentation=3D"" >> >=20 >=20 >=20 --ofUgFPNSpVSGjRBImo5tSAQP0srgUhhHD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREKAAYFAlWmiTMACgkQmBXlbbo5nOt2JQEAiIZV+kntj4TNoBNBZCXBskF7 jpD2e+a0fLdL+W8jwSgA/1tuSf8VemzL/hrHvYOngoIXvfpftPaoDAjkcHtbzUOX =Dsln -----END PGP SIGNATURE----- --ofUgFPNSpVSGjRBImo5tSAQP0srgUhhHD--