aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx
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
commit3ee317e9f24f6fc1cb564c3eff65f1c7b495b2cd (patch)
treeb94250c254a8caf33a1c1eb52da93916b8638bf1 /target/linux/brcm47xx
parent3765adddb70c144e4abd88eec9e1ca7ac76430f2 (diff)
downloadmaster-187ad058-3ee317e9f24f6fc1cb564c3eff65f1c7b495b2cd.tar.gz
master-187ad058-3ee317e9f24f6fc1cb564c3eff65f1c7b495b2cd.tar.bz2
master-187ad058-3ee317e9f24f6fc1cb564c3eff65f1c7b495b2cd.zip
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45318 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx')
-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 a4918c3513..9b21e319bb 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"