summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files/lib/upgrade
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ar71xx/base-files/lib/upgrade')
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 0b867c005..067fe033f 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -64,6 +64,7 @@ platform_do_upgrade_combined() {
platform_check_image() {
local board=$(ar71xx_board_name)
local magic="$(get_magic_word "$1")"
+ local magic_long="$(get_magic_long "$1")"
[ "$ARGC" -gt 1 ] && return 1
@@ -83,7 +84,14 @@ platform_check_image() {
return 0
;;
wndr3700)
- [ "$magic" != "3337" ] && {
+ [ "$magic_long" != "33373030" ] && {
+ echo "Invalid image type."
+ return 1
+ }
+ return 0
+ ;;
+ wndr3700v2)
+ [ "$magic_long" != "33373031" ] && {
echo "Invalid image type."
return 1
}