summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/eukrea_cpuimx35/env/bin/boot
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boards/eukrea_cpuimx35/env/bin/boot')
-rw-r--r--arch/arm/boards/eukrea_cpuimx35/env/bin/boot52
1 files changed, 52 insertions, 0 deletions
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/boot b/arch/arm/boards/eukrea_cpuimx35/env/bin/boot
new file mode 100644
index 0000000000..fca5b8cc19
--- /dev/null
+++ b/arch/arm/boards/eukrea_cpuimx35/env/bin/boot
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+. /env/config
+
+if [ x$1 = xjffS2 ]; then
+ root=jffs2
+ kernel=nand
+fi
+
+if [ x$1 = xubifs ]; then
+ root=ubifs
+ kernel=nand
+fi
+
+if [ x$1 = xnet ]; then
+ root=net
+ kernel=net
+fi
+
+if [ x$ip = xdhcp ]; then
+ bootargs="$bootargs ip=dhcp"
+else
+ if [ x$ip = xoff ]; then
+ bootargs="$bootargs ip=off"
+ else
+ bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"
+ fi
+fi
+
+if [ x$root = xjffs2 ]; then
+ bootargs="$bootargs root=/dev/mtdblock$rootpartnum_nand rootfstype=jffs2"
+fi
+
+if [ x$root = xubifs ]; then
+ bootargs="$bootargs root=ubi0:$ubiroot ubi.mtd=$rootpartnum_nand rootfstype=ubifs"
+fi
+
+if [ x$root = xnet ]; then
+ bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp"
+fi
+
+bootargs="$bootargs mtdparts=mxc_nand:$nand_parts"
+
+if [ $kernel = net ]; then
+ if [ x$ip = xdhcp ]; then
+ dhcp
+ fi
+ tftp $uimage uImage || exit 1
+ bootm uImage
+else
+ bootm /dev/nand0.kernel.bb
+fi