summaryrefslogtreecommitdiffstats
path: root/defaultenv/bin/boot
diff options
context:
space:
mode:
Diffstat (limited to 'defaultenv/bin/boot')
-rw-r--r--defaultenv/bin/boot17
1 files changed, 16 insertions, 1 deletions
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index ba04373049..5186aeecca 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -6,12 +6,14 @@ if [ x$kernel_loc = xnet ]; then
kernel_loc=tftp
fi
-while getopt "hk:r:i:m:" Option
+while getopt "hk:r:i:m:o:" Option
do
if [ ${Option} = k ]; then
kernel_loc=${OPTARG}
elif [ ${Option} = r ]; then
rootfs_loc=${OPTARG}
+elif [ ${Option} = o ]; then
+ oftree_loc=${OPTARG}
elif [ ${Option} = i ]; then
ip=${OPTARG}
elif [ ${Option} = m ]; then
@@ -114,6 +116,19 @@ else
exit 1
fi
+if [ x$oftree_loc = xnfs -o x$oftree_loc = xtftp ]; then
+ odev=/oftree
+ $oftree_loc $oftreeimage $odev || exit 1
+elif [ x$oftree_loc = xnor ]; then
+ odev="/dev/nor0.oftree"
+elif [ x$oftree_loc = xnand ]; then
+ odev="/dev/nand0.oftree.bb"
+elif [ x$oftree_loc = xdisk ]; then
+ odev="/dev/$oftree_part"
+fi
+
+[ x$odev = x ] || bootm_opt="$bootm_opt -o $odev"
+
echo "booting kernel from $kdev"
bootm $bootm_opt $kdev