From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XgzYN-0004ZO-Lt for mharc-grub-devel@gnu.org; Wed, 22 Oct 2014 13:18:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgzYI-0004QO-0Z for grub-devel@gnu.org; Wed, 22 Oct 2014 13:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgzYD-0000rr-Nk for grub-devel@gnu.org; Wed, 22 Oct 2014 13:18:25 -0400 Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]:47440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgzYD-0000rk-Di for grub-devel@gnu.org; Wed, 22 Oct 2014 13:18:21 -0400 Received: by mail-la0-f48.google.com with SMTP id gi9so3305824lab.7 for ; Wed, 22 Oct 2014 10:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=N38KotlU/RzFclL1INUXR8NceOXe3gqPkcDj5B7EAWQ=; b=MD4NKXaLg8ZGtN27qkiZwn9VwQijS3joH9HfH9mYG2D9lLVLzWISxIbJTaHpSzux+7 px0v2cNSYz1jgY0WgiWu0ZqyOxZS7RnC8rfy47L724YZtGdid3ZIvrF3EGnnBXSfqBiC ird/MjVo977UC13rP31uGFhxnEOpX2LHpW2npZvV3k1/U+9wsCPqsESNLhWL5gJSP+id o6M6tp+PXLUT5ti8W3xuq+m1UeJybUgXxYcpBe4+YORutsm8CRtCe0ToyI/SHJHYOkLh cl8p0P7MziUsWR2R5Em6W8k6q4efp6nmLF/sD/yVdylRS7kVngbRITLU0yH6pSuVhCBU r5Qw== X-Received: by 10.152.170.131 with SMTP id am3mr7736575lac.15.1413998300209; Wed, 22 Oct 2014 10:18:20 -0700 (PDT) Received: from opensuse.site (ppp91-76-139-38.pppoe.mtu-net.ru. [91.76.139.38]) by mx.google.com with ESMTPSA id w2sm6042551lad.30.2014.10.22.10.18.18 for (version=SSLv3 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Oct 2014 10:18:19 -0700 (PDT) Date: Wed, 22 Oct 2014 21:18:17 +0400 From: Andrei Borzenkov To: Ian Campbell Subject: Re: [Xen-devel] [PATCH] grub-install: Install PV Xen binaries into the upstream specified path Message-ID: <20141022211817.1539fda9@opensuse.site> In-Reply-To: <1413985076.19198.19.camel@hellion.org.uk> References: <1413966197-12364-1-git-send-email-ijc@hellion.org.uk> <1413985076.19198.19.camel@hellion.org.uk> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::230 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 17:18:30 -0000 =D0=92 Wed, 22 Oct 2014 14:37:56 +0100 Ian Campbell =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > On Wed, 2014-10-22 at 17:17 +0400, Andrei Borzenkov wrote: > > On Wed, Oct 22, 2014 at 12:23 PM, Ian Campbell wro= te: > > > 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-bootloade= r.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.e= lf", 1); > > > + break; > > > + > >=20 > > What ensures that /boot/xen exists? Should grub-install create it? >=20 > I expected it would just happen, but looking again only > grub_install_copy_files has this behaviour, not grub_install_copy_file.=20 > grub_install_copy_files is pretty misleading, it should really be named grub_install_platform_files as this is the only thing it does. > Should I add grub_install_mkdir_p in the hunks above, or should I be > thinking of patching grub_install_copy_file? >=20 All other usages of grub_install_copy_file assume existing directory, so I guess explicitly creating directory is fine. Please do not use hardcoded absolute path names. It should respect bootdir to facilitate offroot installation. > I've been testing this via the Debian packaging, which contains the > mkdir before it invokes grub-mkimage. >=20 > Ian. >=20 > > > 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 pe= rformed")); > > > break; > > > -- > > > 2.1.0 > > > > > > > > > _______________________________________________ > > > Grub-devel mailing list > > > Grub-devel@gnu.org > > > https://lists.gnu.org/mailman/listinfo/grub-devel > >=20 > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel >=20 >=20