mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-06-14 03:03:52 +02:00
51b9aef553
SOC: IPQ4019 CPU: Quad-core ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d DRAM: 256 MB NAND: 128 MiB Macronix MX30LF1G18AC ETH: Qualcomm Atheros QCA8075 Gigabit Switch (4x LAN, 1x WAN) USB: 1x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC) WLAN1: Qualcomm Atheros QCA4019 2.4GHz 802.11bgn 2x2:2 WLAN2: Qualcomm Atheros QCA9984 5GHz 802.11nac 4x4:4 INPUT: 1x WPS, 1x Reset LEDS: Status, WIFI1, WIFI2, WAN (red & blue), 4x LAN This board is very similar to the RT-ACRH13/RT-AC58U. It must be flashed with an intermediary initramfs image, the jffs2 ubi volume deleted, and then finally a sysupgrade with the final image performed. Signed-off-by: Joshua Roys <roysjosh@gmail.com> (added ALT0) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
37 lines
1.1 KiB
Bash
37 lines
1.1 KiB
Bash
. /lib/functions.sh
|
|
|
|
preinit_set_mac_address() {
|
|
case $(board_name) in
|
|
asus,map-ac2200)
|
|
base_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
|
|
ip link set dev eth0 address $(macaddr_add "$base_mac" 1)
|
|
ip link set dev eth1 address $(macaddr_add "$base_mac" 3)
|
|
;;
|
|
asus,rt-ac42u)
|
|
ip link set dev eth0 address $(mtd_get_mac_binary_ubi Factory 0x1006)
|
|
ip link set dev eth1 address $(mtd_get_mac_binary_ubi Factory 0x9006)
|
|
;;
|
|
engenius,eap2200)
|
|
base_mac=$(cat /sys/class/net/eth0/address)
|
|
ip link set dev eth1 address $(macaddr_add "$base_mac" 1)
|
|
;;
|
|
linksys,ea8300|\
|
|
linksys,mr8300)
|
|
base_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
|
ip link set dev eth0 address "$base_mac"
|
|
ip link set dev eth1 address $(macaddr_add "$base_mac" 1)
|
|
;;
|
|
meraki,mr33)
|
|
mac_lan=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66)
|
|
[ -n "$mac_lan" ] && ip link set dev eth0 address "$mac_lan"
|
|
;;
|
|
zyxel,nbg6617)
|
|
base_mac=$(cat /sys/class/net/eth0/address)
|
|
ip link set dev eth0 address $(macaddr_add "$base_mac" 2)
|
|
ip link set dev eth1 address $(macaddr_add "$base_mac" 3)
|
|
;;
|
|
esac
|
|
}
|
|
|
|
boot_hook_add preinit_main preinit_set_mac_address
|