summaryrefslogtreecommitdiffstats
path: root/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init')
-rw-r--r--arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init b/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init
new file mode 100644
index 000000000..80cc2cffb
--- /dev/null
+++ b/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init
@@ -0,0 +1,26 @@
+#!/bin/sh
+export PATH=/env/bin
+
+source /env/config
+
+#Define a 26MB partition in flash starting at offset 0x20000
+addpart -n /dev/nor0 0x1a00000@0x20000(boot)
+ubiattach /dev/boot
+
+if [ $? -ne 0 ]; then
+ echo "Fail to attach UBI device"
+ exit 1;
+fi
+
+mkdir /mnt
+mount -t ubifs /dev/ubi0.boot /mnt
+
+echo
+echo -n "Hit ctrl-c to stop autoboot: "
+timeout -c 5
+
+if [ $? -ne 0 ]; then
+ exit 0
+fi
+
+boot