]> git.proxmox.com Git - grub2.git/blob - debian/patches/grub-install-pvxen-paths.patch
New upstream beta release (2.02~beta3).
[grub2.git] / debian / patches / grub-install-pvxen-paths.patch
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
5 path
6
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
9 loaded from dom0.
10
11 http://xenbits.xen.org/docs/unstable-staging/misc/x86-xenpv-bootloader.html
12
13 The spec calls for installation into /boot/xen/pvboot-i386.elf or
14 /boot/xen/pvboot-x86_64.elf.
15
16 Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
17
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
21
22 Patch-Name: grub-install-pvxen-paths.patch
23
24 ---
25 v2: Respect bootdir, create /boot/xen as needed.
26 ---
27 util/grub-install.c | 24 ++++++++++++++++++++++--
28 1 file changed, 22 insertions(+), 2 deletions(-)
29
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[])
35 }
36 break;
37
38 + case GRUB_INSTALL_PLATFORM_I386_XEN:
39 + {
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);
44 + free (dst);
45 + free (path);
46 + }
47 + break;
48 +
49 + case GRUB_INSTALL_PLATFORM_X86_64_XEN:
50 + {
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);
55 + free (dst);
56 + free (path);
57 + }
58 + break;
59 +
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:
69 grub_util_warn ("%s",
70 _("WARNING: no platform-specific install was performed"));
71 break;