summaryrefslogtreecommitdiff
path: root/target/linux/brcm47xx/base-files
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-04-09 05:36:16 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-04-09 05:36:16 +0000
commita8b0e75291d3ec116fbc4b81701252893a621a64 (patch)
tree54c5f0aea6654403818a4a613bbdef6615cea1e1 /target/linux/brcm47xx/base-files
parent3fad95446a6614720577738d3cf0ab3fb3f47e5c (diff)
downloadmtk-20170518-a8b0e75291d3ec116fbc4b81701252893a621a64.zip
mtk-20170518-a8b0e75291d3ec116fbc4b81701252893a621a64.tar.gz
mtk-20170518-a8b0e75291d3ec116fbc4b81701252893a621a64.tar.bz2
brcm47xx: verify also standard TRX images during sysupgrade
It allows detecting data corruption for plain TRX as well. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 45318
Diffstat (limited to 'target/linux/brcm47xx/base-files')
-rw-r--r--target/linux/brcm47xx/base-files/lib/upgrade/platform.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh b/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
index a4918c3..9b21e31 100644
--- a/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
+++ b/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"