summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2012-03-13 18:45:06 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-03-17 17:20:18 +0100
commit3374ddcc4538f986edd4f04efcf23bf0ccef80c0 (patch)
treef24bb29ada047364b0143929890a9a205f48dc00 /defaultenv
parent495dffdaa579974399d7f5d7cd466e13274b9bbb (diff)
downloadbarebox-3374ddcc4538f986edd4f04efcf23bf0ccef80c0.tar.gz
barebox-3374ddcc4538f986edd4f04efcf23bf0ccef80c0.tar.xz
defaultenv: add bootp support
use rootpath as nfsroot and bootfile as kernelimage if present when ip mode is dhcp Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/bin/boot12
1 files changed, 9 insertions, 3 deletions
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index d37eca86a..1566c6a7d 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -40,6 +40,15 @@ elif [ x$mode = xdisk ]; then
fi
if [ x$ip = xdhcp ]; then
+ if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then
+ dhcp
+ if [ x$rootpath != x ]; then
+ nfsroot=$rootpath
+ fi
+ if [ x$bootfile != x ]; then
+ kernelimage=$bootfile
+ fi
+ fi
bootargs="$bootargs ip=dhcp"
elif [ x$ip = xnone ]; then
bootargs="$bootargs ip=none"
@@ -89,9 +98,6 @@ if [ -n $mtdparts ]; then
fi
if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then
- if [ x$ip = xdhcp ]; then
- dhcp
- fi
kdev=/image
$kernel_loc $kernelimage $kdev || exit 1
elif [ x$kernel_loc = xnor ]; then