diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2012-01-24 11:51:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-25 18:11:45 +0100 |
commit | cd614b8f40996335bacee97b176ad91498e88a43 (patch) | |
tree | 4a7bfec3fa59df08cca891a9c8f736ce2c638b89 /defaultenv/bin/_update | |
parent | 957535c66fb6dca37c226c440502bddb71aac209 (diff) | |
download | barebox-cd614b8f40996335bacee97b176ad91498e88a43.tar.gz barebox-cd614b8f40996335bacee97b176ad91498e88a43.tar.xz |
defaultenv: update: add nfs support
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv/bin/_update')
-rw-r--r-- | defaultenv/bin/_update | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/defaultenv/bin/_update b/defaultenv/bin/_update index 9e88dea6dc..e7cf1496e9 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 |