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==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Zs6Ke-0004D1-6e for mharc-grub-devel@gnu.org; Fri, 30 Oct 2015 05:50:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs6Kb-0004Ct-Ob for grub-devel@gnu.org; Fri, 30 Oct 2015 05:50:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zs6Ka-0005k3-IN for grub-devel@gnu.org; Fri, 30 Oct 2015 05:50:45 -0400 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:38096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs6Ka-0005jo-96 for grub-devel@gnu.org; Fri, 30 Oct 2015 05:50:44 -0400 Received: by wmeg8 with SMTP id g8so7600237wme.1 for ; Fri, 30 Oct 2015 02:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type; bh=vZYbYU8h3i5x+7bWNxaPWGGabOsuLzX9UJTY1Lj1pVs=; b=KqOk/bU9i4qfo1MUFo9dc0XkGH/N6yGWK1CPD0+fDn8K3jGgCOh5nKNyTt1dZxfN/u AzdDR+9/lpb/FF0jOrwSPcqEtcWkbGeavbYasgTRHfz4IhHDP8/xwFaxoKVfbq4tTsTN o/O59Dyr84RzHV9tm7+hCGp/mU4jwyN8VlG3OHGC4v8Jh8RVJKloFx11k5FfWL71pUAC UUk/HtJxwKLifmbUKt8sHjYthRiTL0S/On8Fe5WH0fX/hibsFba/T9pUbeFAYmUT+8LC PUUmplntTEt8gWZ9vPEDut1bHOSa3LTrzBoNraowXDS/j5h62XdCCG0JFaJi4IBTq6ZE b8vA== X-Received: by 10.28.132.18 with SMTP id g18mr2176623wmd.64.1446198643741; Fri, 30 Oct 2015 02:50:43 -0700 (PDT) Received: from ?IPv6:2a02:1205:34c8:dc00:863a:4bff:fe50:abc4? ([2a02:1205:34c8:dc00:863a:4bff:fe50:abc4]) by smtp.gmail.com with ESMTPSA id m137sm2036366wmb.2.2015.10.30.02.50.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Oct 2015 02:50:42 -0700 (PDT) Subject: Re: [PATCH v3 3/4] * util/grub.d/20_linux_xen.in: Add support of the XEN boot on aarch64 To: Fu Wei 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> From: =?UTF-8?Q?Vladimir_'=cf=86-coder/phcoder'_Serbinenko?= Message-ID: <56333D6A.2080506@gmail.com> Date: Fri, 30 Oct 2015 10:50:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nutsjjVUTrv0ElHT104Nwta3Cjnb5o0ld" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::236 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 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: Fri, 30 Oct 2015 09:50:47 -0000 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--