Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> --- commands/Kconfig | 1 + defaultenv/bin/init | 1 + defaultenv/bin/update_barebox | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 0 deletions(-) create mode 100644 defaultenv/bin/update_barebox diff --git a/commands/Kconfig b/commands/Kconfig index 5416073..151758b 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -204,6 +204,7 @@ config CMD_CRC config CMD_CRC_CMP tristate + default y if DEFAULT_ENVIRONMENT_GENERIC depends on CMD_CRC prompt "compare 2 files crc" diff --git a/defaultenv/bin/init b/defaultenv/bin/init index db2b525..18a0c95 100644 --- a/defaultenv/bin/init +++ b/defaultenv/bin/init @@ -28,6 +28,7 @@ if [ $? != 0 ]; then echo "default mode is net" echo "type update_kernel nand|nor [<imagename>] [net|xmodem] to update kernel into flash" echo "type update_rootfs nand|nor [<imagename>] [net|xmodem] to update rootfs into flash" + echo "type update_barebox nand|nor [<imagename>] [net|xmodem] to update barebox into flash" echo exit fi diff --git a/defaultenv/bin/update_barebox b/defaultenv/bin/update_barebox new file mode 100644 index 0000000..2f3b1d9 --- /dev/null +++ b/defaultenv/bin/update_barebox @@ -0,0 +1,21 @@ +#!/bin/sh + +. /env/config +image=barebox.bin +mode=net + +if [ x$1 = xnand ]; then + part=/dev/nand0.barebox.bb +elif [ x$1 = xnor ]; then + part=/dev/nor0.barebox +else + echo "usage: $0 nor|nand [imagename] [net|xmodem]" + exit 1 +fi + +if [ x$3 != x ]; then + mode=$3 +fi + +. /env/bin/_update $2 +crc32 -f $image -F $part -- 1.7.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox