X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Fbase-files%2Flib%2Fupgrade%2Fplatform.sh;h=17103ab5ec2daa74ffb07197d2691441f8f10c08;hb=0d5c4abece5ac9edc755b5d75c93388dc0fe3aab;hp=e1116182883f8d6b1d5b43a1e85f8aec8b618048;hpb=862660e6584b78e1bddfdb82ba8b8b716f9c338b;p=openwrt.git diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index e111618288..17103ab5ec 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 | \ @@ -218,7 +245,8 @@ platform_check_image() { om2pv2 | \ om2p-hs | \ om2p-hsv2 | \ - om2p-lc) + om2p-lc | \ + om5p) platform_check_image_openmesh "$magic_long" "$1" && return 0 return 1 ;; @@ -291,6 +319,12 @@ platform_check_image() { return 0 ;; + + tube2h) + alfa_check_image "$1" && return 0 + return 1 + ;; + uap-pro) [ "$magic_long" != "19852003" ] && { echo "Invalid image type." @@ -321,6 +355,7 @@ platform_check_image() { pb42 | \ pb44 | \ all0305 | \ + eap300v2 | \ eap7660d | \ ja76pf | \ ja76pf2 | \ @@ -375,6 +410,7 @@ platform_do_upgrade() { all0315n ) platform_do_upgrade_allnet "0x9f080000" "$ARGV" ;; + eap300v2 |\ cap4200ag) platform_do_upgrade_allnet "0xbf0a0000" "$ARGV" ;; @@ -388,7 +424,8 @@ platform_do_upgrade() { om2pv2 | \ om2p-hs | \ om2p-hsv2 | \ - om2p-lc) + om2p-lc | \ + om5p) platform_do_upgrade_openmesh "$ARGV" ;; uap-pro)