mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/6] defaultenv: update: add nfs support
Date: Tue, 24 Jan 2012 11:51:04 +0100	[thread overview]
Message-ID: <1327402267-22385-4-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1327402267-22385-1-git-send-email-mkl@pengutronix.de>

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 defaultenv/bin/_update      |   11 ++++-------
 defaultenv/bin/_update_help |   10 +++++-----
 defaultenv/bin/update       |    2 +-
 3 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/defaultenv/bin/_update b/defaultenv/bin/_update
index 9e88dea..e7cf149 100644
--- a/defaultenv/bin/_update
+++ b/defaultenv/bin/_update
@@ -10,7 +10,7 @@ if [ ! -e "$part" ]; then
 	exit 1
 fi
 
-if [ x$mode = xtftp ]; then
+if [ x$mode = xtftp -o x$mode = xnfs ]; then
 	if [ x$ip = xdhcp ]; then
 		dhcp
 	fi
@@ -20,6 +20,7 @@ if [ x$mode = xtftp ]; then
 		echo "Server did not reply! Update aborted."
 		exit 1
 	fi
+	load=$mode
 fi
 
 if [ x$mode = xxmodem ]; then
@@ -28,6 +29,7 @@ if [ x$mode = xxmodem ]; then
 		echo "loadb failed or cancelled! Update aborted."
 		exit 1
 	fi
+	load="cp -v"
 fi
 
 unprotect $part
@@ -40,11 +42,6 @@ erase $part || exit 1
 echo
 echo "flashing $image to $part"
 echo
-
-if [ x$mode = xtftp ]; then
-	tftp $image $part || exit 1
-else
-	cp -v $image $part || exit 1
-fi
+$load $image $part || exit 1
 
 protect $part
diff --git a/defaultenv/bin/_update_help b/defaultenv/bin/_update_help
index 92d6772..3b7ad23 100644
--- a/defaultenv/bin/_update_help
+++ b/defaultenv/bin/_update_help
@@ -7,8 +7,8 @@ echo "options"
 echo " -c     to check the crc32 for the image and flashed one"
 echo ""
 echo "default mode is tftp"
-echo "type update -t kernel -d <nor|nand|disk> [-m tftp|xmodem] [-f imagename] to update kernel into flash"
-echo "type update -t rootfs -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update rootfs into flash"
-echo "type update -t barebox -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update barebox into flash"
-echo "type update -t bareboxenv -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update bareboxenv into flash"
-echo "type update -t xload -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update xload into flash"
+echo "type update -t kernel -d <nor|nand|disk> [-m tftp|xmodem|nfs] [-f imagename] to update kernel into flash"
+echo "type update -t rootfs -d <nor|nand> [-m tftp|xmodem|nfs] [-f imagename] to update rootfs into flash"
+echo "type update -t barebox -d <nor|nand> [-m tftp|xmodem|nfs] [-f imagename] to update barebox into flash"
+echo "type update -t bareboxenv -d <nor|nand> [-m tftp|xmodem|nfs] [-f imagename] to update bareboxenv into flash"
+echo "type update -t xload -d <nor|nand> [-m tftp|xmodem|nfs] [-f imagename] to update xload into flash"
diff --git a/defaultenv/bin/update b/defaultenv/bin/update
index 39e7591..96442b1 100644
--- a/defaultenv/bin/update
+++ b/defaultenv/bin/update
@@ -63,7 +63,7 @@ else
 	exit 1
 fi
 
-if [ x${mode} != xtftp -a x${mode} != xxmodem ] ; then
+if [ x${mode} != xtftp -a x${mode} != xxmodem -a x${mode} != xnfs ]; then
 	echo "unsupported mode ${mode}."
 	. /env/bin/_update_help
 	exit 1
-- 
1.7.4.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-01-24 10:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24 10:51 [PATCH 0/6] update mx35_3ds suppoprt Marc Kleine-Budde
2012-01-24 10:51 ` [PATCH 1/6] net/nfs: increase timeout to 15 seconds Marc Kleine-Budde
2012-01-24 10:51 ` [PATCH 2/6] show_progress: fix progress bar for files > 32 MiB Marc Kleine-Budde
2012-01-24 10:51 ` Marc Kleine-Budde [this message]
2012-01-24 10:51 ` [PATCH 4/6] ARM: mx3/mx35_3ds: add missing nand device Marc Kleine-Budde
2012-01-24 10:51 ` [PATCH 5/6] ARM: mx3/mx35_3ds: increase kernel partition size to 4 MiB Marc Kleine-Budde
2012-01-24 10:51 ` [PATCH 6/6] ARM: mx3/mx35_3ds: add (optinal) support for flexcan0 Marc Kleine-Budde

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=1327402267-22385-4-git-send-email-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --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