Browse Source

brcm47xx: verify also standard TRX images during sysupgrade

It allows detecting data corruption for plain TRX as well.

Signed-off-by: Rafał Miłecki <[email protected]>

SVN-Revision: 45318
Rafał Miłecki 11 years ago
parent
commit
a8b0e75291
1 changed files with 4 additions and 0 deletions
  1. 4 0
      target/linux/brcm47xx/base-files/lib/upgrade/platform.sh

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

@@ -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"