From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Vladimir_'=cf=86-coder/phcoder'_Serbinenko?= Subject: Re: [PATCH v3 3/4] * util/grub.d/20_linux_xen.in: Add support of the XEN boot on aarch64 Date: Fri, 30 Oct 2015 10:50:34 +0100 Message-ID: <56333D6A.2080506@gmail.com> References: <=fu.wei@linaro.org> <1437628583-23667-1-git-send-email-fu.wei@linaro.org> <1437628583-23667-4-git-send-email-fu.wei@linaro.org> <56323A72.3000905@gmail.com> Reply-To: The development of GNU GRUB Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9058542468451195993==" 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 Cc: The development of GNU GRUB , xen-devel@lists.xensource.com, Ian Campbell , Stefano Stabellini , Andrei Borzenkov , 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) --===============9058542468451195993== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nutsjjVUTrv0ElHT104Nwta3Cjnb5o0ld" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nutsjjVUTrv0ElHT104Nwta3Cjnb5o0ld Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 30.10.2015 09:44, Fu Wei wrote: > Hi Vladimir, >=20 > Great thanks for your suggestion! :-) >=20 > On 29 October 2015 at 23:25, Vladimir '=CF=86-coder/phcoder' Serbinenko= > wrote: >>> +if [ "x$machine" !=3D xaarch64 ]; then >>> + multiboot_cmd=3D"multiboot" >>> + module_linux_cmd=3D"module" >>> + module_initrd_cmd=3D"module --nounzip" >>> +else >>> + multiboot_cmd=3D"xen_hypervisor" >>> + module_linux_cmd=3D"xen_linux" >>> + module_initrd_cmd=3D"xen_initrd" >>> +fi >>> + >> Please do not hardcode an assumption that grub-mkconfig is executed on= >> the same machine as GRUB is booted. I know that we have instances of >> such assumption in some cases but we'd like to eliminate them. Alterna= tives: >> - Check arch on boot time >=20 >=20 >> - Check that new xen commands are supported (define a new feature) >> Please add xen_* aliases on x86 as well > I would like to go this way, but could you provide some help or a > little example for : > (1) How to check the new xen commands(or xen_boot module) > (2)add xen_* aliases on x86, is that like something below? >=20 see grub-core/normal/main.c the features array. > diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c > index c4d9689..b88d51b 100644 > --- a/grub-core/loader/i386/xen.c > +++ b/grub-core/loader/i386/xen.c > @@ -696,10 +696,14 @@ GRUB_MOD_INIT (xen) > 0, N_("Load Linux.")); > cmd_multiboot =3D grub_register_command ("multiboot", grub_cmd_xen, > 0, N_("Load Linux.")); > + cmd_multiboot =3D grub_register_command ("xen_hypervisor", grub_cmd_= xen, > + 0, N_("Load Linux.")); > cmd_initrd =3D grub_register_command ("initrd", grub_cmd_initrd, > 0, N_("Load initrd.")); > cmd_module =3D grub_register_command ("module", grub_cmd_module, > 0, N_("Load module.")); > + cmd_module =3D grub_register_command ("xen_linux", grub_cmd_module, > + 0, N_("Load module.")); > my_mod =3D mod; > } >=20 > But how to deal with xen_initrd ? > Could you help me ? >=20 Just another alias to module. Possibly you might want to add a code to xen_initrd tto check that xen_linux was already run > Great thanks !! >=20 >> >> >=20 >=20 >=20 --nutsjjVUTrv0ElHT104Nwta3Cjnb5o0ld 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 iF4EAREKAAYFAlYzPWoACgkQmBXlbbo5nOvXhgD8DTI7BFLnec9Z+tvT8uzmpe/4 N4YAzbnUWSvkEwmQi5QA/RpZuX8xb6O0R9p6ZqhWhqtGjVO/rrjeG4WFznmKpWhQ =5W+Q -----END PGP SIGNATURE----- --nutsjjVUTrv0ElHT104Nwta3Cjnb5o0ld-- --===============9058542468451195993== 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 --===============9058542468451195993==--