From 7e0982bdc24dade46345b00c83d2779e602354db Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 26 Nov 2010 20:58:37 +0100 Subject: defaultenv/udpate: in xmodem mode load the data before erasing and abort the update if loadb failed or cancelled Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- defaultenv/bin/_update | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'defaultenv') diff --git a/defaultenv/bin/_update b/defaultenv/bin/_update index 87e6922326..f736acc744 100644 --- a/defaultenv/bin/_update +++ b/defaultenv/bin/_update @@ -22,6 +22,14 @@ if [ x$mode = xtftp ]; then fi fi +if [ x$mode = xxmodem ]; then + loadb -f $image -c + if [ $? -ne 0 ] ; then + echo "loadb failed or cancelled! Update aborted." + exit 1 + fi +fi + unprotect $part echo @@ -36,7 +44,6 @@ echo if [ x$mode = xtftp ]; then tftp $image $part else - loadb -f $image -c cp $image $part fi -- cgit v1.2.3