mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-06-15 11:43:54 +02:00
![Flole Systems](/assets/img/avatar_default.png)
Hardware
--------
SOC: MediaTek MT7986
RAM: 1024MB DDR3
FLASH: 128MB SPI-NAND (Winbond)
WIFI: Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz
ETH: Realtek RTL8221B-VB-CG 2.5 N-Base-T PHY with PoE
UART: 3V3 115200 8N1 (Pinout silkscreened / Do not connect VCC)
Installation
------------
1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
2. Connect the TFTP server to the WAX220. Conect to the serial console,
interrupt the autoboot process by pressing '0' when prompted.
3. Download & Boot the OpenWrt initramfs image.
$ setenv ipaddr 192.168.2.1
$ setenv serverip 192.168.2.2
$ tftpboot openwrt.bin
$ bootm
4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
using scp and install using sysupgrade.
$ sysupgrade -n <path-to-sysupgrade.bin>
Signed-off-by: Flole Systems <flole@flole.de>
Signed-off-by: Stefan Agner <stefan@agner.ch>
(cherry picked from commit 984786a2f7
)
100 lines
2.2 KiB
Plaintext
100 lines
2.2 KiB
Plaintext
|
|
. /lib/functions.sh
|
|
. /lib/functions/uci-defaults.sh
|
|
. /lib/functions/system.sh
|
|
|
|
mediatek_setup_interfaces()
|
|
{
|
|
local board="$1"
|
|
|
|
case $board in
|
|
asus,tuf-ax4200)
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1
|
|
;;
|
|
netgear,wax220)
|
|
ucidef_set_interface_lan "eth0"
|
|
;;
|
|
bananapi,bpi-r3)
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan"
|
|
;;
|
|
cudy,wr3000-v1)
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
|
|
;;
|
|
glinet,gl-mt3000)
|
|
ucidef_set_interfaces_lan_wan eth1 eth0
|
|
;;
|
|
mediatek,mt7986a-rfb)
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan6" "eth1 wan"
|
|
;;
|
|
mediatek,mt7986b-rfb)
|
|
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" eth1
|
|
;;
|
|
mediatek,mt7988a-dsa-10g-spim-snand)
|
|
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "eth1 eth2"
|
|
;;
|
|
qihoo,360t7)
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" wan
|
|
;;
|
|
tplink,tl-xdr4288|\
|
|
tplink,tl-xdr6088)
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" eth1
|
|
;;
|
|
tplink,tl-xdr6086)
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2" eth1
|
|
;;
|
|
xiaomi,redmi-router-ax6000-stock|\
|
|
xiaomi,redmi-router-ax6000-ubootmod)
|
|
ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" wan
|
|
;;
|
|
*)
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
|
|
;;
|
|
esac
|
|
}
|
|
|
|
mediatek_setup_macs()
|
|
{
|
|
local board="$1"
|
|
local lan_mac=""
|
|
local wan_mac=""
|
|
local label_mac=""
|
|
|
|
case $board in
|
|
asus,tuf-ax4200)
|
|
CI_UBIPART="UBI_DEV"
|
|
addr=$(mtd_get_mac_binary_ubi "Factory" 0x4)
|
|
wan_mac="${addr}"
|
|
lan_mac="${addr}"
|
|
;;
|
|
bananapi,bpi-r3)
|
|
wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1)
|
|
;;
|
|
netgear,wax220)
|
|
lan_mac=$(mtd_get_mac_ascii u-boot-env mac)
|
|
label_mac=$lan_mac
|
|
;;
|
|
qihoo,360t7)
|
|
lan_mac=$(mtd_get_mac_ascii factory lanMac)
|
|
wan_mac=$(macaddr_add "$lan_mac" 1)
|
|
label_mac=$wan_mac
|
|
;;
|
|
xiaomi,redmi-router-ax6000-stock|\
|
|
xiaomi,redmi-router-ax6000-ubootmod)
|
|
wan_mac=$(mtd_get_mac_ascii Bdata ethaddr_wan)
|
|
label_mac=$wan_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)
|
|
mediatek_setup_interfaces $board
|
|
mediatek_setup_macs $board
|
|
board_config_flush
|
|
|
|
exit 0
|