summaryrefslogtreecommitdiffstats
path: root/master/debian/olpc_prefix_hack.patch
blob: 79c2a5b60b41a8fb08e3d6378f3f33e6f0a7723a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
This sucks, but it's better than what OFW was giving us.

Index: b/grub-core/kern/ieee1275/init.c
===================================================================
--- a/grub-core/kern/ieee1275/init.c
+++ b/grub-core/kern/ieee1275/init.c
@@ -53,6 +53,7 @@
   grub_ieee1275_exit ();
 }
 
+#ifndef __i386__
 /* Translate an OF filesystem path (separated by backslashes), into a GRUB
    path (separated by forward slashes).  */
 static void
@@ -67,13 +68,16 @@
       backslash = grub_strchr (filepath, '\\');
     }
 }
+#endif
 
 void
 grub_machine_set_prefix (void)
 {
+#ifndef __i386__
   char bootpath[64]; /* XXX check length */
   char *filename;
   char *prefix;
+#endif
 
   if (grub_prefix[0])
     {
@@ -82,6 +86,9 @@
       return;
     }
 
+#ifdef __i386__
+  grub_env_set ("prefix", "(sd,1)/");
+#else
   if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath", &bootpath,
 				  sizeof (bootpath), 0))
     {
@@ -120,6 +127,7 @@
 
   grub_free (filename);
   grub_free (prefix);
+#endif
 }
 
 /* Claim some available memory in the first /memory node. */