summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-10-11 16:34:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-10-12 21:32:45 +0200
commitbbdb7f4e3dd65ea1917cc9cb4a86296209fc87a5 (patch)
treefc933fcfc12a7181a10e8123ab07be03c17bfc2f /defaultenv
parentde1823f74ec6312ab35180667a6f19aaa03f0d5e (diff)
downloadbarebox-bbdb7f4e3dd65ea1917cc9cb4a86296209fc87a5.tar.gz
defaultenv: add update_barebox to update barebox easly via tftp or xmodem
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/bin/_update_help3
-rw-r--r--defaultenv/bin/update5
2 files changed, 7 insertions, 1 deletions
diff --git a/defaultenv/bin/_update_help b/defaultenv/bin/_update_help
index 1d9b28e..22d940e 100644
--- a/defaultenv/bin/_update_help
+++ b/defaultenv/bin/_update_help
@@ -1,6 +1,6 @@
#!/bin/sh
-echo "usage: $0 -t <kernel|rootfs> -d <nor|nand> [-m tftp|xmodem] [-f imagename] -c"
+echo "usage: $0 -t <kernel|rootfs|barebox> -d <nor|nand> [-m tftp|xmodem] [-f imagename] -c"
echo "update tools."
echo ""
echo "options"
@@ -9,3 +9,4 @@ echo ""
echo "default mode is tftp"
echo "type update -t kernel -d <nor|nand> [-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"
diff --git a/defaultenv/bin/update b/defaultenv/bin/update
index 032f340..3601177 100644
--- a/defaultenv/bin/update
+++ b/defaultenv/bin/update
@@ -30,6 +30,11 @@ if [ x${type} = xkernel ]; then
elif [ x${type} = xrootfs ]; then
image=$rootfsimage
type=root
+elif [ x${type} = xbarebox ]; then
+ image=$bareboximage
+ if [ x${image} = x ]; then
+ imamge=barebox.bin
+ fi
else
. /env/bin/_update_help
exit 1