summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2011-09-25 22:54:08 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-09-26 13:22:25 +0200
commitcf8af385c759261e4bc89cfad8dab26d8bf07153 (patch)
treefc7003a8dc8a2553b2ecb46d34f68b568c2dd9cd /defaultenv
parentcc891e8e95354426c4a32858fc1f886f996c43e4 (diff)
downloadbarebox-cf8af385c759261e4bc89cfad8dab26d8bf07153.tar.gz
defaultenv: boot: add support to boot from disk
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/bin/boot9
1 files changed, 8 insertions, 1 deletions
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 4284308..652ae0c 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -18,6 +18,9 @@ elif [ x$1 = xnfs ]; then
elif [ x$1 = xtftp ]; then
rootfs_loc=net
kernel_loc=tftp
+elif [ x$1 = xdisk ]; then
+ rootfs_loc=disk
+ kernel_loc=disk
fi
if [ x$ip = xdhcp ]; then
@@ -31,6 +34,8 @@ fi
if [ x$rootfs_loc = xnet ]; then
bootargs="$bootargs root=/dev/nfs nfsroot=$nfsroot,v3,tcp noinitrd"
+elif [ x$rootfs_loc = xdisk ]; then
+ bootargs="$bootargs root=/dev/$rootfs_part_linux_dev rootfstype=$rootfs_type noinitrd rootwait"
elif [ x$rootfs_loc = xinitrd ]; then
bootargs="$bootargs root=/dev/ram0 rdinit=/sbin/init"
else
@@ -100,8 +105,10 @@ elif [ x$kernel_loc = xnor ]; then
kdev="/dev/nor0.kernel"
elif [ x$kernel_loc = xnand ]; then
kdev="/dev/nand0.kernel.bb"
+elif [ x$kernel_loc = xdisk ]; then
+ kdev="/dev/$kernel_part"
else
- echo "error: set kernel_loc to one of 'nfs', 'tftp', 'nand' or 'nor'"
+ echo "error: set kernel_loc to one of 'tftp', 'nfs', 'nand', 'nor' or 'disk'"
exit 1
fi