summaryrefslogtreecommitdiffstats
path: root/debian/patches/olpc-prefix-hack.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:54:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:54:18 +0000
commit8e67fbf68ffeb9eb5f026dd482d73b021660bf9b (patch)
treebb573facd5d02096f9956b2617a722b88acaa8af /debian/patches/olpc-prefix-hack.patch
parentAdding upstream version 2.06. (diff)
downloadgrub2-8e67fbf68ffeb9eb5f026dd482d73b021660bf9b.tar.xz
grub2-8e67fbf68ffeb9eb5f026dd482d73b021660bf9b.zip
Adding debian version 2.06-3~deb11u6.debian/2.06-3_deb11u6debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/olpc-prefix-hack.patch')
-rw-r--r--debian/patches/olpc-prefix-hack.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/debian/patches/olpc-prefix-hack.patch b/debian/patches/olpc-prefix-hack.patch
new file mode 100644
index 0000000..6ba9b1e
--- /dev/null
+++ b/debian/patches/olpc-prefix-hack.patch
@@ -0,0 +1,51 @@
+From 39e079ec50c46fa2fc2f43a1a2e01172ef7dd7c6 Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson@debian.org>
+Date: Mon, 13 Jan 2014 12:12:50 +0000
+Subject: Hack prefix for OLPC
+
+This sucks, but it's better than what OFW was giving us.
+
+Patch-Name: olpc-prefix-hack.patch
+---
+ grub-core/kern/ieee1275/init.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
+index d483e35ee..8b089b48d 100644
+--- a/grub-core/kern/ieee1275/init.c
++++ b/grub-core/kern/ieee1275/init.c
+@@ -76,6 +76,7 @@ grub_exit (void)
+ grub_ieee1275_exit ();
+ }
+
++#ifndef __i386__
+ /* Translate an OF filesystem path (separated by backslashes), into a GRUB
+ path (separated by forward slashes). */
+ static void
+@@ -90,9 +91,18 @@ grub_translate_ieee1275_path (char *filepath)
+ backslash = grub_strchr (filepath, '\\');
+ }
+ }
++#endif
+
+ void (*grub_ieee1275_net_config) (const char *dev, char **device, char **path,
+ char *bootpath);
++#ifdef __i386__
++void
++grub_machine_get_bootlocation (char **device __attribute__ ((unused)),
++ char **path __attribute__ ((unused)))
++{
++ grub_env_set ("prefix", "(sd,1)/");
++}
++#else
+ void
+ grub_machine_get_bootlocation (char **device, char **path)
+ {
+@@ -146,6 +156,7 @@ grub_machine_get_bootlocation (char **device, char **path)
+ }
+ grub_free (bootpath);
+ }
++#endif
+
+ /* Claim some available memory in the first /memory node. */
+ #ifdef __sparc__