summaryrefslogtreecommitdiffstats
path: root/defaultenv/bin/update
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-02-20 10:18:10 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-02-21 17:06:46 +0100
commit464a531423f61b5d2c5108843e12ab7057a935bb (patch)
tree0f5310ab7854f639958f3ae16eaeebd2ac07aeaa /defaultenv/bin/update
parent068f213bb3203e482334fa2130794c3ff25acb3b (diff)
downloadbarebox-464a531423f61b5d2c5108843e12ab7057a935bb.tar.gz
barebox-464a531423f61b5d2c5108843e12ab7057a935bb.tar.xz
move defaultenv-1 to defaultenv/defaultenv-1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'defaultenv/bin/update')
-rw-r--r--defaultenv/bin/update82
1 files changed, 0 insertions, 82 deletions
diff --git a/defaultenv/bin/update b/defaultenv/bin/update
deleted file mode 100644
index 1578789a56..0000000000
--- a/defaultenv/bin/update
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/sh
-
-type=""
-device_type=""
-check=n
-mode=tftp
-
-. /env/config
-
-while getopt "ht:d:f:m:c" Option
-do
-if [ ${Option} = t ]; then
- type=${OPTARG}
-elif [ ${Option} = d ]; then
- device_type=${OPTARG}
-elif [ ${Option} = f ]; then
- imagename=${OPTARG}
-elif [ ${Option} = c ]; then
- check=y
-elif [ ${Option} = m ]; then
- mode=${OPTARG}
-else
- . /env/bin/_update_help
- exit 0
-fi
-done
-
-if [ x${type} = xkernel ]; then
- image=$kernelimage
- disk_part=$kernel_part
-elif [ x${type} = xrootfs ]; then
- image=$rootfsimage
- type=root
-elif [ x${type} = xbarebox ]; then
- image=$bareboximage
- if [ -z ${image} ]; then
- image=barebox.bin
- fi
-elif [ x${type} = xoftree ]; then
- image=$oftreeimage
- if [ -z ${image} ]; then
- image=oftree.bin
- fi
-elif [ x${type} = xbareboxenv ]; then
- image=$bareboxenvimage
- if [ -z ${image} ]; then
- image=bareboxenv.bin
- fi
-elif [ x${type} = xxload ]; then
- image=$xloadimage
-else
- . /env/bin/_update_help
- exit 1
-fi
-
-if [ -n ${imagename} ]; then
- image=${imagename}
-fi
-
-if [ x${device_type} = xnand ]; then
- part=/dev/nand0.${type}.bb
-elif [ x${device_type} = xnor ]; then
- part=/dev/nor0.${type}
-elif [ x${device_type} = xdisk ]; then
- part=/dev/${disk_part}
-else
- . /env/bin/_update_help
- exit 1
-fi
-
-if [ x${mode} != xtftp -a x${mode} != xxmodem -a x${mode} != xnfs ]; then
- echo "unsupported mode ${mode}."
- . /env/bin/_update_help
- exit 1
-fi
-
-. /env/bin/_update || exit 1
-if [ x${check} = xy ]; then
- crc32 -f $image -F $part
-else
- true
-fi