aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files/lib
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-01-26 20:35:42 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-01-26 20:35:42 +0000
commit67c3e0bf7e5148a91205d280d4029b32dcc9b6e0 (patch)
tree7a4f1cace0f28b928841b8ea1fb717948d320c0a /target/linux/ar71xx/base-files/lib
parent25feec0c9c6a2bd9fe4c20e3cfe55e47c3d4bfaf (diff)
downloadupstream-67c3e0bf7e5148a91205d280d4029b32dcc9b6e0.tar.gz
upstream-67c3e0bf7e5148a91205d280d4029b32dcc9b6e0.tar.bz2
upstream-67c3e0bf7e5148a91205d280d4029b32dcc9b6e0.zip
ar71xx: add support for the WNDR3700v2 board
Based on a patch by Mark Mentovai <mark@moxienet.com> SVN-Revision: 25118
Diffstat (limited to 'target/linux/ar71xx/base-files/lib')
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh3
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh10
2 files changed, 12 insertions, 1 deletions
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index c08860542e..d390f9fdff 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -130,6 +130,9 @@ ar71xx_board_name() {
*WNDR3700)
name="wndr3700"
;;
+ *WNDR3700v2)
+ name="wndr3700v2"
+ ;;
*WNR2000)
name="wnr2000"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 0b867c0052..067fe033fa 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
}