mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/2] defaultenv: add bootp support
Date: Tue, 13 Mar 2012 18:45:06 +0100	[thread overview]
Message-ID: <1331660707-9518-1-git-send-email-plagnioj@jcrosoft.com> (raw)

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

             reply	other threads:[~2012-03-13 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 17:45 Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-03-13 17:45 ` [PATCH 2/2] defaultenv: add dhcp-barebox option Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331660707-9518-1-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox