Add support for the TrendNet TEW-673GRU to ath79. This device was supported in 19.07.9 but was deprecated with ar71xx. This is mostly a copy of D-Link DIR-825 B1. Updates have been completed to enable factory.bin and sysupgrade.bin both. Code improvements to DTS file and makefile. Architecture | MIPS Vendor | Qualcomm Atheros bootloader | U-Boot System-On-Chip | AR7161 rev 2 (MIPS 24Kc V7.4) CPU/Speed | 24Kc V7.4 680 MHz Flash-Chip | Macronix MX25L6405D Flash size | 8192 KiB RAM Chip: | ProMOS V58C2256164SCI5 × 2 RAM size | 64 MiB Wireless | 2 x Atheros AR922X 2.4GHz/5.0GHz 802.11abgn Ethernet | RealTek RTL8366S Gigabit w/ port based vlan support USB | Yes 2 x 2.0 Initial Flashing Process: 1) Download 22.03 tew-673gru factory bin 2) Flash 22.03 using TrendNet GUI OpenWRT Upgrade Process 3) Download 22.03 tew-673gru sysupgrade.bin 4) Flash 22.03 using OpenWRT GUI Signed-off-by: Korey Caro <korey.caro@gmail.com>
196 lines
4.4 KiB
Bash
196 lines
4.4 KiB
Bash
#!/bin/sh
|
|
|
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
|
|
|
. /lib/functions/caldata.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$FIRMWARE" in
|
|
"ath9k-eeprom-ahb-18100000.wmac.bin")
|
|
case $board in
|
|
8dev,lima)
|
|
caldata_extract "art" 0x1000 0x800
|
|
;;
|
|
asus,pl-ac56|\
|
|
asus,rp-ac51|\
|
|
asus,rp-ac66)
|
|
caldata_extract "art" 0x1000 0x440
|
|
;;
|
|
avm,fritz1750e|\
|
|
avm,fritz4020|\
|
|
avm,fritz450e|\
|
|
avm,fritzdvbc)
|
|
caldata_extract_reverse "urlader" 0x1541 0x440
|
|
;;
|
|
dlink,dir-505|\
|
|
dlink,dir-825-c1|\
|
|
dlink,dir-835-a1)
|
|
caldata_extract "art" 0x1000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_text "mac" 0x4)
|
|
;;
|
|
dlink,dir-842-c1|\
|
|
dlink,dir-842-c2|\
|
|
dlink,dir-842-c3|\
|
|
dlink,dir-859-a1|\
|
|
nec,wf1200cr|\
|
|
nec,wg1200cr|\
|
|
wd,mynet-n600|\
|
|
wd,mynet-n750)
|
|
caldata_extract "art" 0x1000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
|
|
;;
|
|
engenius,ecb1200|\
|
|
engenius,ecb1750)
|
|
caldata_extract "art" 0x1000 0x440
|
|
ath9k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env athaddr) 1)
|
|
;;
|
|
engenius,epg5000|\
|
|
iodata,wn-ac1167dgr|\
|
|
iodata,wn-ac1600dgr|\
|
|
iodata,wn-ac1600dgr2|\
|
|
iodata,wn-ag300dgr|\
|
|
sitecom,wlr-7100|\
|
|
sitecom,wlr-8100)
|
|
caldata_extract "art" 0x1000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr)
|
|
;;
|
|
enterasys,ws-ap3705i)
|
|
caldata_extract "calibrate" 0x1000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR1)
|
|
;;
|
|
extreme-networks,ws-ap3805i)
|
|
caldata_extract "art" 0x1000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR1)
|
|
;;
|
|
nec,wg800hp)
|
|
caldata_extract "art" 0x1000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_text board_data 0x680)
|
|
;;
|
|
qihoo,c301)
|
|
caldata_extract "radiocfg" 0x1000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
|
|
;;
|
|
tplink,deco-s4-v2)
|
|
caldata_extract "art" 0x1000 0x440
|
|
base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
|
|
ath9k_patch_mac $(macaddr_add $base_mac 1)
|
|
;;
|
|
*)
|
|
caldata_die "board $board is not supported yet"
|
|
;;
|
|
esac
|
|
;;
|
|
"ath9k-eeprom-pci-0000:00:00.0.bin")
|
|
case $board in
|
|
araknis,an-300-ap-i-n|\
|
|
atheros,db120|\
|
|
engenius,eap600|\
|
|
engenius,ecb600|\
|
|
mercury,mw4530r-v1|\
|
|
ocedo,raccoon|\
|
|
tplink,tl-wdr3500-v1|\
|
|
tplink,tl-wdr3600-v1|\
|
|
tplink,tl-wdr4300-v1|\
|
|
tplink,tl-wdr4300-v1-il|\
|
|
tplink,tl-wdr4310-v1|\
|
|
tplink,tl-wdr4900-v2|\
|
|
ubnt,unifi-ap-pro|\
|
|
watchguard,ap100|\
|
|
watchguard,ap200|\
|
|
winchannel,wb2000)
|
|
caldata_extract "art" 0x5000 0x440
|
|
;;
|
|
avm,fritz300e)
|
|
caldata_extract_reverse "urloader" 0x1541 0x440
|
|
;;
|
|
buffalo,wzr-hp-g302h-a1a0|\
|
|
ubnt,unifi-ap-outdoor-plus)
|
|
caldata_extract "art" 0x1000 0xeb8
|
|
;;
|
|
buffalo,wzr-hp-g450h|\
|
|
ubnt,unifi)
|
|
caldata_extract "art" 0x1000 0x440
|
|
;;
|
|
dlink,dir-825-c1|\
|
|
dlink,dir-835-a1)
|
|
caldata_extract "art" 0x5000 0x440
|
|
ath9k_patch_mac $(macaddr_add $(mtd_get_mac_text "mac" 0x18) 1)
|
|
;;
|
|
enterasys,ws-ap3705i)
|
|
caldata_extract "calibrate" 0x5000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR0)
|
|
;;
|
|
meraki,mr12)
|
|
caldata_extract "art" 0x11000 0xeb8
|
|
;;
|
|
netgear,wnr2200-8m|\
|
|
netgear,wnr2200-16m|\
|
|
pcs,cap324|\
|
|
tplink,tl-wr2543-v1|\
|
|
tplink,tl-wr842n-v1)
|
|
caldata_extract "art" 0x1000 0x1000
|
|
;;
|
|
openmesh,mr600-v1|\
|
|
openmesh,mr600-v2|\
|
|
openmesh,om5p-an)
|
|
caldata_extract "ART" 0x5000 0x440
|
|
;;
|
|
openmesh,om2p-v1)
|
|
caldata_extract "ART" 0x1000 0x440
|
|
;;
|
|
wd,mynet-n600|\
|
|
wd,mynet-n750)
|
|
caldata_extract "art" 0x5000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan5mac")
|
|
;;
|
|
wd,mynet-wifi-rangeextender)
|
|
caldata_extract "art" 0x1000 0x1000
|
|
ath9k_patch_mac $(nvram get wl0_hwaddr)
|
|
;;
|
|
*)
|
|
caldata_die "board $board is not supported yet"
|
|
;;
|
|
esac
|
|
;;
|
|
"ath9k-eeprom-pci-0000:00:11.0.bin")
|
|
case $board in
|
|
buffalo,wzr-600dhp|\
|
|
buffalo,wzr-hp-ag300h|\
|
|
netgear,wndap360)
|
|
caldata_extract "art" 0x1000 0xeb8
|
|
;;
|
|
dlink,dir-825-b1|\
|
|
trendnet,tew-673gru)
|
|
caldata_extract "caldata" 0x1000 0xeb8
|
|
ath9k_patch_mac_crc $(mtd_get_mac_text "caldata" 0xffa0) 0x20c
|
|
;;
|
|
meraki,mr16)
|
|
caldata_extract "art" 0x11000 0xeb8
|
|
;;
|
|
*)
|
|
caldata_die "board $board is not supported yet"
|
|
;;
|
|
esac
|
|
;;
|
|
"ath9k-eeprom-pci-0000:00:12.0.bin")
|
|
case $board in
|
|
buffalo,wzr-600dhp|\
|
|
buffalo,wzr-hp-ag300h|\
|
|
netgear,wndap360)
|
|
caldata_extract "art" 0x5000 0xeb8
|
|
;;
|
|
dlink,dir-825-b1|\
|
|
trendnet,tew-673gru)
|
|
caldata_extract "caldata" 0x5000 0xeb8
|
|
ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_text "caldata" 0xffb4) 1) 0x20c
|
|
;;
|
|
meraki,mr16)
|
|
caldata_extract "art" 0x15000 0xeb8
|
|
;;
|
|
*)
|
|
caldata_die "board $board is not supported yet"
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|