aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/base-files
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-04-09 05:22:04 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-04-09 05:22:04 +0000
commitde4a6f43f4106f7900a783fa20e1fc9b074ba564 (patch)
tree2bdb0f3bb6c689e32a103e2869d62a4e7b90e2fc /target/linux/brcm47xx/base-files
parent9b112b4e0079bb8a379e8595a91b46ea1c7a42b1 (diff)
downloadupstream-de4a6f43f4106f7900a783fa20e1fc9b074ba564.tar.gz
upstream-de4a6f43f4106f7900a783fa20e1fc9b074ba564.tar.bz2
upstream-de4a6f43f4106f7900a783fa20e1fc9b074ba564.zip
brcm47xx: switch to the otrx for verifying TRX images
This adds checking CRC32 of provided firmware image. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45316 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/base-files')
-rw-r--r--target/linux/brcm47xx/base-files/lib/upgrade/platform.sh18
1 files changed, 2 insertions, 16 deletions
diff --git a/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh b/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
index f5b9bda690..b9110a7589 100644
--- a/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
@@ -77,20 +77,6 @@ brcm47xx_identify() {
echo "unknown"
}
-# $(1): image that should contain trx
-# $(2): trx offset in image
-platform_check_image_trx() {
- local magic=$(get_magic_long_at "$1" $2)
-
- [ "$magic" != "48445230" ] && {
- return 1
- }
-
- # TODO: Check crc32
-
- return 0
-}
-
platform_check_image() {
[ "$#" -gt 1 ] && return 1
@@ -111,7 +97,7 @@ platform_check_image() {
error=1
}
- if ! platform_check_image_trx "$1" "$header_len"; then
+ if ! otrx -c "$1" -o "$header_len"; then
echo "No valid TRX firmware in the CHK image"
error=1
fi
@@ -126,7 +112,7 @@ platform_check_image() {
error=1
}
- if ! platform_check_image_trx "$1" 32; then
+ if ! otrx -c "$1" -o 32; then
echo "No valid TRX firmware in the CyberTAN image"
error=1
fi