2018-02-21 19:40:50 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (c) 2015 The Linux Foundation. All rights reserved.
|
|
|
|
# Copyright (c) 2011-2015 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
. /lib/functions/system.sh
|
|
|
|
|
2019-01-31 21:23:53 +00:00
|
|
|
ipq40xx_setup_interfaces()
|
|
|
|
{
|
|
|
|
local board="$1"
|
2018-02-21 19:40:50 +00:00
|
|
|
|
2019-01-31 21:23:53 +00:00
|
|
|
case "$board" in
|
2019-01-29 17:12:51 +00:00
|
|
|
8dev,jalapeno|\
|
2019-02-27 22:48:23 +00:00
|
|
|
alfa-network,ap120c-ac|\
|
|
|
|
engenius,ens620ext)
|
2019-01-31 21:23:53 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
|
|
;;
|
2020-01-11 23:36:42 +00:00
|
|
|
aruba,ap-303h)
|
|
|
|
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"
|
|
|
|
;;
|
2019-02-12 16:19:51 +00:00
|
|
|
asus,map-ac2200|\
|
2019-11-25 14:25:00 +00:00
|
|
|
cilab,meshpoint-one|\
|
2019-02-12 16:19:51 +00:00
|
|
|
openmesh,a42|\
|
|
|
|
openmesh,a62)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
|
|
|
;;
|
2019-01-31 21:23:53 +00:00
|
|
|
asus,rt-ac58u|\
|
2019-01-31 21:29:32 +00:00
|
|
|
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"
|
|
|
|
;;
|
2019-01-31 21:23:53 +00:00
|
|
|
avm,fritzbox-4040|\
|
ipq40xx: Add support for Linksys EA8300 (Dallas)
The Linksys EA8300 is based on QCA4019 and QCA9888 and provides three,
independent radios. NAND provides two, alternate kernel/firmware
images with fail-over provided by the OEM U-Boot.
Installation:
"Factory" images may be installed directly through the OEM GUI.
Hardware Highlights:
* IPQ4019 at 717 MHz (4 CPUs)
* 256 MB NAND (Winbond W29N02GV, 8-bit parallel)
* 256 MB RAM
* Three, fully-functional radios; `iw phy` reports (FCC/US, -CT):
* 2.4 GHz radio at 30 dBm
* 5 GHz radio on ch. 36-64 at 23 dBm
* 5 GHz radio on ch. 100-144 at 23 dBm (DFS), 149-165 at 30 dBm
#{ managed } <= 16, #{ AP, mesh point } <= 16, #{ IBSS } <= 1
* All two-stream, MCS 0-9
* 4x GigE LAN, 1x GigE Internet Ethernet jacks with port lights
* USB3, single port on rear with LED
* WPS and reset buttons
* Four status lights on top
* Serial pads internal (unpopulated)
"Linksys Dallas WiFi AP router based on Qualcomm AP DK07.1-c1"
Implementation Notes:
The OEM flash layout is preserved at this time with 3 MB kernel and
~69 MB UBIFS for each firmware version. The sysdiag (1 MB) and
syscfg (56 MB) partitions are untouched, available as read-only.
Serial Connectivity:
Serial connectivity is *not* required to flash.
Serial may be accessed by opening the device and connecting
a 3.3-V adapter using 115200, 8n1. U-Boot access is good,
including the ability to load images over TFTP and
either run or flash them.
Looking at the top of the board, from the front of the unit,
J3 can be found on the right edge of the board, near the rear
|
J3 |
|-| |
|O| | (3.3V seen, open-circuit)
|O| | TXD
|O| | RXD
|O| |
|O| | GND
|-| |
|
Unimplemented:
* serial1 "ttyQHS0" (serial0 works as console)
* Bluetooth; Qualcomm CSR8811 (potentially conected to serial1)
Other Notes:
https://wikidevi.com/wiki/Linksys_EA8300 states
FCC docs also cover the Linksys EA8250. According to the
RF Test Report BT BR+EDR, "All models are identical except
for the EA8300 supports 256QAM and the EA8250 disable 256QAM."
Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
2019-04-10 15:34:28 +00:00
|
|
|
linksys,ea6350v3|\
|
|
|
|
linksys,ea8300)
|
2019-01-31 21:23:53 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
|
|
|
;;
|
2019-02-18 22:58:34 +00:00
|
|
|
avm,fritzbox-7530)
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
|
|
|
;;
|
2019-10-23 20:25:14 +00:00
|
|
|
aruba,ap-303|\
|
2019-09-10 19:07:23 +00:00
|
|
|
avm,fritzrepeater-1200|\
|
2019-01-31 21:23:53 +00:00
|
|
|
engenius,eap1300|\
|
|
|
|
meraki,mr33|\
|
|
|
|
netgear,ex6100v2|\
|
|
|
|
netgear,ex6150v2|\
|
|
|
|
zyxel,wre6606)
|
|
|
|
ucidef_set_interface_lan "eth0"
|
|
|
|
;;
|
2019-09-10 19:07:23 +00:00
|
|
|
avm,fritzrepeater-3000|\
|
2019-11-01 11:27:13 +00:00
|
|
|
compex,wpj419|\
|
2019-09-10 19:07:23 +00:00
|
|
|
compex,wpj428)
|
|
|
|
ucidef_set_interface_lan "eth0 eth1"
|
|
|
|
;;
|
ipq40xx: add support for EZVIZ CS-W3-WD1200G EUP
Hardware:
SOC: Qualcomm IPQ4018
RAM: 128 MB Nanya NT5CC64M16GP-DI
FLASH: 16 MB Macronix MX25L12805D
ETH: Qualcomm QCA8075 (4 Gigabit ports, 3xLAN, 1xWAN)
WLAN: Qualcomm IPQ4018 (2.4 & 5 Ghz)
BUTTON: Shared WPS/Reset button
LED: RGB Status/Power LED
SERIAL: Header J8 (UART, Left side of board). Numbered from
top to bottom:
(1) GND, (2) TX, (3) RX, (4) VCC (White triangle
next to it).
3.3v, 115200, 8N1
Tested/Working:
* Ethernet
* WiFi (2.4 and 5GHz)
* Status LED
* Reset Button (See note below)
Implementation notes:
* The shared WPS/Reset button is implemented as a Reset button
* I could not find a original firmware image to reverse engineer, meaning
currently it's not possible to flash OpenWrt through the Web GUI.
Installation (Through Serial console & TFTP):
1. Set your PC to fixed IP 192.168.1.12, Netmask 255.255.255.0, and connect to
one of the LAN ports
2. Rename the initramfs image to 'C0A8010B.img' and enable a TFTP server on
your pc, to serve the image
2. Connect to the router through serial (See connection properties above)
3. Hit a key during startup, to pause startup
4. type `setenv serverip 192.168.1.12`, to set the tftp server address
5. type `tftpboot`, to load the image from the laptop through tftp
6. type `bootm` to run the loaded image from memory
6. (If you want to return to stock firmware later, create an full MTD backup,
e.g. using instructions here https://openwrt.org/docs/guide-user/installation/generic.backup#create_full_mtd_backup)
7. Transfer the 'sysupgrade' OpenWrt firmware image from PC to router, e.g.:
`scp xxx-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/upgrade.bin`
8. Run sysupgrade to permanently install OpenWrt to flash: `sysupgrade -n /tmp/upgrade.bin`
Revert to stock:
To revert to stock, you need the MTD backup from step 6 above:
1. Unpack the MTD backup archive
2. Transfer the 'firmware' partition image to the router (e.g. mtd8_firmware.backup)
3. On the router, do `mtd write mtd8_firmware.backup firmware`
Signed-off-by: Tom Brouwer <tombrouwer@outlook.com>
[removed BOARD_NAME, OpenWRT->OpenWrt, changed LED device name to board name]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2020-01-12 12:13:30 +00:00
|
|
|
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"
|
|
|
|
;;
|
2019-01-31 21:23:53 +00:00
|
|
|
glinet,gl-b1300)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
|
|
ucidef_add_switch "switch0" \
|
|
|
|
"0u@eth0" "3:lan" "4:lan"
|
|
|
|
;;
|
ipq40xx: add support for Qxwlan E2600AC C1 and C2
Qxwlan E2600AC C1 based on IPQ4019
Specifications:
SOC: Qualcomm IPQ4019
DRAM: 256 MiB
FLASH: 32 MiB Winbond W25Q256
ETH: Qualcomm QCA8075
WLAN: 5G + 5G/2.4G
* 2T2R 2.4/5 GHz
- QCA4019 hw1.0 (SoC)
* 2T2R 5 GHz
- QCA4019 hw1.0 (SoC)
INPUT: Reset buutton
LED: 1x Power ,6 driven by gpio
SERIAL: UART (J5)
UUSB: USB3.0
POWER: 1x DC jack for main power input (9-24 V)
SLOT: Pcie (J25), sim card (J11), SD card (J51)
Flash instruction (using U-Boot CLI and tftp server):
- Configure PC with static IP 192.168.1.10 and tftp server.
- Rename "sysupgrade" filename to "firmware.bin" and place it in tftp
server directory.
- Connect PC with one of RJ45 ports, power up the board and press
"enter" key to access U-Boot CLI.
- Use the following command to update the device to OpenWrt: "run lfw".
Flash instruction (using U-Boot web-based recovery):
- Configure PC with static IP 192.168.1.xxx(2-254)/24.
- 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.
- Open your browser and enter 192.168.1.1, select "sysupgrade" image
and click the upgrade button.
Qxwlan E2600AC C2 based on IPQ4019
Specifications:
SOC: Qualcomm IPQ4019
DRAM: 256 MiB
NOR: 16 MiB Winbond W25Q128
NAND: 128MiB Micron MT29F1G08ABAEAWP
ETH: Qualcomm QCA8075
WLAN: 5G + 5G/2.4G
* 2T2R 2.4/5 GHz
- QCA4019 hw1.0 (SoC)
* 2T2R 5 GHz
- QCA4019 hw1.0 (SoC)
INPUT: Reset buutton
LED: 1x Power, 6 driven by gpio
SERIAL: UART (J5)
USB: USB3.0
POWER: 1x DC jack for main power input (9-24 V)
SLOT: Pcie (J25), sim card (J11), SD card (J51)
Flash instruction (using U-Boot CLI and tftp server):
- Configure PC with static IP 192.168.1.10 and tftp server.
- Rename "ubi" filename to "ubi-firmware.bin" and place it in tftp
server directory.
- Connect PC with one of RJ45 ports, power up the board and press
"enter" key to access U-Boot CLI.
- Use the following command to update the device to OpenWrt: "run lfw".
Flash instruction (using U-Boot web-based recovery):
- Configure PC with static IP 192.168.1.xxx(2-254)/24.
- 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.
- Open your browser and enter 192.168.1.1, select "ubi" image
and click the upgrade button.
Signed-off-by: 张鹏 <sd20@qxwlan.com>
[ added rng node. whitespace fixes, ported 02_network,
ipq-wifi Makefile, misc dts fixes, trivial message changes ]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2019-01-21 05:28:32 +00:00
|
|
|
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"
|
|
|
|
;;
|
2019-10-20 09:33:13 +00:00
|
|
|
unielec,u4019-32m)
|
|
|
|
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"
|
|
|
|
;;
|
2019-01-31 21:23:53 +00:00
|
|
|
*)
|
|
|
|
echo "Unsupported hardware. Network interfaces not initialized"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
ipq40xx_setup_macs()
|
|
|
|
{
|
|
|
|
local board="$1"
|
2019-12-21 03:43:40 +00:00
|
|
|
local lan_mac=""
|
|
|
|
local wan_mac=""
|
|
|
|
local label_mac=""
|
2018-02-21 19:40:50 +00:00
|
|
|
|
2019-01-31 21:23:53 +00:00
|
|
|
case "$board" in
|
|
|
|
asus,rt-ac58u)
|
|
|
|
CI_UBIPART=UBI_DEV
|
2019-12-21 03:43:40 +00:00
|
|
|
wan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
|
|
|
|
lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
|
|
|
|
label_mac=$wan_mac
|
2019-01-31 21:23:53 +00:00
|
|
|
;;
|
2019-11-25 14:25:00 +00:00
|
|
|
cilab,meshpoint-one)
|
|
|
|
label_mac=$(mtd_get_mac_binary "ART" 0x1006)
|
|
|
|
;;
|
2019-02-27 22:48:23 +00:00
|
|
|
engenius,ens620ext)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
|
|
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
|
|
|
;;
|
ipq40xx: add support for EZVIZ CS-W3-WD1200G EUP
Hardware:
SOC: Qualcomm IPQ4018
RAM: 128 MB Nanya NT5CC64M16GP-DI
FLASH: 16 MB Macronix MX25L12805D
ETH: Qualcomm QCA8075 (4 Gigabit ports, 3xLAN, 1xWAN)
WLAN: Qualcomm IPQ4018 (2.4 & 5 Ghz)
BUTTON: Shared WPS/Reset button
LED: RGB Status/Power LED
SERIAL: Header J8 (UART, Left side of board). Numbered from
top to bottom:
(1) GND, (2) TX, (3) RX, (4) VCC (White triangle
next to it).
3.3v, 115200, 8N1
Tested/Working:
* Ethernet
* WiFi (2.4 and 5GHz)
* Status LED
* Reset Button (See note below)
Implementation notes:
* The shared WPS/Reset button is implemented as a Reset button
* I could not find a original firmware image to reverse engineer, meaning
currently it's not possible to flash OpenWrt through the Web GUI.
Installation (Through Serial console & TFTP):
1. Set your PC to fixed IP 192.168.1.12, Netmask 255.255.255.0, and connect to
one of the LAN ports
2. Rename the initramfs image to 'C0A8010B.img' and enable a TFTP server on
your pc, to serve the image
2. Connect to the router through serial (See connection properties above)
3. Hit a key during startup, to pause startup
4. type `setenv serverip 192.168.1.12`, to set the tftp server address
5. type `tftpboot`, to load the image from the laptop through tftp
6. type `bootm` to run the loaded image from memory
6. (If you want to return to stock firmware later, create an full MTD backup,
e.g. using instructions here https://openwrt.org/docs/guide-user/installation/generic.backup#create_full_mtd_backup)
7. Transfer the 'sysupgrade' OpenWrt firmware image from PC to router, e.g.:
`scp xxx-squashfs-sysupgrade.bin root@192.168.1.1:/tmp/upgrade.bin`
8. Run sysupgrade to permanently install OpenWrt to flash: `sysupgrade -n /tmp/upgrade.bin`
Revert to stock:
To revert to stock, you need the MTD backup from step 6 above:
1. Unpack the MTD backup archive
2. Transfer the 'firmware' partition image to the router (e.g. mtd8_firmware.backup)
3. On the router, do `mtd write mtd8_firmware.backup firmware`
Signed-off-by: Tom Brouwer <tombrouwer@outlook.com>
[removed BOARD_NAME, OpenWRT->OpenWrt, changed LED device name to board name]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2020-01-12 12:13:30 +00:00
|
|
|
ezviz,cs-w3-wd1200g-eup)
|
|
|
|
label_mac=$(mtd_get_mac_binary "ART" 0x6)
|
|
|
|
;;
|
2019-01-31 21:23:53 +00:00
|
|
|
linksys,ea6350v3)
|
|
|
|
wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
2019-02-14 00:13:07 +00:00
|
|
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
2019-01-31 21:23:53 +00:00
|
|
|
;;
|
|
|
|
esac
|
2018-02-21 19:40:50 +00:00
|
|
|
|
2019-03-09 17:08:55 +00:00
|
|
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
|
|
|
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
2019-11-25 14:25:00 +00:00
|
|
|
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
|
2019-01-31 21:23:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
|
|
ipq40xx_setup_interfaces $board
|
|
|
|
ipq40xx_setup_macs $board
|
2018-02-21 19:40:50 +00:00
|
|
|
board_config_flush
|
|
|
|
|
|
|
|
exit 0
|