mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
a736d912e2
SOC: IPQ4019 / QCA Dakota CPU: Quad-Core ARMv7 Processor rev 5 (v7l) Cortex-A7 DRAM: 256 MiB FLASH: NOR 4 MiB + NAND 128 MiB ETH: Qualcomm Atheros QCA8072 WLAN1: Qualcomm Atheros QCA4019 2.4GHz 802.11bgn 2:2x2 WLAN2: Qualcomm Atheros QCA4019 5GHz 802.11a/n/ac 2:2x2 WLAN2: Qualcomm Atheros QCA9888 5GHz 802.11a/n/ac 2:2x2 INPUT: WPS Button LEDS: Power, LAN1, LAN2, WLAN 2.4GHz, WLAN 5GHz-1, WLAN 5GHz-2, OPMODE 1. Load Ramdisk via U-Boot To set up the flash memory environment, do the following: a. As a preliminary step, ensure that the board console port is connected to the PC using these RS232 parameters: * 115200bps * 8N1 b. Confirm that the PC is connected to the board using one of the Ethernet ports. c. Set a static ip 192.168.99.8 for Ethernet that connects to board. d. The PC must have a TFTP server launched and listening on the interface to which the board is connected. e. At this stage power up the board and, after a few seconds, press 4 and then any key during the countdown. U-BOOT> set serverip 192.168.99.9 && tftpboot 0x84000000 192.168.99.8:openwrt.itb && bootm Signed-off-by: Steven Lin <steven.lin@senao.com> [copied 4.19 dts to 5.4] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
209 lines
7.1 KiB
Bash
209 lines
7.1 KiB
Bash
#!/bin/sh
|
|
|
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
|
|
|
. /lib/functions/caldata.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$FIRMWARE" in
|
|
"ath10k/cal-pci-0000:01:00.0.bin")
|
|
case "$board" in
|
|
meraki,mr33)
|
|
caldata_extract_ubi "ART" 0x9000 0x844
|
|
caldata_valid "4408" || caldata_extract "ART" 0x9000 0x844
|
|
ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +1)
|
|
;;
|
|
esac
|
|
;;
|
|
"ath10k/pre-cal-pci-0000:01:00.0.bin")
|
|
case "$board" in
|
|
asus,map-ac2200)
|
|
caldata_extract_ubi "Factory" 0x9000 0x2f20
|
|
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
|
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
|
;;
|
|
avm,fritzrepeater-3000)
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1")
|
|
;;
|
|
engenius,eap2200 |\
|
|
openmesh,a62)
|
|
caldata_extract "0:ART" 0x9000 0x2f20
|
|
;;
|
|
linksys,ea8300)
|
|
caldata_extract "ART" 0x9000 0x2f20
|
|
# OEM assigns 4 sequential MACs
|
|
ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
|
|
;;
|
|
esac
|
|
;;
|
|
"ath10k/pre-cal-ahb-a000000.wifi.bin")
|
|
case "$board" in
|
|
8dev,jalapeno |\
|
|
alfa-network,ap120c-ac |\
|
|
cilab,meshpoint-one |\
|
|
ezviz,cs-w3-wd1200g-eup |\
|
|
glinet,gl-b1300 |\
|
|
linksys,ea6350v3 |\
|
|
qcom,ap-dk01.1-c1)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
;;
|
|
aruba,ap-303 |\
|
|
aruba,ap-303h)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_binary mfginfo 0x1D)
|
|
;;
|
|
asus,map-ac2200)
|
|
caldata_extract_ubi "Factory" 0x1000 0x2f20
|
|
;;
|
|
asus,rt-ac58u)
|
|
CI_UBIPART=UBI_DEV
|
|
caldata_extract_ubi "Factory" 0x1000 0x2f20
|
|
;;
|
|
avm,fritzbox-4040)
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config")
|
|
;;
|
|
avm,fritzbox-7530 |\
|
|
avm,fritzrepeater-1200 |\
|
|
avm,fritzrepeater-3000)
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1")
|
|
;;
|
|
compex,wpj419 |\
|
|
compex,wpj428 |\
|
|
engenius,eap1300 |\
|
|
engenius,eap2200 |\
|
|
openmesh,a42 |\
|
|
openmesh,a62 |\
|
|
qxwlan,e2600ac-c1 |\
|
|
qxwlan,e2600ac-c2 |\
|
|
unielec,u4019-32m)
|
|
caldata_extract "0:ART" 0x1000 0x2f20
|
|
;;
|
|
dlink,dap-2610)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac)
|
|
;;
|
|
engenius,emd1)
|
|
caldata_extract "0:ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr)
|
|
;;
|
|
engenius,ens620ext)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2)
|
|
;;
|
|
linksys,ea8300)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
|
|
;;
|
|
meraki,mr33)
|
|
caldata_extract_ubi "ART" 0x1000 0x2f20
|
|
caldata_valid "202f" || caldata_extract "ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +2)
|
|
;;
|
|
netgear,ex6100v2 |\
|
|
netgear,ex6150v2)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_binary dnidata 0x0)
|
|
;;
|
|
zyxel,nbg6617 |\
|
|
zyxel,wre6606)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2)
|
|
;;
|
|
esac
|
|
;;
|
|
"ath10k/pre-cal-ahb-a800000.wifi.bin")
|
|
case "$board" in
|
|
8dev,jalapeno |\
|
|
alfa-network,ap120c-ac |\
|
|
cilab,meshpoint-one |\
|
|
ezviz,cs-w3-wd1200g-eup |\
|
|
glinet,gl-b1300 |\
|
|
linksys,ea6350v3 |\
|
|
qcom,ap-dk01.1-c1)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
;;
|
|
aruba,ap-303 |\
|
|
aruba,ap-303h)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mfginfo 0x1D) +1)
|
|
;;
|
|
asus,map-ac2200)
|
|
caldata_extract_ubi "Factory" 0x5000 0x2f20
|
|
;;
|
|
asus,rt-ac58u)
|
|
CI_UBIPART=UBI_DEV
|
|
caldata_extract_ubi "Factory" 0x5000 0x2f20
|
|
;;
|
|
avm,fritzbox-4040)
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config")
|
|
;;
|
|
avm,fritzbox-7530 |\
|
|
avm,fritzrepeater-1200 |\
|
|
avm,fritzrepeater-3000)
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
|
|
/usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1")
|
|
;;
|
|
compex,wpj419 |\
|
|
compex,wpj428 |\
|
|
engenius,eap1300 |\
|
|
engenius,eap2200 |\
|
|
openmesh,a42 |\
|
|
openmesh,a62 |\
|
|
qxwlan,e2600ac-c1 |\
|
|
qxwlan,e2600ac-c2 |\
|
|
unielec,u4019-32m)
|
|
caldata_extract "0:ART" 0x5000 0x2f20
|
|
;;
|
|
dlink,dap-2610)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
|
|
;;
|
|
engenius,emd1)
|
|
caldata_extract "0:ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) +1)
|
|
;;
|
|
engenius,ens620ext)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +3)
|
|
;;
|
|
linksys,ea8300)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
|
|
;;
|
|
meraki,mr33)
|
|
caldata_extract_ubi "ART" 0x5000 0x2f20
|
|
caldata_valid "202f" || caldata_extract "ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +3)
|
|
;;
|
|
netgear,ex6100v2 |\
|
|
netgear,ex6150v2)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_binary dnidata 0xc)
|
|
;;
|
|
zyxel,nbg6617 |\
|
|
zyxel,wre6606)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1)
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|