brcm47xx: verify also standard TRX images during sysupgrade
authorRafał Miłecki <zajec5@gmail.com>
Thu, 9 Apr 2015 05:36:16 +0000 (05:36 +0000)
committerRafał Miłecki <zajec5@gmail.com>
Thu, 9 Apr 2015 05:36:16 +0000 (05:36 +0000)
It allows detecting data corruption for plain TRX as well.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 45318

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

index a4918c3513cfe5b5f532d3248fdc3b99710f476a..9b21e319bb6e50de6fe44cfc7890e4eb8715ade0 100644 (file)
@@ -119,6 +119,10 @@ platform_check_image() {
                        fi
                ;;
                "trx")
+                       if ! otrx -c "$1"; then
+                               echo "Invalid (corrupted?) TRX firmware"
+                               error=1
+                       fi
                ;;
                *)
                        echo "Invalid image type. Please use only .trx files"