* [PATCH 1/2] defaultenv: add bootp support
@ 2012-03-13 17:45 Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 17:45 ` [PATCH 2/2] defaultenv: add dhcp-barebox option Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-13 17:45 UTC (permalink / raw)
To: barebox
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>
---
defaultenv/bin/boot | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index d37eca8..1566c6a 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
--
1.7.7
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] defaultenv: add dhcp-barebox option
2012-03-13 17:45 [PATCH 1/2] defaultenv: add bootp support Jean-Christophe PLAGNIOL-VILLARD
@ 2012-03-13 17:45 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-03-13 17:45 UTC (permalink / raw)
To: barebox
barebox will use DHCP and pass the result to the kernel
update the help
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
defaultenv/bin/_boot_help | 8 +++++++-
defaultenv/bin/boot | 5 ++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/defaultenv/bin/_boot_help b/defaultenv/bin/_boot_help
index e7f7f16..7c96444 100644
--- a/defaultenv/bin/_boot_help
+++ b/defaultenv/bin/_boot_help
@@ -5,7 +5,7 @@ echo ""
echo "options"
echo " - kernel nand, nor, nfs, tftp, disk"
echo " - rootfs nand, nor, net, disk"
-echo " - ip dhcp, none, empty"
+echo " - ip dhcp, dhcp-barebox none, empty"
echo ""
echo "mode option"
echo " mode kernel rootfs"
@@ -15,4 +15,10 @@ echo " nfs nfs net"
echo " tftp fttp net"
echo " disk disk disk"
echo ""
+echo "ip option"
+echo " dhcp barebox and kernel will use DHCP"
+echo " dhcp-barebox barebox will use DHCP and pass the result to the kernel"
+echo " none do not pass ip parameter to the kernel and set it to none"
+echo " empty pass ip parameter to the kernel"
+echo ""
echo "default mode are used from the /env/config"
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 1566c6a..ba04373 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -39,7 +39,7 @@ elif [ x$mode = xdisk ]; then
kernel_loc=disk
fi
-if [ x$ip = xdhcp ]; then
+if [ x$ip = xdhcp -o x$ip = "xdhcp-barebox" ]; then
if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then
dhcp
if [ x$rootpath != x ]; then
@@ -49,6 +49,9 @@ if [ x$ip = xdhcp ]; then
kernelimage=$bootfile
fi
fi
+fi
+
+if [ x$ip = xdhcp -o ]; then
bootargs="$bootargs ip=dhcp"
elif [ x$ip = xnone ]; then
bootargs="$bootargs ip=none"
--
1.7.7
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-13 17:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-13 17:45 [PATCH 1/2] defaultenv: add bootp support Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 17:45 ` [PATCH 2/2] defaultenv: add dhcp-barebox option Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox