From 17bf121930778003531a364073a853bdeeb50500 Mon Sep 17 00:00:00 2001
From: Andres Salomon <dilinger@debian.org>
Date: Sun, 15 Feb 2009 17:33:16 -0500
Subject: [PATCH] force redboot loading before other modules to work around an
 mtd bug

w/ partitions

Signed-off-by: Andres Salomon <dilinger@debian.org>
---
 debian/olpc-xo1-hw.install |  1 +
 initramfs-scripts/xo1      | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100755 initramfs-scripts/xo1

diff --git a/debian/olpc-xo1-hw.install b/debian/olpc-xo1-hw.install
index 7a49adb..40c1a56 100644
--- a/debian/olpc-xo1-hw.install
+++ b/debian/olpc-xo1-hw.install
@@ -1 +1,2 @@
 initramfs-hooks/xo1			etc/initramfs-tools/hooks
+initramfs-scripts/xo1			etc/initramfs-tools/scripts/init-top
diff --git a/initramfs-scripts/xo1 b/initramfs-scripts/xo1
new file mode 100755
index 0000000..5c6a12d
--- /dev/null
+++ b/initramfs-scripts/xo1
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+#
+# List the soft prerequisites here.  This is a space separated list of
+# names, of scripts that are in the same directory as this one, that
+# must be run before this one can be.
+#
+PREREQ=""
+
+prereqs()
+{
+        echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+        prereqs
+        exit 0
+        ;;
+esac
+
+. /usr/share/initramfs-tools/hook-functions
+
+# redboot needs to be loaded before cafe_nand in order to ensure that
+# partitions are correctly identified.  This is a kernel bug that's worked
+# around here.
+modprobe redboot
+
-- 
2.39.5