From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Xgw77-0004qy-N1 for mharc-grub-devel@gnu.org; Wed, 22 Oct 2014 09:38:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgw71-0004hP-L9 for grub-devel@gnu.org; Wed, 22 Oct 2014 09:38:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xgw6w-0004Rd-Bc for grub-devel@gnu.org; Wed, 22 Oct 2014 09:38:03 -0400 Received: from [2001:41c8:1:628a::89] (port=55654 helo=benson.vm.bytemark.co.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgw6w-0004RN-6A for grub-devel@gnu.org; Wed, 22 Oct 2014 09:37:58 -0400 Received: from [185.25.64.249] (helo=kazak) by benson.vm.bytemark.co.uk with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Xgw6v-0007NW-9H; Wed, 22 Oct 2014 14:37:57 +0100 Message-ID: <1413985076.19198.19.camel@hellion.org.uk> Subject: Re: [Xen-devel] [PATCH] grub-install: Install PV Xen binaries into the upstream specified path From: Ian Campbell To: Andrei Borzenkov Date: Wed, 22 Oct 2014 14:37:56 +0100 In-Reply-To: References: <1413966197-12364-1-git-send-email-ijc@hellion.org.uk> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.7-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:41c8:1:628a::89 Cc: 759018@bugs.debian.org, The development of GNU GRUB , "xen-devel@lists.xen.org" 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, 22 Oct 2014 13:38:08 -0000 On Wed, 2014-10-22 at 17:17 +0400, Andrei Borzenkov wrote: > On Wed, Oct 22, 2014 at 12:23 PM, Ian Campbell wrote: > > Upstream have defined a specification for where guests ought to place their > > xenpv grub binaries in order to facilitate chainloading from a stage 1 grub > > loaded from dom0. > > > > http://xenbits.xen.org/docs/unstable-staging/misc/x86-xenpv-bootloader.html > > > > The spec calls for installation into /boot/xen/pvboot-i386.elf or > > /boot/xen/pvboot-x86_64.elf. > > > > Signed-off-by: Ian Campbell > > --- > > util/grub-install.c | 10 ++++++++-- > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/util/grub-install.c b/util/grub-install.c > > index 70f514c..5f4d737 100644 > > --- a/util/grub-install.c > > +++ b/util/grub-install.c > > @@ -1979,6 +1979,14 @@ main (int argc, char *argv[]) > > } > > break; > > > > + case GRUB_INSTALL_PLATFORM_I386_XEN: > > + grub_install_copy_file (imgfile, "/boot/xen/pvboot-i386.elf", 1); > > + break; > > + > > + case GRUB_INSTALL_PLATFORM_X86_64_XEN: > > + grub_install_copy_file (imgfile, "/boot/xen/pvboot-x86_64.elf", 1); > > + break; > > + > > What ensures that /boot/xen exists? Should grub-install create it? I expected it would just happen, but looking again only grub_install_copy_files has this behaviour, not grub_install_copy_file. Should I add grub_install_mkdir_p in the hunks above, or should I be thinking of patching grub_install_copy_file? I've been testing this via the Debian packaging, which contains the mkdir before it invokes grub-mkimage. Ian. > > case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON: > > case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS: > > case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS: > > @@ -1987,8 +1995,6 @@ main (int argc, char *argv[]) > > case GRUB_INSTALL_PLATFORM_MIPSEL_ARC: > > case GRUB_INSTALL_PLATFORM_ARM_UBOOT: > > case GRUB_INSTALL_PLATFORM_I386_QEMU: > > - case GRUB_INSTALL_PLATFORM_I386_XEN: > > - case GRUB_INSTALL_PLATFORM_X86_64_XEN: > > grub_util_warn ("%s", > > _("WARNING: no platform-specific install was performed")); > > break; > > -- > > 2.1.0 > > > > > > _______________________________________________ > > Grub-devel mailing list > > Grub-devel@gnu.org > > https://lists.gnu.org/mailman/listinfo/grub-devel > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel