1 From b4de148e4008db0bd37e35f568a1663f085ce043 Mon Sep 17 00:00:00 2001
2 From: Ian Campbell <ijc@hellion.org.uk>
3 Date: Sat, 6 Sep 2014 12:20:12 +0100
4 Subject: grub-install: Install PV Xen binaries into the upstream specified
7 Upstream have defined a specification for where guests ought to place their
8 xenpv grub binaries in order to facilitate chainloading from a stage 1 grub
11 http://xenbits.xen.org/docs/unstable-staging/misc/x86-xenpv-bootloader.html
13 The spec calls for installation into /boot/xen/pvboot-i386.elf or
14 /boot/xen/pvboot-x86_64.elf.
16 Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
18 Bug-Debian: https://bugs.debian.org/762307
19 Forwarded: http://lists.gnu.org/archive/html/grub-devel/2014-10/msg00041.html
20 Last-Update: 2014-10-24
22 Patch-Name: grub-install-pvxen-paths.patch
25 v2: Respect bootdir, create /boot/xen as needed.
27 util/grub-install.c | 24 ++++++++++++++++++++++--
28 1 file changed, 22 insertions(+), 2 deletions(-)
30 diff --git a/util/grub-install.c b/util/grub-install.c
31 index 3ca3d1a..cf40eed 100644
32 --- a/util/grub-install.c
33 +++ b/util/grub-install.c
34 @@ -1987,6 +1987,28 @@ main (int argc, char *argv[])
38 + case GRUB_INSTALL_PLATFORM_I386_XEN:
40 + char *path = grub_util_path_concat (2, bootdir, "xen");
41 + char *dst = grub_util_path_concat (2, path, "pvboot-i386.elf");
42 + grub_install_mkdir_p (path);
43 + grub_install_copy_file (imgfile, dst, 1);
49 + case GRUB_INSTALL_PLATFORM_X86_64_XEN:
51 + char *path = grub_util_path_concat (2, bootdir, "xen");
52 + char *dst = grub_util_path_concat (2, path, "pvboot-x86_64.elf");
53 + grub_install_mkdir_p (path);
54 + grub_install_copy_file (imgfile, dst, 1);
60 case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
61 case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
62 case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
63 @@ -1995,8 +2017,6 @@ main (int argc, char *argv[])
64 case GRUB_INSTALL_PLATFORM_MIPSEL_ARC:
65 case GRUB_INSTALL_PLATFORM_ARM_UBOOT:
66 case GRUB_INSTALL_PLATFORM_I386_QEMU:
67 - case GRUB_INSTALL_PLATFORM_I386_XEN:
68 - case GRUB_INSTALL_PLATFORM_X86_64_XEN:
70 _("WARNING: no platform-specific install was performed"));