From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= Subject: Re: [PATCH v2 2/3] util/grub.d/20_linux_xen.in: Add arm64 support Date: Wed, 15 Jul 2015 18:24:19 +0200 Message-ID: <55A68933.70705@gmail.com> 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> Reply-To: The development of GNU GRUB Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4847857160971491910==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: grub-devel-bounces+gcbgd-grub-devel=m.gmane.org@gnu.org Sender: grub-devel-bounces+gcbgd-grub-devel=m.gmane.org@gnu.org To: Fu Wei , Andrei Borzenkov 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 List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============4847857160971491910== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ofUgFPNSpVSGjRBImo5tSAQP0srgUhhHD" 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-- --===============4847857160971491910== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel --===============4847857160971491910==--