mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
affe633be4
This device contains 2 flash devices. One NOR (32M) and one NAND (128M). U-boot and caldata are on the NOR, the firmware on the NAND. SoC: IPQ4019 CPU: 4x 710MHz ARMv7 RAM: 256MB FLASH: NOR:32MB NAND:128MB ETH: 2x GMAC Gigabit POE: 802.3 af/at POE, IEEE802.3af/IEEE802.3at(48-56V) WIFI: 1x 2.4Ghz Atheros qca4019 2x2 MU-MIMO 1x 5.0Ghz Atheros qca4019 2x2 MU-MIMO USB: 1x 3.0 PCI: 1x Mini PCIe SIM: 1x Slot SD: 1x MicroSD slot BTN: Reset LED: - Power - Ethernet UART: 1x Serial Port 4 Pin Connector (UART) 1x Serial Port 6 Pin Connector (High Speed UART) POWER: 12V 2A Installation ------------ Initial flashing can only be done via u-boot using the following commands: tftpboot openwrt-ipq40xx-generic-compex_wpj419-squashfs-nand-factory.ubi nand erase.chip; nand write ${fileaddr} 0x0 ${filesize} res Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
176 lines
6.2 KiB
Bash
176 lines
6.2 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")
|
|
;;
|
|
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))
|
|
;;
|
|
openmesh,a62)
|
|
caldata_extract "0:ART" 0x9000 0x2f20
|
|
;;
|
|
esac
|
|
;;
|
|
"ath10k/pre-cal-ahb-a000000.wifi.bin")
|
|
case "$board" in
|
|
8dev,jalapeno |\
|
|
alfa-network,ap120c-ac |\
|
|
glinet,gl-b1300 |\
|
|
linksys,ea6350v3 |\
|
|
qcom,ap-dk01.1-c1)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
;;
|
|
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 |\
|
|
openmesh,a42 |\
|
|
openmesh,a62 |\
|
|
qxwlan,e2600ac-c1 |\
|
|
qxwlan,e2600ac-c2 |\
|
|
unielec,u4019-32m)
|
|
caldata_extract "0:ART" 0x1000 0x2f20
|
|
;;
|
|
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 |\
|
|
glinet,gl-b1300 |\
|
|
linksys,ea6350v3 |\
|
|
qcom,ap-dk01.1-c1)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
;;
|
|
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 |\
|
|
openmesh,a42 |\
|
|
openmesh,a62 |\
|
|
qxwlan,e2600ac-c1 |\
|
|
qxwlan,e2600ac-c2 |\
|
|
unielec,u4019-32m)
|
|
caldata_extract "0:ART" 0x5000 0x2f20
|
|
;;
|
|
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
|