From 51b9aef553a82cbc80c12e13a4011d4d2e29fde4 Mon Sep 17 00:00:00 2001 From: Joshua Roys Date: Thu, 30 Dec 2021 15:25:03 -0500 Subject: 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 (added ALT0) Signed-off-by: Christian Lamparter --- target/linux/ipq40xx/image/generic.mk | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'target/linux/ipq40xx/image') diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index 332fff7f45..43ea5b801a 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -57,6 +57,10 @@ define Build/append-rutx-metadata }' | fwtool -I - $@ endef +define Build/copy-file + cat "$(1)" > "$@" +endef + define Build/mkmylofw_32m $(eval device_id=$(word 1,$(1))) $(eval revision=$(word 2,$(1))) @@ -196,6 +200,34 @@ define Device/asus_map-ac2200 endef TARGET_DEVICES += asus_map-ac2200 +# WARNING: this is an initramfs image that gets you half of the way there +# you need to delete the jffs2 ubi volume and sysupgrade to the final image +# to get a "trx" you can flash via web UI for ac42u/ac58u: +# - change call Device/FitImageLzma to Device/FitImage +# - add the following below UIMAGE_NAME +# UIMAGE_MAGIC := 0x27051956 +# IMAGES += factory.trx +# IMAGE/factory.trx := copy-file $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) | uImage none +define Device/asus_rt-ac42u + $(call Device/FitImageLzma) + DEVICE_VENDOR := ASUS + DEVICE_MODEL := RT-AC42U + DEVICE_ALT0_VENDOR := ASUS + DEVICE_ALT0_MODEL := RT-ACRH17 + SOC := qcom-ipq4019 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DTB_SIZE := 65536 + IMAGE_SIZE := 20439364 + FILESYSTEMS := squashfs +# RT-AC82U is nowhere to be found online +# Rather, this device is a/k/a RT-AC42U +# But we'll go with what the vendor firmware has... + UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC82U') + DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-asus_rt-ac42u kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += asus_rt-ac42u + define Device/asus_rt-ac58u $(call Device/FitImageLzma) DEVICE_VENDOR := ASUS -- cgit v1.2.3