X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Fbase-files%2Flib%2Far71xx.sh;h=1492b5077449db7a7038d1467f674e02308a59b9;hb=f5aa4590433638e6b2c191412fa802ae5a64cdc9;hp=b06c60ed70d5c34cb5b64eaef9850c7b9f0e4e23;hpb=c5ff273d85f69981e5b126eeaed3dee5b4061fb4;p=openwrt%2Fopenwrt.git diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index b06c60ed70..1492b50774 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -64,6 +64,39 @@ wndr3700_board_detect() { AR71XX_MODEL="$machine" } +ubnt_get_mtd_part_magic() { + ar71xx_get_mtd_offset_size_format EEPROM 4118 2 %02x +} + +ubnt_xm_board_detect() { + local model + local magic + + magic="$(ubnt_get_mtd_part_magic)" + case ${magic:0:3} in + "e00"|\ + "e01"|\ + "e80") # Different revisions of the NanoStation? + model="Ubiquiti NanoStation M" + ;; + "e0a") + model="Ubiquiti NanoStation loco M" + ;; + "e1b") # Rocket M5 untested + model="Ubiquiti Rocket M" + ;; + "e20"|\ + "e2d") # Bullet M Ti + model="Ubiquiti Bullet M" + ;; + "e30") + model="Ubiquiti PicoStation M" + ;; + esac + + [ -z "$model" ] || AR71XX_MODEL="${model}${magic:3:1}" +} + cybertan_get_hw_magic() { local part @@ -73,6 +106,15 @@ cybertan_get_hw_magic() { dd bs=8 count=1 skip=0 if=$part 2>/dev/null | hexdump -v -n 8 -e '1/1 "%02x"' } +dir505_board_detect() { + local dev=$(find_mtd_part 'mac') + [ -z "$dev" ] && return + + # The revision is stored at the beginning of the "mac" partition + local rev="$(LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}' $dev)" + AR71XX_MODEL="D-Link DIR-505 rev. $rev" +} + tplink_get_hwid() { local part @@ -271,7 +313,7 @@ tplink_board_detect() { model="TP-Link TL-WDR6500" ;; "453000"*) - model="MERCURY MW4530R" + model="Mercury MW4530R" ;; "934100"*) model="NC-LINK SMART-300" @@ -319,6 +361,9 @@ tplink_pharos_board_detect() { 'CPE520(TP-LINK|UN|N300-5)') model='TP-Link CPE520' ;; + 'EAP120(TP-LINK|UN|N300-2)') + model='TP-Link EAP120' + ;; esac [ -n "$model" ] && AR71XX_MODEL="$model v$2" @@ -440,6 +485,9 @@ ar71xx_board_detect() { *C-55) name="c-55" ;; + *C-60) + name="c-60" + ;; *CAP4200AG) name="cap4200ag" ;; @@ -471,6 +519,7 @@ ar71xx_board_detect() { ;; *"DIR-505 rev. A1") name="dir-505-a1" + dir505_board_detect ;; *"DIR-600 rev. A1") name="dir-600-a1" @@ -493,6 +542,9 @@ ar71xx_board_detect() { *"DIR-835 rev. A1") name="dir-835-a1" ;; + *"DIR-869 rev. A1") + name="dir-869-a1" + ;; *"dLAN Hotspot") name="dlan-hotspot" ;; @@ -505,12 +557,19 @@ ar71xx_board_detect() { *DR344) name="dr344" ;; + *DR531) + name="dr531" + ;; *"Dragino v2") name="dragino2" ;; *"Domino Pi") name="gl-domino" ;; + *"EAP120") + name="eap120" + tplink_pharos_board_detect + ;; *"EAP300 v2") name="eap300v2" ;; @@ -533,6 +592,12 @@ ar71xx_board_detect() { *"GL AR300") name="gl-ar300" ;; + *"GL-AR300M") + name="gl-ar300m" + ;; + *"GL-MIFI") + name="gl-mifi" + ;; *"EnGenius EPG5000") name="epg5000" ;; @@ -550,12 +615,14 @@ ar71xx_board_detect() { ;; *"Bullet M") name="bullet-m" + ubnt_xm_board_detect ;; *"Loco M XW") name="loco-m-xw" ;; *"Nanostation M") name="nanostation-m" + ubnt_xm_board_detect ;; *"Nanostation M XW") name="nanostation-m-xw" @@ -563,6 +630,9 @@ ar71xx_board_detect() { *JWAP003) name="jwap003" ;; + *JWAP230) + name="jwap230" + ;; *"Hornet-UB") local size size=$(awk '/firmware/ { print $2 }' /proc/mtd) @@ -769,6 +839,7 @@ ar71xx_board_detect() { ;; *"Rocket M") name="rocket-m" + ubnt_xm_board_detect ;; *"Rocket M TI") name="rocket-m-ti" @@ -794,6 +865,9 @@ ar71xx_board_detect() { *"Telldus TellStick ZNet Lite") name="tellstick-znet-lite" ;; + *SOM9331) + name="som9331" + ;; *TEW-632BRP) name="tew-632brp" ;; @@ -917,6 +991,9 @@ ar71xx_board_detect() { *"TL-WR841N/ND v9") name="tl-wr841n-v9" ;; + *"TL-WR841N/ND v11") + name="tl-wr841n-v11" + ;; *"TL-WR842N/ND v2") name="tl-wr842n-v2" ;; @@ -1049,6 +1126,9 @@ ar71xx_board_detect() { *WRT400N) name="wrt400n" ;; + *"WRTnode2Q board") + name="wrtnode2q" + ;; *"WZR-450HP2") name="wzr-450hp2" ;; @@ -1067,6 +1147,12 @@ ar71xx_board_detect() { *WHR-HP-G300N) name="whr-hp-g300n" ;; + *Z1) + name="z1" + ;; + *ZBT-WE1526) + name="zbt-we1526" + ;; *ZCN-1523H-2) name="zcn-1523h-2" ;;