From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XhPwP-0000Ik-PY for mharc-grub-devel@gnu.org; Thu, 23 Oct 2014 17:29:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhPwJ-0000HV-O5 for grub-devel@gnu.org; Thu, 23 Oct 2014 17:29:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhPwE-0003SG-Uf for grub-devel@gnu.org; Thu, 23 Oct 2014 17:28:59 -0400 Received: from [2001:41c8:1:628a::89] (port=42092 helo=benson.vm.bytemark.co.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhPwE-0003R9-OQ for grub-devel@gnu.org; Thu, 23 Oct 2014 17:28:54 -0400 Received: from cpc22-cmbg14-2-0-cust482.5-4.cable.virginm.net ([86.6.25.227] helo=celaeno.hellion.org.uk) by benson.vm.bytemark.co.uk with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XhPwB-00029m-0e; Thu, 23 Oct 2014 22:28:51 +0100 Received: from dagon.hellion.org.uk ([192.168.1.7]) by celaeno.hellion.org.uk with smtp (Exim 4.80) (envelope-from ) id 1XhPw8-0000IC-4B; Thu, 23 Oct 2014 22:28:49 +0100 Received: by dagon.hellion.org.uk (sSMTP sendmail emulation); Thu, 23 Oct 2014 22:28:47 +0100 From: Ian Campbell To: grub-devel@gnu.org, xen-devel@lists.xen.org Subject: [PATCH v2] grub-install: Install PV Xen binaries into the upstream specified path Date: Thu, 23 Oct 2014 22:28:47 +0100 Message-Id: <1414099727-22463-1-git-send-email-ijc@hellion.org.uk> X-Mailer: git-send-email 2.1.0 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, Andrei Borzenkov , Ian Campbell 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: Thu, 23 Oct 2014 21:29:04 -0000 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 --- v2: Respect bootdir, create /boot/xen as needed. --- util/grub-install.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/util/grub-install.c b/util/grub-install.c index 70f514c..7a7734e 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -1979,6 +1979,28 @@ main (int argc, char *argv[]) } break; + case GRUB_INSTALL_PLATFORM_I386_XEN: + { + char *path = grub_util_path_concat (2, bootdir, "xen"); + char *dst = grub_util_path_concat (2, path, "pvboot-i386.elf"); + grub_install_mkdir_p (path); + grub_install_copy_file (imgfile, dst, 1); + free (dst); + free (path); + } + break; + + case GRUB_INSTALL_PLATFORM_X86_64_XEN: + { + char *path = grub_util_path_concat (2, bootdir, "xen"); + char *dst = grub_util_path_concat (2, path, "pvboot-x86_64.elf"); + grub_install_mkdir_p (path); + grub_install_copy_file (imgfile, dst, 1); + free (dst); + free (path); + } + break; + case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON: case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS: case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS: @@ -1987,8 +2009,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