~ubuntu-branches/ubuntu/wily/grub2/wily

« back to all changes in this revision

Viewing changes to debian/patches/grub-install-pvxen-paths.patch

  • Committer: Package Import Robot
  • Author(s): Ian Campbell, Ian Campbell
  • Date: 2014-11-06 13:32:01 UTC
  • Revision ID: package-import@ubuntu.com-20141106133201-03z4ft79o5x7id0o
Tags: 2.02~beta2-16
[ Ian Campbell ]
* Provide prebuilt grub-xen binaries for host use in a new grub-xen-host
  package.
* Build/Install binaries into /boot/xen when installing grub-xen.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From c211ee1c228bc978ffc4b399155ebfeb7524d2e0 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 70f514c..7a7734e 100644
 
32
--- a/util/grub-install.c
 
33
+++ b/util/grub-install.c
 
34
@@ -1979,6 +1979,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
@@ -1987,8 +2009,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;