X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Fbase-files%2Flib%2Fupgrade%2Fplatform.sh;h=e25410bc9fa4039550cfd6dabffc3dbbbcca4374;hb=d19530c69337ad0b378d8d74ae7fa6185c95aeb6;hp=f7c3b9a04e7545b9a4be2d8d77f43cbfdde7a2d3;hpb=9e26031a8897eac44c16445f83729ba972fd95a7;p=openwrt%2Fopenwrt.git diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index f7c3b9a04e..e25410bc9f 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -2,6 +2,7 @@ # Copyright (C) 2011 OpenWrt.org # +. /lib/functions/system.sh . /lib/ar71xx.sh PART_NAME=firmware @@ -106,6 +107,29 @@ platform_do_upgrade_compex() { fi } +alfa_check_image() { + local magic_long="$(get_magic_long "$1")" + local fw_part_size=$(mtd_get_part_size firmware) + + case "$magic_long" in + "27051956") + [ "$fw_part_size" != "16318464" ] && { + echo "Invalid image magic \"$magic_long\" for $fw_part_size bytes" + return 1 + } + ;; + + "68737173") + [ "$fw_part_size" != "7929856" ] && { + echo "Invalid image magic \"$magic_long\" for $fw_part_size bytes" + return 1 + } + ;; + esac + + return 0 +} + platform_check_image() { local board=$(ar71xx_board_name) local magic="$(get_magic_word "$1")" @@ -151,6 +175,7 @@ platform_check_image() { dir-825-c1 | \ dir-835-a1 | \ dragino2 | \ + esr1750 | \ ew-dorin | \ ew-dorin-router | \ hiwifi-hc6361 | \ @@ -161,10 +186,12 @@ platform_check_image() { tew-712br | \ tew-732br | \ wrt400n | \ + airgateway | \ airrouter | \ bullet-m | \ nanostation-m | \ rocket-m | \ + nanostation-m-xw | \ rw2458n | \ wndap360 | \ wzr-hp-g300nh2 | \ @@ -226,6 +253,7 @@ platform_check_image() { archer-c7 | \ el-m150 | \ el-mini | \ + gl-inet | \ oolite | \ tl-mr10u | \ tl-mr11u | \ @@ -290,6 +318,12 @@ platform_check_image() { return 0 ;; + + tube2h) + alfa_check_image "$1" && return 0 + return 1 + ;; + uap-pro) [ "$magic_long" != "19852003" ] && { echo "Invalid image type." @@ -320,6 +354,7 @@ platform_check_image() { pb42 | \ pb44 | \ all0305 | \ + eap300v2 | \ eap7660d | \ ja76pf | \ ja76pf2 | \ @@ -374,6 +409,7 @@ platform_do_upgrade() { all0315n ) platform_do_upgrade_allnet "0x9f080000" "$ARGV" ;; + eap300v2 |\ cap4200ag) platform_do_upgrade_allnet "0xbf0a0000" "$ARGV" ;;