9
0
Fork 0

defaultenv/update: add check crc32 options

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2010-10-11 16:34:42 +02:00 committed by Sascha Hauer
parent 5c3538f44d
commit 3b8942faa0
3 changed files with 14 additions and 4 deletions

View File

@ -394,6 +394,8 @@ config DEFAULT_ENVIRONMENT_GENERIC
depends on DEFAULT_ENVIRONMENT
select SHELL_HUSH
select HUSH_GETOPT
select CMD_CRC
select CMD_CRC_CMP
prompt "Default environment generic"
help
With this option barebox will use the generic default

View File

@ -1,8 +1,10 @@
#!/bin/sh
echo "usage: $0 -t <kernel|rootfs> -d <nor|nand> [-f imagename]"
echo "usage: $0 -t <kernel|rootfs> -d <nor|nand> [-f imagename] -c"
echo "update tools."
echo""
echo ""
echo "options"
echo " -c to check the crc32 for the image and flashed one"
echo ""
echo "type update -t kernel -d <nor|nand> [-f imagename] to update kernel into flash"
echo "type update -t rootfs -d <nor|nand> [-f imagename] to update rootfs into flash"

View File

@ -4,8 +4,9 @@
type=""
device_type=""
check=n
while getopt "ht:d:f:" Option
while getopt "ht:d:f:c" Option
do
if [ ${Option} = t ]; then
type=${OPTARG}
@ -13,6 +14,8 @@ elif [ ${Option} = d ]; then
device_type=${OPTARG}
elif [ ${Option} = f ]; then
imagename=${OPTARG}
elif [ ${Option} = c ]; then
check=y
else
. /env/bin/_update_help
exit 0
@ -43,3 +46,6 @@ else
fi
. /env/bin/_update
if [ x${check} = xy ]; then
crc32 -f $image -F $part
fi