summaryrefslogtreecommitdiffstats
path: root/master/debian/olpc_prefix_hack.patch
diff options
context:
space:
mode:
Diffstat (limited to 'master/debian/olpc_prefix_hack.patch')
-rw-r--r--master/debian/olpc_prefix_hack.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/master/debian/olpc_prefix_hack.patch b/master/debian/olpc_prefix_hack.patch
new file mode 100644
index 0000000..79c2a5b
--- /dev/null
+++ b/master/debian/olpc_prefix_hack.patch
@@ -0,0 +1,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. */