From 9e07cb05fa87936116d72d4fafe2a27d84e65f37 Mon Sep 17 00:00:00 2001 From: juhosg Date: Wed, 26 Jan 2011 20:35:42 +0000 Subject: ar71xx: add support for the WNDR3700v2 board Based on a patch by Mark Mentovai git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25118 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'target/linux/ar71xx/base-files/lib') diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index c08860542..d390f9fdf 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 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 } -- cgit v1.2.3