bcm53xx: sysupgrade: improve NAND warnings
authorRafał Miłecki <zajec5@gmail.com>
Tue, 21 Apr 2015 11:04:38 +0000 (11:04 +0000)
committerRafał Miłecki <zajec5@gmail.com>
Tue, 21 Apr 2015 11:04:38 +0000 (11:04 +0000)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 45546

target/linux/bcm53xx/base-files/lib/upgrade/platform.sh

index f26cce067d7fd82301f8f2962f21ce6e7eb73e0c..e53c2513d275d25b5b12493df9b55fc7b39d2737 100644 (file)
@@ -141,7 +141,10 @@ platform_pre_upgrade() {
 
        # Firmwares without UBI image should be flashed "normally"
        local root_type=$(identify $dir/root)
-       [ "$root_type" != "ubi" ] && return
+       [ "$root_type" != "ubi" ] && {
+               echo "Provided firmware doesn't use UBI for rootfs."
+               return
+       }
 
        # Prepare TRX file with just a kernel that will replace current one
        local linux_length=$(grep "\"linux\"" /proc/mtd | sed "s/mtd[0-9]*:[ \t]*\([^ \t]*\).*/\1/")
@@ -174,7 +177,7 @@ platform_do_upgrade() {
        local trx="$1"
 
        [ "$(platform_flash_type)" == "nand" ] && {
-               echo "Flashing firmware without UBI for rootfs. All erase counters will be lost."
+               echo "Writing whole image to NAND flash. All erase counters will be lost."
        }
 
        case "$file_type" in