forked from Ivasoft/openwrt
This patch adds support for Linksys WHW01 v1 ("Velop") [FCC ID Q87-03331].
Specification
-------------
SOC: Qualcomm IPQ4018
WiFi 1: Qualcomm QCA4019 IEEE 802.11b/g/n
WiFi 2: Qualcomm QCA4019 IEEE 802.11a/n/ac
Bluetooth: Qualcomm CSR8811 (A12U)
Ethernet: Qualcomm QCA8072 (2-port)
SPI Flash 1: Mactronix MX25L1605D (2MB)
SPI Flash 2: Winbond W25M02GV (256MB)
DRAM: Nanya NT5CC128M16IP-DI (256MB)
LED Controller: NXP PCA963x (I2C)
Buttons: Single reset button (GPIO).
Notes
-----
There does not appear to be a way to trigger TFTP recovery without entering
U-Boot. The device must be opened to access the serial console in order to
first flash OpenWrt onto a device from factory.
The device has automatic recovery backed by a second set of partitions on
the larger of the two SPI flash ICs. Both the primary and secondary must
be flashed to prevent accidental rollback to "factory" after 3 failed boot
attempts.
Serial console
--------------
A serial console is available on the following pins of the populated J2
connector on the device mainboard (115200 8n1).
(<-- Top of PCB / Device)
J2
[o o o o o o]
| | |
| | `-- GND
| `---- TX
`--------- RX
Installation instructions
-------------------------
1. Setup TFTP server with server IP set to 192.168.1.236.
2. Copy compiled `...squashfs-factory.bin` to `nodes-jr.img` in tftp root.
3. Connect to console using pinout detailed in the serial console section.
4. Power on device and press enter when prompted to drop into U-Boot.
5. Flash first partition device via `run flashimg`.
6. Once complete, reset device and allow to power up completely.
7. Once comfortable with device upgrade reboot and drop back into U-Boot.
8. Flash the second partition (recovery) via `run flashimg2`.
Revert to "factory"
-------------------
1. Download latest firmware update from vendor support site.
2. Copy extracted `.img` file to `nodes-jr.img` in tftp root.
3. Connect to console using pinout detailed in the serial console section.
4. Power on device and press enter when prompted to drop into U-Boot.
5. Flash first partition device via `run flashimg`.
6. Once complete, reset device and allow to power up completely.
7. Once comfortable with device upgrade reboot and drop back into U-Boot.
8. Flash the second partition (recovery) via `run flashimg2`.
Link: https://github.com/openwrt/openwrt/pull/3682
Signed-off-by: Peter Adkins <peter@sunkenlab.com>
(calibration from nvmem, updated to 5.10+5.15)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
235 lines
5.5 KiB
Plaintext
235 lines
5.5 KiB
Plaintext
#
|
|
# Copyright (c) 2015 The Linux Foundation. All rights reserved.
|
|
# Copyright (c) 2011-2015 OpenWrt.org
|
|
#
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
. /lib/functions/system.sh
|
|
|
|
ipq40xx_setup_interfaces()
|
|
{
|
|
local board="$1"
|
|
|
|
case "$board" in
|
|
8dev,habanero-dvk|\
|
|
8dev,jalapeno|\
|
|
alfa-network,ap120c-ac|\
|
|
engenius,emr3500|\
|
|
engenius,ens620ext|\
|
|
luma,wrtq-329acn|\
|
|
netgear,wac510|\
|
|
plasmacloud,pa1200|\
|
|
plasmacloud,pa2200)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
;;
|
|
aruba,ap-303|\
|
|
aruba,ap-365|\
|
|
avm,fritzrepeater-1200|\
|
|
dlink,dap-2610 |\
|
|
engenius,eap1300|\
|
|
engenius,emd1|\
|
|
meraki,mr33|\
|
|
mikrotik,lhgg-60ad|\
|
|
mikrotik,sxtsq-5-ac|\
|
|
netgear,ex6100v2|\
|
|
netgear,ex6150v2|\
|
|
zyxel,wre6606)
|
|
ucidef_set_interface_lan "eth0"
|
|
;;
|
|
aruba,ap-303h|\
|
|
teltonika,rutx10)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "0u@eth1" "5:wan"
|
|
;;
|
|
asus,map-ac2200|\
|
|
cilab,meshpoint-one|\
|
|
edgecore,ecw5211|\
|
|
edgecore,oap100|\
|
|
google,wifi|\
|
|
openmesh,a42|\
|
|
openmesh,a62)
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
|
;;
|
|
mikrotik,cap-ac)
|
|
ucidef_add_switch "switch0" \
|
|
"0t@eth0" "4:lan" "5:wan"
|
|
;;
|
|
asus,rt-ac42u|\
|
|
asus,rt-ac58u|\
|
|
mikrotik,hap-ac2|\
|
|
mikrotik,hap-ac3|\
|
|
p2w,r619ac-64m|\
|
|
p2w,r619ac-128m|\
|
|
zyxel,nbg6617)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
|
|
;;
|
|
avm,fritzbox-4040|\
|
|
linksys,ea6350v3|\
|
|
linksys,ea8300)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
|
;;
|
|
linksys,mr8300)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan"
|
|
;;
|
|
avm,fritzbox-7530)
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
|
|
;;
|
|
avm,fritzrepeater-3000|\
|
|
linksys,whw01-v1)
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "4:lan:1" "5:lan:2"
|
|
;;
|
|
compex,wpj419|\
|
|
compex,wpj428|\
|
|
engenius,eap2200)
|
|
ucidef_set_interface_lan "eth0 eth1"
|
|
;;
|
|
buffalo,wtr-m2133hp)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
|
|
;;
|
|
cellc,rtl30vw)
|
|
ucidef_set_interface_lan "eth0"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "3:lan" "4:lan"
|
|
;;
|
|
devolo,magic-2-wifi-next)
|
|
ucidef_set_interface_lan "eth0 eth1 eth2"
|
|
;;
|
|
ezviz,cs-w3-wd1200g-eup)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "2:lan:3" "3:lan:2" "4:lan:1" "0u@eth1" "5:wan"
|
|
;;
|
|
glinet,gl-ap1300 |\
|
|
glinet,gl-b1300 |\
|
|
glinet,gl-s1300)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "3:lan" "4:lan"
|
|
;;
|
|
glinet,gl-b2200)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "1:lan" "2:lan" "3:lan" "5:lan" "0u@eth1" "4:wan"
|
|
;;
|
|
mobipromo,cm520-79f)
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "3:lan:2" "4:lan:1"
|
|
ucidef_set_interface_wan "eth1"
|
|
;;
|
|
netgear,rbr50|\
|
|
netgear,rbs50|\
|
|
netgear,srr60|\
|
|
netgear,srs60)
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "2:lan" "3:lan" "4:lan"
|
|
ucidef_set_interface_wan "eth1"
|
|
;;
|
|
qxwlan,e2600ac-c1 |\
|
|
qxwlan,e2600ac-c2)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan"
|
|
;;
|
|
unielec,u4019-32m |\
|
|
tel,x1pro)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "0u@eth1" "5:wan"
|
|
;;
|
|
zte,mf286d)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
ucidef_add_switch "switch0" \
|
|
"0u@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "0u@eth1" "5:wan"
|
|
;;
|
|
*)
|
|
echo "Unsupported hardware. Network interfaces not initialized"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
ipq40xx_setup_macs()
|
|
{
|
|
local board="$1"
|
|
local lan_mac=""
|
|
local wan_mac=""
|
|
local label_mac=""
|
|
|
|
case "$board" in
|
|
8dev,habanero-dvk)
|
|
label_mac=$(mtd_get_mac_binary "ART" 0x1006)
|
|
;;
|
|
asus,rt-ac58u)
|
|
wan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
|
|
lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
|
|
label_mac=$wan_mac
|
|
;;
|
|
cilab,meshpoint-one)
|
|
label_mac=$(mtd_get_mac_binary "ART" 0x1006)
|
|
;;
|
|
devolo,magic-2-wifi-next)
|
|
lan_mac=$(mtd_get_mac_ascii APPSBLENV MacAddress0)
|
|
label_mac=$lan_mac
|
|
;;
|
|
dlink,dap-2610)
|
|
lan_mac=$(mtd_get_mac_ascii bdcfg lanmac)
|
|
label_mac=$lan_mac
|
|
;;
|
|
engenius,eap2200|\
|
|
engenius,emd1)
|
|
lan_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr)
|
|
label_mac=$lan_mac
|
|
;;
|
|
engenius,emr3500)
|
|
wan_mac=$(mtd_get_mac_ascii 0:APPSBLENV wanaddr)
|
|
lan_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr)
|
|
label_mac=$wan_mac
|
|
;;
|
|
engenius,ens620ext)
|
|
wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
|
;;
|
|
ezviz,cs-w3-wd1200g-eup)
|
|
label_mac=$(mtd_get_mac_binary "ART" 0x6)
|
|
;;
|
|
linksys,ea6350v3)
|
|
wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
|
;;
|
|
mikrotik,cap-ac |\
|
|
mikrotik,hap-ac2|\
|
|
mikrotik,hap-ac3)
|
|
wan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base)
|
|
lan_mac=$(macaddr_add $wan_mac 1)
|
|
label_mac="$wan_mac"
|
|
;;
|
|
mikrotik,lhgg-60ad|\
|
|
mikrotik,sxtsq-5-ac)
|
|
lan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base)
|
|
label_mac="$lan_mac"
|
|
;;
|
|
esac
|
|
|
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
|
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
|
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
|
|
}
|
|
|
|
board_config_update
|
|
board=$(board_name)
|
|
ipq40xx_setup_interfaces $board
|
|
ipq40xx_setup_macs $board
|
|
board_config_flush
|
|
|
|
exit 0
|