Atheros DB120 reference board. Specifications: SoC: QCA9344 DRAM: 128Mb DDR2 Flash: 8Mb SPI-NOR, 128Mb NAND flash Switch: 5x 10/100Mbps via AR8229 switch (integrated into SoC), 5x 10/100/1000Mbps via QCA8237 via RGMII WLAN: AR9300 (SoC, 2.4G+5G) + AR9340 (PCIe, 5G-only) USB: 1x 2.0 UART: standard QCA UART header JTAG: yes Button: 1x reset LEDs: a lot Slots: 2x mPCIe + 1x mini-PCI, but using them requires additional undocumented changes. Misc: The board allows to boot off NAND, and there is I2S audio support as well - also requiring additional undocumented changes. Installation: 1. Original bootloader Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin available via TFTP tftpboot 0x80060000 openwrt-ath79-generic-atheros_db120-squashfs-factory.bin erase 0x9f050000 +$filesize cp.b $fileaddr 0x9f050000 $filesize 2. pepe2k's u-boot_mod Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin available via TFTP, as "firmware.bin" run fw_upg Reboot the board. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> [explicit factory recipe in generic.mk, sorting in 10-ath9k-eeprom, convert to nvmem, use fwconcat* names in DTS, remove unneeded DT labels, remove redundant uart node] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
194 lines
4.3 KiB
Bash
194 lines
4.3 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
|
|
;;
|
|
avm,fritz1750e|\
|
|
avm,fritz4020|\
|
|
avm,fritz450e|\
|
|
avm,fritzdvbc)
|
|
caldata_extract_reverse "urlader" 0x1541 0x440
|
|
;;
|
|
dlink,dap-2695-a1)
|
|
caldata_extract "art" 0x1000 0x440
|
|
ath9k_patch_mac $(mtd_get_mac_ascii bdcfg "wlanmac")
|
|
;;
|
|
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-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)
|
|
;;
|
|
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
|
|
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|\
|
|
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|\
|
|
ubnt,airrouter|\
|
|
ubnt,bullet-m-ar7240|\
|
|
ubnt,bullet-m-ar7241|\
|
|
ubnt,nanobridge-m|\
|
|
ubnt,nanostation-loco-m|\
|
|
ubnt,nanostation-m|\
|
|
ubnt,picostation-m|\
|
|
ubnt,powerbridge-m|\
|
|
ubnt,rocket-m)
|
|
caldata_extract "art" 0x1000 0x1000
|
|
;;
|
|
openmesh,mr600-v1|\
|
|
openmesh,mr600-v2)
|
|
caldata_extract "ART" 0x5000 0x440
|
|
;;
|
|
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,wndr3700|\
|
|
netgear,wndr3700-v2|\
|
|
netgear,wndr3800|\
|
|
netgear,wndr3800ch|\
|
|
netgear,wndrmac-v1|\
|
|
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
|
|
;;
|
|
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,wndr3700|\
|
|
netgear,wndr3700-v2|\
|
|
netgear,wndr3800|\
|
|
netgear,wndr3800ch|\
|
|
netgear,wndrmac-v1|\
|
|
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
|
|
;;
|
|
meraki,mr16)
|
|
caldata_extract "art" 0x15000 0xeb8
|
|
;;
|
|
*)
|
|
caldata_die "board $board is not supported yet"
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|