X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Fbase-files%2Flib%2Far71xx.sh;h=d5dd561e3b95153aec6ddddac8eb1c863e9c5c0c;hb=66950455b7d1c462db1a1fd72622f0703d55ce6e;hp=02872de1457d8a14bcf762c55f523b692dcb9256;hpb=baaef4295286f02f8f81493ae84885afdd8acb37;p=openwrt%2Fstaging%2Fwigyori.git diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 02872de145..d5dd561e3b 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -37,16 +37,26 @@ wndr3700_board_detect() { machine="NETGEAR WNDR3700" ;; "33373031") - local model - model=$(ar71xx_get_mtd_offset_size_format art 56 10 %c) - if [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' ]; then - machine="NETGEAR WNDR3700v2" - elif [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xffN' ]; then - machine="NETGEAR WNDRMAC" - else + # Use awk to remove everything after the first zero byte + model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | awk 'BEGIN{FS="[[:cntrl:]]"} {print $1; exit}')" + case $model in + $'\xff'*) + if [ "${model:24:1}" = 'N' ]; then + machine="NETGEAR WNDRMAC" + else + machine="NETGEAR WNDR3700v2" + fi + ;; + '29763654+16+64'*) + machine="NETGEAR ${model:14}" + ;; + '29763654+16+128'*) + machine="NETGEAR ${model:15}" + ;; + *) + # Unknown ID machine="NETGEAR $model" - fi - ;; + esac esac AR71XX_BOARD_NAME="$name" @@ -97,6 +107,9 @@ tplink_board_detect() { "015300"*) model="EasyLink EL-MINI" ;; + "120000"*) + model="MERCURY MAC1200R" + ;; "3C0001"*) model="OOLITE" ;; @@ -127,6 +140,9 @@ tplink_board_detect() { "075000"*) model="TP-Link TL-WA750RE" ;; + "721000"*) + model="TP-Link TL-WA7210N" + ;; "751000"*) model="TP-Link TL-WA7510N" ;; @@ -177,6 +193,9 @@ tplink_board_detect() { "001101"*) model="TP-Link TL-MR11U" ;; + "001201"*) + model="TP-Link TL-MR12U" + ;; "001301"*) model="TP-Link TL-MR13U" ;; @@ -265,6 +284,19 @@ tplink_pharos_board_detect() { [ -n "$model" ] && AR71XX_MODEL="$model v$2" } +gl_inet_board_detect() { + local size="$(mtd_get_part_size 'firmware')" + + case "$size" in + 8192000) + AR71XX_MODEL='GL-iNet 6408A v1' + ;; + 16580608) + AR71XX_MODEL='GL-iNet 6416A v1' + ;; + esac +} + ar71xx_board_detect() { local machine local name @@ -392,6 +424,7 @@ ar71xx_board_detect() { ;; *"GL-CONNECT INET v1") name="gl-inet" + gl_inet_board_detect ;; *"EnGenius ESR1750") name="esr1750" @@ -435,6 +468,15 @@ ar71xx_board_detect() { *LS-SR71) name="ls-sr71" ;; + *"MAC1200R") + name="mc-mac1200r" + ;; + *MR12) + name="mr12" + ;; + *MR16) + name="mr16" + ;; *MR600v2) name="mr600v2" ;; @@ -486,6 +528,9 @@ ar71xx_board_detect() { *OM5P) name="om5p" ;; + *"OM5P AN") + name="om5p-an" + ;; *PB42) name="pb42" ;; @@ -543,6 +588,9 @@ ar71xx_board_detect() { *"RouterBOARD 911G-5HPnD") name="rb-911g-5hpnd" ;; + *"RouterBOARD 911G-5HPacD") + name="rb-911g-5hpacd" + ;; *"RouterBOARD 912UAG-2HPnD") name="rb-912uag-2hpnd" ;; @@ -579,6 +627,9 @@ ar71xx_board_detect() { *"Rocket M") name="rocket-m" ;; + *"Rocket M XW") + name="rocket-m-xw" + ;; *RouterStation) name="routerstation" ;; @@ -642,6 +693,9 @@ ar71xx_board_detect() { *"TL-WA701ND v2") name="tl-wa701nd-v2" ;; + *"TL-WA7210N v2") + name="tl-wa7210n-v2" + ;; *TL-WA750RE) name="tl-wa750re" ;; @@ -702,6 +756,9 @@ ar71xx_board_detect() { *TL-WR941ND) name="tl-wr941nd" ;; + *"TL-WR941N/ND v5") + name="tl-wr941nd-v5" + ;; *"TL-WR703N v1") name="tl-wr703n" ;; @@ -717,7 +774,10 @@ ar71xx_board_detect() { *"TL-MR11U") name="tl-mr11u" ;; - *"TL-MR13U") + *"TL-MR12U") + name="tl-mr12u" + ;; + *"TL-MR13U v1") name="tl-mr13u" ;; *"Tube2H") @@ -750,6 +810,12 @@ ar71xx_board_detect() { *WPE72) name="wpe72" ;; + *WPJ344) + name="wpj344" + ;; + *WPJ558) + name="wpj558" + ;; *WNDAP360) name="wndap360" ;;