~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to debian/patches/06_olpc_prefix_hack.diff

Tags: upstream-1.99~20101122
ImportĀ upstreamĀ versionĀ 1.99~20101122

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
This sucks, but it's better than what OFW was giving us.
3
 
 
4
 
Index: kern/ieee1275/init.c
5
 
===================================================================
6
 
--- kern/ieee1275/init.c        (revision 2615)
7
 
+++ kern/ieee1275/init.c        (working copy)
8
 
@@ -53,6 +53,7 @@
9
 
   grub_ieee1275_exit ();
10
 
 }
11
 
 
12
 
+#ifndef __i386__
13
 
 /* Translate an OF filesystem path (separated by backslashes), into a GRUB
14
 
    path (separated by forward slashes).  */
15
 
 static void
16
 
@@ -67,13 +68,16 @@
17
 
       backslash = grub_strchr (filepath, '\\');
18
 
     }
19
 
 }
20
 
+#endif
21
 
 
22
 
 void
23
 
 grub_machine_set_prefix (void)
24
 
 {
25
 
+#ifndef __i386__
26
 
   char bootpath[64]; /* XXX check length */
27
 
   char *filename;
28
 
   char *prefix;
29
 
+#endif
30
 
 
31
 
   if (grub_env_get ("prefix"))
32
 
     /* We already set prefix in grub_machine_init().  */
33
 
@@ -86,6 +90,9 @@
34
 
       return;
35
 
     }
36
 
 
37
 
+#ifdef __i386__
38
 
+  grub_env_set ("prefix", "(sd,1)/");
39
 
+#else
40
 
   if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath", &bootpath,
41
 
                                  sizeof (bootpath), 0))
42
 
     {
43
 
@@ -123,6 +130,7 @@
44
 
 
45
 
   grub_free (filename);
46
 
   grub_free (prefix);
47
 
+#endif
48
 
 }
49
 
 
50
 
 /* Claim some available memory in the first /memory node. */