The Netgear WNDRMAC v2 is a hardware variant of the Netgear WNDR3800 Specifications ============== * SoC: Atheros AR7161 * RAM: 128mb * Flash on board: 16mb * WiFi: Atheros AR9220 (a/n), Atheros AR9223 (b/g/n) * Ethernet: RealTek RTL8366SR (1xWAN, 4xLAN, Gigabit) * Serial console: Yes, 115200 / 8N1 (JTAG) * USB: 1x2.0 * Power: 12 VDC, 2.5 A * Full specs on [openwrt.org](https://openwrt.org/toh/hwdata/netgear/netgear_wndrmac_v2) Flash Instructions ================== It is possible to use the OEM Upgrade page to install the `factory` variant of the firmware. After the initial upgrade, you will need to telnet into the router (default IP 192.168.1.1) to install anything. You may install LuCI this way. At this point, you will have a web interface to configure OpenWRT on the WNDRMAC v2. Please use the `sysupgrade` variant for subsequent flashes. Recovery Instructions ===================== A TFTP-based recovery flash is possible if the need arises. Please refer to the WNDR3800 page on openwrt.org for details. https://openwrt.org/toh/netgear/wndr3800#recovery_flash_in_failsafe_mode Signed-off-by: Renaud Lepage <root@cybikbase.com> [do not add device to uboot-envtools, update DTSI name] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
162 lines
3.7 KiB
Bash
162 lines
3.7 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,fritz1750e|\
|
|
avm,fritz4020|\
|
|
avm,fritz450e)
|
|
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,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|\
|
|
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)
|
|
;;
|
|
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)
|
|
;;
|
|
enterasys,ws-ap3705i)
|
|
caldata_extract "calibrate" 0x5000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR0)
|
|
;;
|
|
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|\
|
|
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-ar7240|\
|
|
ubnt,bullet-m-ar7241|\
|
|
ubnt,nanobridge-m|\
|
|
ubnt,nanostation-loco-m|\
|
|
ubnt,nanostation-m|\
|
|
ubnt,picostation-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,wndr3700-v2|\
|
|
netgear,wndr3800|\
|
|
netgear,wndr3800ch|\
|
|
netgear,wndrmac-v2)
|
|
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,wndr3700-v2|\
|
|
netgear,wndr3800|\
|
|
netgear,wndr3800ch|\
|
|
netgear,wndrmac-v2)
|
|
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
|