mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
d8e6c3f6d9
WHQX E1700AC v2 is based on Qualcomm QCA9563 + QCA9880 + QCA8334. Specification: - 750/400/250 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 3T3R 2.4 GHz (QCA9563) with external FEM (SKY85309-11) - 3T3R 5 GHz (QCA9880) with external FEM (SKY85728-11) - 2x 10/100/1000 Mbps Ethernet (one port with PoE support) - 1x miniPCIe slot (USB 2.0 bus only) - 1x microSIM slot - 1x USB 2.0 - 5x LED (4 driven by GPIO) - 1x button (reset) - 1x 2-pos switch - 1x DC jack for main power input (9-48 V) - UART (J5) and LEDs (J13) headers on PCB WHQX E600G is based on Qualcomm QCA9531. Specification: - 650/391/216 MHz (CPU/DDR/AHB) - 64/128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 2.4 GHz (QCA9531) with external PA (LXK-6601) - 2x 10/100 Mbps Ethernet (one port with PoE support) - 1x miniPCIe slot (with PCIe and USB 2.0 buses) - 1x microSIM slot - 5x LED (4 driven by GPIO) - 1x button (reset) - 1x DC jack for main power input (9-48 V) - UART (J100), SIM (J34), JTAG (J5) and LEDs (J7) headers on PCB WHQX E600GAC is based on Qualcomm QCA9531 + QCA9887. Specification: - 650/391/216 MHz (CPU/DDR/AHB) - 64/128 MB of RAM (DDR2) - 8/16 MB of FLASH (SPI NOR) - 2T2R 2.4 GHz (QCA9531) - 1T1R 5 GHz (QCA9887) with external FEM (SKY85703-11) - 2x 10/100 Mbps Ethernet - 6x LED (1x RGB, 5 driven by GPIO) - 1x button (reset) - 1x DC jack for main power input (9-12 V) - UART (J100), USB (J102), JTAG (J5) and LEDs (J7) header on PCB Important notice: First version of these boards are using different mtd layout, with ART data at the end. You should not use v2 images on v1 board because it will result in lost of ART data! Flash instruction (using U-Boot CLI and tftp server): 1. Configure PC with static IP 192.168.1.10 and tftp server. 2. Rename "sysupgrade" filename to "firmware.bin" and place it in tftp server directory. 3. Connect PC with one of RJ45 ports, power up the board and press "enter" key to access U-Boot CLI. 4. Use the following command to update the device to OpenWrt: "run lfw". Flash instruction (using U-Boot web-based recovery): 1. Configure PC with static IP 192.168.1.xxx(2-254)/24. 2. Connect PC with one of RJ45 ports, press the reset button, power up the board and keep button pressed for around 6-7 seconds, until LEDs start flashing. 3. Open your browser and enter 192.168.1.1, select "sysupgrade" image and click the upgrade button. Signed-off-by: Peng Zhang <sd20@qxwlan.com> [reworked: image generation code, mach-* files, commit description, fixed minor code style issues, rebased on master] Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
169 lines
3.8 KiB
Bash
169 lines
3.8 KiB
Bash
#!/bin/sh
|
|
|
|
ath10kcal_die() {
|
|
echo "ath10cal: " "$*"
|
|
exit 1
|
|
}
|
|
|
|
ath10kcal_from_file() {
|
|
local source=$1
|
|
local offset=$2
|
|
local count=$3
|
|
|
|
dd if=$source of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
|
|
ath10kcal_die "failed to extract calibration data from $source"
|
|
}
|
|
|
|
ath10kcal_extract() {
|
|
local part=$1
|
|
local offset=$2
|
|
local count=$3
|
|
local mtd
|
|
|
|
mtd=$(find_mtd_chardev $part)
|
|
[ -n "$mtd" ] || \
|
|
ath10kcal_die "no mtd device found for partition $part"
|
|
|
|
dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
|
|
ath10kcal_die "failed to extract calibration data from $mtd"
|
|
}
|
|
|
|
ath10kcal_patch_mac() {
|
|
local mac=$1
|
|
|
|
[ -z "$mac" ] && return
|
|
|
|
macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=6 count=6
|
|
}
|
|
|
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
|
|
|
. /lib/functions.sh
|
|
. /lib/functions/system.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$FIRMWARE" in
|
|
"ath10k/cal-pci-0000:00:00.0.bin")
|
|
case $board in
|
|
a40|\
|
|
a60|\
|
|
mr1750|\
|
|
mr1750v2|\
|
|
om5p-acv2)
|
|
ath10kcal_extract "ART" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
|
|
;;
|
|
archer-c25-v1|\
|
|
tl-wdr6500-v2)
|
|
ath10kcal_extract "art" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2)
|
|
;;
|
|
archer-c7-v4)
|
|
ath10kcal_extract "art" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1)
|
|
;;
|
|
cf-e355ac|\
|
|
cf-e380ac-v1|\
|
|
cf-e380ac-v2|\
|
|
dlan-pro-1200-ac|\
|
|
e1700ac-v2|\
|
|
e600gac-v2|\
|
|
sr3200|\
|
|
xd3200)
|
|
ath10kcal_extract "art" 20480 2116
|
|
;;
|
|
dap-2695-a1)
|
|
ath10kcal_extract "radiocfg" 20480 2116
|
|
ath10kcal_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a)
|
|
;;
|
|
dir-869-a1|\
|
|
qihoo-c301)
|
|
ath10kcal_extract "radiocfg" 20480 2116
|
|
ath10kcal_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
|
|
;;
|
|
dw33d)
|
|
ath10kcal_extract "art" 20480 2116
|
|
ath10kcal_patch_mac $(mtd_get_mac_binary art 18)
|
|
;;
|
|
epg5000|\
|
|
esr1750)
|
|
ath10kcal_extract "caldata" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1)
|
|
;;
|
|
gl-ar750|\
|
|
tl-wpa8630)
|
|
ath10kcal_extract "art" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1)
|
|
;;
|
|
mc-mac1200r)
|
|
ath10kcal_extract "art" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1)
|
|
;;
|
|
r6100)
|
|
ath10kcal_extract "caldata" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) +2)
|
|
;;
|
|
rb-952ui-5ac2nd|\
|
|
rb-wapg-5hact2hnd)
|
|
ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116
|
|
;;
|
|
re355|\
|
|
re450|\
|
|
tl-wr902ac-v1)
|
|
ath10kcal_extract "art" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -2)
|
|
;;
|
|
unifiac-lite|\
|
|
unifiac-pro)
|
|
ath10kcal_extract "EEPROM" 20480 2116
|
|
;;
|
|
wi2a-ac200i)
|
|
ath10kcal_extract "ART" 20480 2116
|
|
;;
|
|
esac
|
|
;;
|
|
"ath10k/cal-pci-0000:01:00.0.bin")
|
|
case $board in
|
|
archer-c5|\
|
|
archer-c7)
|
|
ath10kcal_extract "art" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2)
|
|
;;
|
|
nbg6616|\
|
|
nbg6716)
|
|
ath10kcal_extract "RFdata" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2)
|
|
;;
|
|
om5p-ac)
|
|
ath10kcal_extract "ART" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
|
|
;;
|
|
rb-911g-5hpacd|\
|
|
rb-921gs-5hpacd-r2|\
|
|
rb-962uigs-5hact2hnt)
|
|
ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116
|
|
;;
|
|
wlr8100)
|
|
ath10kcal_extract "art" 20480 2116
|
|
ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +1)
|
|
;;
|
|
esac
|
|
;;
|
|
"ath10k/pre-cal-pci-0000:00:00.0.bin")
|
|
case $board in
|
|
archer-c58-v1|\
|
|
archer-c59-v1|\
|
|
archer-c60-v1|\
|
|
cf-e375ac)
|
|
ath10kcal_extract "art" 20480 12064
|
|
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
|
|
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|