aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/base-files
diff options
context:
space:
mode:
authorJoshua Roys <roysjosh@gmail.com>2021-12-30 15:25:03 -0500
committerChristian Lamparter <chunkeey@gmail.com>2022-01-15 17:21:01 +0100
commit51b9aef553a82cbc80c12e13a4011d4d2e29fde4 (patch)
tree89c9078c51faea93d1db4b13a12dcdf9707f2809 /target/linux/ipq40xx/base-files
parent74516f4357d281f093f0daac01c4c5c239acc443 (diff)
downloadupstream-51b9aef553a82cbc80c12e13a4011d4d2e29fde4.tar.gz
upstream-51b9aef553a82cbc80c12e13a4011d4d2e29fde4.tar.bz2
upstream-51b9aef553a82cbc80c12e13a4011d4d2e29fde4.zip
ipq40xx: add support for ASUS RT-ACRH17/RT-AC42U
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>
Diffstat (limited to 'target/linux/ipq40xx/base-files')
-rw-r--r--target/linux/ipq40xx/base-files/etc/board.d/01_leds6
-rw-r--r--target/linux/ipq40xx/base-files/etc/board.d/02_network2
-rw-r--r--target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata14
-rw-r--r--target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh4
-rw-r--r--target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh1
-rw-r--r--target/linux/ipq40xx/base-files/lib/upgrade/platform.sh4
6 files changed, 20 insertions, 11 deletions
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
index 16039c8c42..26acfb6037 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds
@@ -12,6 +12,12 @@ case "$board" in
alfa-network,ap120c-ac)
ucidef_set_led_netdev "wan" "WAN" "amber:wan" "eth1"
;;
+asus,rt-ac42u)
+ ucidef_set_led_switch "lan1" "LAN1" "blue:lan" "switch0" "0x02"
+ ucidef_set_led_switch "lan2" "LAN2" "blue:lan_1" "switch0" "0x04"
+ ucidef_set_led_switch "lan3" "LAN3" "blue:lan_2" "switch0" "0x08"
+ ucidef_set_led_switch "lan4" "LAN4" "blue:lan_3" "switch0" "0x10"
+ ;;
asus,rt-ac58u)
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x1e"
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index c37fc58b22..2b908c800f 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -50,6 +50,7 @@ ipq40xx_setup_interfaces()
openmesh,a62)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
+ asus,rt-ac42u|\
asus,rt-ac58u|\
mikrotik,hap-ac2|\
mikrotik,hap-ac3|\
@@ -153,7 +154,6 @@ ipq40xx_setup_macs()
label_mac=$(mtd_get_mac_binary "ART" 0x1006)
;;
asus,rt-ac58u)
- CI_UBIPART=UBI_DEV
wan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
label_mac=$wan_mac
diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index d368475ffc..12061eadf5 100644
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -26,6 +26,9 @@ case "$FIRMWARE" in
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
+ asus,rt-ac42u)
+ caldata_extract_ubi "Factory" 0x9000 0x2f20
+ ;;
avm,fritzrepeater-3000)
/usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
/usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader0") || \
@@ -81,11 +84,9 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x1000 0x2f20
ath10k_patch_mac $(mtd_get_mac_binary mfginfo 0x1D)
;;
- asus,map-ac2200)
- caldata_extract_ubi "Factory" 0x1000 0x2f20
- ;;
+ asus,map-ac2200 |\
+ asus,rt-ac42u |\
asus,rt-ac58u)
- CI_UBIPART=UBI_DEV
caldata_extract_ubi "Factory" 0x1000 0x2f20
;;
avm,fritzbox-4040)
@@ -203,11 +204,8 @@ case "$FIRMWARE" in
caldata_extract "ART" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mfginfo 0x1D) 1)
;;
- asus,map-ac2200)
- caldata_extract_ubi "Factory" 0x5000 0x2f20
- ;;
+ asus,map-ac2200 |\
asus,rt-ac58u)
- CI_UBIPART=UBI_DEV
caldata_extract_ubi "Factory" 0x5000 0x2f20
;;
avm,fritzbox-4040)
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
index d1fcd804d9..2609a55d27 100644
--- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
+++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
@@ -7,6 +7,10 @@ preinit_set_mac_address() {
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)
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
index e97133f105..18c13c602c 100644
--- a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
+++ b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh
@@ -3,6 +3,7 @@ set_preinit_iface() {
case $(board_name) in
aruba,ap-303| \
+ asus,rt-ac42u| \
asus,rt-ac58u| \
avm,fritzbox-4040| \
ezviz,cs-w3-wd1200g-eup| \
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index 357e02000a..b0493e10ba 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -6,8 +6,8 @@ RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock'
platform_check_image() {
case "$(board_name)" in
+ asus,rt-ac42u |\
asus,rt-ac58u)
- CI_UBIPART="UBI_DEV"
local ubidev=$(nand_find_ubi $CI_UBIPART)
local asus_root=$(nand_find_volume $ubidev jffs2)
@@ -117,8 +117,8 @@ platform_do_upgrade() {
CI_KERNPART="linux"
nand_do_upgrade "$1"
;;
+ asus,rt-ac42u |\
asus,rt-ac58u)
- CI_UBIPART="UBI_DEV"
CI_KERNPART="linux"
nand_do_upgrade "$1"
;;