This patch adds ath79 support for Netgear WNR2200. Router was previously supported by ar71xx target only (8 MiB variant). Netgear WNR2200 has two flash versions - 8MiB sold in EU, US etc. and 16 MiB for Russia and China markets. Apart from flash size both variants share the same hardware specification. Specification ============= * Description: Netgear WNR2200 * Loader: U-boot * SOC: Atheros AR7241 (360 MHz) * RAM: 64 MiB * Flash: 8 MiB or 16 MiB (SPI NOR) - U-boot binary: 256 KiB - U-boot environment: 64 KiB - Firmware: 7808 KiB or 16000 KiB - ART: 64 KiB * Ethernet: 4 x 10/100 LAN + 1 x 10/100 WAN * Wireless: 2.4 GHz b/g/n (Atheros AR9287) * USB: yes, 1 x USB 2.0 * Buttons: - Reset - WiFi (rfkill) - WPS * LEDs: - Power (amber/green) - WAN (amber/green) - WLAN (blue) - 4 x LAN (amber/green) - WPS (green) * UART: 4-pin connector JP1, 3.3V (Vcc, TX, RX, GND), 115200 8N1 * Power supply: DC 12V 1.5A * MAC addresses: LAN on case label, WAN +1, WLAN +2 Installation ============ * TFTP recovery * TFTP via U-boot prompt * sysupgrade * Web interface Test build configuration ======================== CONFIG_TARGET_ath79=y CONFIG_TARGET_ath79_generic=y CONFIG_TARGET_ath79_generic_DEVICE_netgear_wnr2200-8m=y CONFIG_ALL_KMODS=y CONFIG_DEVEL=y CONFIG_CCACHE=y CONFIG_COLLECT_KERNEL_DEBUG=y CONFIG_IMAGEOPT=y CONFIG_KERNEL_DEBUG_INFO=y CONFIG_KERNEL_DEBUG_KERNEL=y Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
142 lines
3.2 KiB
Bash
142 lines
3.2 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
|
|
avm,fritz4020)
|
|
caldata_extract_reverse "urlader" 0x1541 0x440
|
|
;;
|
|
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,wg1200cr|\
|
|
wd,mynet-n750)
|
|
caldata_extract "art" 0x1000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii devdata "wlan24mac")
|
|
;;
|
|
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)
|
|
caldata_extract "art" 0x1000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr)
|
|
;;
|
|
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")
|
|
;;
|
|
*)
|
|
caldata_die "board $board is not supported yet"
|
|
;;
|
|
esac
|
|
;;
|
|
"ath9k-eeprom-pci-0000:00:00.0.bin")
|
|
case $board in
|
|
avm,fritz300e)
|
|
caldata_extract_reverse "urloader" 0x1541 0x440
|
|
;;
|
|
buffalo,wzr-hp-g302h-a1a0)
|
|
caldata_extract "art" 0x1000 0xeb8
|
|
;;
|
|
buffalo,wzr-hp-g450h)
|
|
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)
|
|
;;
|
|
ocedo,raccoon|\
|
|
tplink,tl-wdr3500-v1|\
|
|
tplink,tl-wdr3600-v1|\
|
|
tplink,tl-wdr4300-v1|\
|
|
tplink,tl-wdr4900-v2|\
|
|
winchannel,wb2000)
|
|
caldata_extract "art" 0x5000 0x440
|
|
;;
|
|
netgear,wnr2200-8m|\
|
|
netgear,wnr2200-16m|\
|
|
pcs,cap324|\
|
|
tplink,tl-wr2543-v1|\
|
|
tplink,tl-wr842n-v1|\
|
|
ubnt,airrouter|\
|
|
ubnt,bullet-m|\
|
|
ubnt,nano-m|\
|
|
ubnt,rocket-m)
|
|
caldata_extract "art" 0x1000 0x1000
|
|
;;
|
|
ubnt,unifi)
|
|
caldata_extract "art" 0x1000 0x800
|
|
;;
|
|
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-hp-ag300h|\
|
|
netgear,wndr3700|\
|
|
netgear,wndr3700v2|\
|
|
netgear,wndr3800|\
|
|
netgear,wndr3800ch)
|
|
caldata_extract "art" 0x1000 0xeb8
|
|
;;
|
|
dlink,dir-825-b1)
|
|
caldata_extract "caldata" 0x1000 0xeb8
|
|
ath9k_patch_mac_crc $(mtd_get_mac_text "caldata" 0xffa0) 0x20c
|
|
;;
|
|
*)
|
|
caldata_die "board $board is not supported yet"
|
|
;;
|
|
esac
|
|
;;
|
|
"ath9k-eeprom-pci-0000:00:12.0.bin")
|
|
case $board in
|
|
buffalo,wzr-hp-ag300h|\
|
|
netgear,wndr3700|\
|
|
netgear,wndr3700v2|\
|
|
netgear,wndr3800|\
|
|
netgear,wndr3800ch)
|
|
caldata_extract "art" 0x5000 0xeb8
|
|
;;
|
|
dlink,dir-825-b1)
|
|
caldata_extract "caldata" 0x5000 0xeb8
|
|
ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_text "caldata" 0xffb4) 1) 0x20c
|
|
;;
|
|
*)
|
|
caldata_die "board $board is not supported yet"
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|