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"
|
|
|
|
;;
|
2019-02-12 16:19:51 +00:00
|
|
|
asus,map-ac2200|\
|
|
|
|
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|\
|
|
|
|
linksys,ea6350v3)
|
|
|
|
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-03-11 17:05:32 +00:00
|
|
|
avm,fritzrepeater-3000|\
|
2019-01-31 21:23:53 +00:00
|
|
|
compex,wpj428)
|
|
|
|
ucidef_set_interface_lan "eth0 eth1"
|
|
|
|
;;
|
|
|
|
engenius,eap1300|\
|
|
|
|
meraki,mr33|\
|
|
|
|
netgear,ex6100v2|\
|
|
|
|
netgear,ex6150v2|\
|
|
|
|
zyxel,wre6606)
|
|
|
|
ucidef_set_interface_lan "eth0"
|
|
|
|
;;
|
|
|
|
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-01-31 21:23:53 +00:00
|
|
|
*)
|
|
|
|
echo "Unsupported hardware. Network interfaces not initialized"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
ipq40xx_setup_macs()
|
|
|
|
{
|
|
|
|
local board="$1"
|
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
|
|
|
|
wan_mac=$(mtd_get_mac_binary_ubi Factory 20486)
|
|
|
|
lan_mac=$(mtd_get_mac_binary_ubi Factory 4102)
|
|
|
|
;;
|
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)
|
|
|
|
;;
|
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-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
|