* DHCP and NFSroot/TFTP
@ 2011-07-22 11:16 Juergen Beisert
0 siblings, 0 replies; only message in thread
From: Juergen Beisert @ 2011-07-22 11:16 UTC (permalink / raw)
To: barebox
Hi,
for the case someone uses DHCP for her/his network configuration in Barebox,
there is a race with the setup of some variables used for the NFS root.
The following patch fixes it, but maybe there are better solutions than that.
------------------------------------------------------------------------------
Setting up NFS root/TFTP related variables is successfull only if the network
interface is already configured. For the case someone is using DHCP, this
fails, because all these vars are still empty. Changing the order when the
DHCP is done solves the issue.
Signed off by: Juergen Beisert <jbe@pengutronix.de>
---
defaultenv/bin/boot | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: barebox-2011.05.0/defaultenv/bin/boot
===================================================================
--- barebox-2011.05.0.orig/defaultenv/bin/boot
+++ barebox-2011.05.0/defaultenv/bin/boot
@@ -18,6 +18,9 @@ fi
if [ x$ip = xdhcp ]; then
bootargs="$bootargs ip=dhcp"
+ if [ x$kernel_loc = xnfs ] || [ x$kernel_loc = xtftp ]; then
+ dhcp
+ fi
elif [ x$ip = xnone ]; then
bootargs="$bootargs ip=none"
else
@@ -75,9 +78,6 @@ if [ ! -e /dev/ram0.kernel ]; then
fi
if [ x$kernel_loc = xnfs ] || [ x$kernel_loc = xtftp ]; then
- if [ x$ip = xdhcp ]; then
- dhcp
- fi
if [ $kernelimage_type = uimage ]; then
netload="/dev/ram0.kernel"
elif [ $kernelimage_type = zimage ]; then
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-5121-206917-5128 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-22 11:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-22 11:16 DHCP and NFSroot/TFTP Juergen Beisert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox