forked from Ivasoft/openwrt
Hardware specs:
SoC: Qualcomm IPQ8065 (dual core Cortex-A15)
RAM: 512 MB DDR3
Flash: 256 MB NAND, 32 MB NOR
WiFi: QCA9983 2.4 GHz, QCA9984 5 GHz
Switch: QCA8337
Ethernet: 5x 10/100/1000 Mbit/s
USB: 1x USB 3.0 Type-A
Buttons: WPS, Reset
Power: 12 VDC, 2.5 A
Ethernet ports:
1x WAN: connected to eth2
4x LAN: connected via the switch to eth0 and eth1
(eth0 is disabled in OEM firmware)
MAC addresses (OEM and OpenWrt):
fw_env @ 0x00 d4:ab:82:??:??:?a LAN (eth1)
fw_env @ 0x06 d4:ab:82:??:??:?b WAN (eth2)
fw_env @ 0x0c d4:ab:82:??:??:?c WLAN 2.4 GHz (ath1)
fw_env @ 0x12 d4:ab:82:??:??:?d WLAN 5 GHz (ath0)
fw_env @ 0x18 d4:ab:82:??:??:?e OEM usage unknown (eth0 in OpenWrt)
OID d4:ab:82 is registered to:
ARRIS Group, Inc., 6450 Sequence Drive, San Diego CA 92121, US
More info:
https://openwrt.org/inbox/toh/arris/tr4400_v2
IMPORTANT:
This port requires moving the 'fw_env' partition prior to first boot to
consolidate 70% of the usable space in flash into a contiguous partition.
'fw_env' contains factory-programmed MAC addresses, SSIDs, and passwords.
Its contents must be copied to 'rootfs_1' prior to booting via initramfs.
Note that the stock 'fw_env' partition will be wiped during sysupgrade.
A writable 'stock_fw_env' partition pointing to the old, stock location
is included in the port to help rolling back this change if desired.
Installation:
- Requires serial access and a TFTP server.
- Fully boot stock, press ENTER, type in:
mtd erase /dev/mtd21
dd if=/dev/mtd22 bs=128K count=1 | mtd write - /dev/mtd21
umount /config && ubidetach -m 23 && mtd erase /dev/mtd23
- Reboot and interrupt U-Boot by pressing a key, type in:
set mtdids 'nand0=nand0'
set mtdparts 'mtdparts=nand0:155M@0x6500000(mtd_ubi)'
set bootcmd 'ubi part mtd_ubi && ubi read 0x44000000 kernel && bootm'
env save
- Setup TFTP server serving initramfs image as 'recovery.bin', type in:
set ipaddr 192.168.1.1
set serverip 192.168.1.2
tftpboot recovery.bin && bootm
- Use sysupgrade to install squashfs image.
This port is based on work done by AmadeusGhost <amadeus@jmu.edu.cn>.
Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
[add 5.15 changes for 0069-arm-boot-add-dts-files.patch]
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
100 lines
2.6 KiB
Plaintext
100 lines
2.6 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
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
arris,tr4400-v2)
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth2"
|
|
ucidef_add_switch "switch0" \
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "6u@eth1" "0u@eth0"
|
|
;;
|
|
askey,rt4230w-rev6 |\
|
|
asrock,g10 |\
|
|
nec,wg2600hp)
|
|
ucidef_add_switch "switch0" \
|
|
"2:lan" "3:lan" "4:lan" "5:lan" "6@eth1" "1:wan" "0@eth0"
|
|
;;
|
|
buffalo,wxr-2533dhp |\
|
|
compex,wpq864 |\
|
|
netgear,d7800 |\
|
|
netgear,r7500 |\
|
|
netgear,r7500v2 |\
|
|
qcom,ipq8064-ap148 |\
|
|
tplink,vr2600v)
|
|
ucidef_add_switch "switch0" \
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
|
|
;;
|
|
edgecore,ecw5410)
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
|
;;
|
|
linksys,ea7500-v1)
|
|
hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
|
ucidef_add_switch "switch0" \
|
|
"2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6@eth1" "1:wan" "0@eth0"
|
|
ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
|
|
ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
|
|
;;
|
|
linksys,ea8500)
|
|
hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
|
ucidef_add_switch "switch0" \
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
|
|
ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
|
|
ucidef_set_interface_macaddr "wan" "$hw_mac_addr"
|
|
;;
|
|
meraki,mr42)
|
|
ucidef_set_interface_lan "eth0"
|
|
;;
|
|
meraki,mr52)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
;;
|
|
nec,wg2600hp3)
|
|
ucidef_add_switch "switch0" \
|
|
"2:lan" "3:lan" "4:lan" "5:lan" "0@eth1" "1:wan" "6@eth0"
|
|
;;
|
|
netgear,r7800 |\
|
|
netgear,xr500 |\
|
|
tplink,c2600)
|
|
ucidef_add_switch "switch0" \
|
|
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "6@eth1" "5:wan" "0@eth0"
|
|
;;
|
|
qcom,ipq8064-ap161)
|
|
ucidef_set_interface_lan "eth1 eth2"
|
|
ucidef_add_switch "switch0" \
|
|
"0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0"
|
|
;;
|
|
qcom,ipq8064-db149)
|
|
ucidef_set_interface_lan "eth1 eth2 eth3"
|
|
ucidef_add_switch "switch0" \
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "6u@eth1" "5:wan" "0u@eth0"
|
|
;;
|
|
tplink,ad7200)
|
|
ucidef_add_switch "switch0" \
|
|
"2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6@eth1" "1:wan" "0@eth0"
|
|
;;
|
|
ubnt,unifi-ac-hd)
|
|
ucidef_set_interface_lan "eth0 eth1"
|
|
;;
|
|
zyxel,nbg6817)
|
|
hw_mac_addr=$(mtd_get_mac_ascii 0:appsblenv ethaddr)
|
|
ucidef_add_switch "switch0" \
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
|
|
ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 2)"
|
|
ucidef_set_interface_macaddr "wan" "$(macaddr_add $hw_mac_addr 3)"
|
|
;;
|
|
*)
|
|
echo "Unsupported hardware. Network interfaces not intialized"
|
|
;;
|
|
esac
|
|
|
|
board_config_flush
|
|
|
|
exit 0
|