[PATCH v2] bcm53xx: add support for Asus RT-AC88U

Rafał Miłecki rafal at milecki.pl
Tue Mar 29 06:29:49 PDT 2022


On 12.11.2021 11:56, Arınç ÜNAL wrote:
> Asus RT-AC88U is an AC3100 router featuring 9 Ethernet ports over the
> integrated Broadcom and the external Realtek switch.
> 
> Hardware info:
> * Processor: Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
> * Switch: BCM53012 in BCM4709C0KFEBG & external RTL8365MB
> * DDR3 RAM: 512 MB
> * Flash: 128 MB (ESMT F59L1G81LA-25T)
> * 2.4GHz: BCM4366 4×4 2.4/5G single chip 802.11ac SoC
> * 5GHz: BCM4366 4×4 2.4/5G single chip 802.11ac SoC
> * Ports: 8 Ports, 1 WAN Ports
> 
> Flashing instructions:
> * Boot to CFE Recovery Mode by holding the reset button while power-on.
> * Connect to the router with an ethernet cable.
> * Set IPv4 address of the computer to 192.168.1.2 subnet 255.255.255.0.
> * Head to http://192.168.1.1.
> * Reset NVRAM.
> * Upload the OpenWrt image.
> 
> CFE bootloader may reject flashing the image due to image integrity check.
> In that case, follow the instructions below.
> 
> * Rename the OpenWrt image as firmware.trx.
> * Run a TFTP server and make it serve the firmware.trx file.
> * Run the URL below on a browser or curl.
>    http://192.168.1.1/do.htm?cmd=flash+-noheader+192.168.1.2:firmware.trx+flash0.trx
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>

Sorry for a late reply, ynezz pinged me on IRC on it recently, I'm going
to take what seems clear to me.


>   target/linux/bcm53xx/base-files/etc/board.d/01_leds |  6 ++++++
>   .../linux/bcm53xx/base-files/etc/board.d/02_network |  3 +++
>   .../bcm53xx/base-files/etc/init.d/set_nvram_vars    | 13 +++++++++++++
>   target/linux/bcm53xx/image/Makefile                 |  8 ++++++++
>   4 files changed, 30 insertions(+)
>   create mode 100755 target/linux/bcm53xx/base-files/etc/init.d/set_nvram_vars
> 
> diff --git a/target/linux/bcm53xx/base-files/etc/board.d/01_leds b/target/linux/bcm53xx/base-files/etc/board.d/01_leds
> index aba526b9c3..f37fa79d4f 100644
> --- a/target/linux/bcm53xx/base-files/etc/board.d/01_leds
> +++ b/target/linux/bcm53xx/base-files/etc/board.d/01_leds
> @@ -8,6 +8,12 @@ netgear,r8000)
>   	ucidef_set_led_usbport "usb2" "USB 2.0" "bcm53xx:white:usb2" "usb1-port2" "usb2-port2"
>   	ucidef_set_led_usbport "usb3" "USB 3.0" "bcm53xx:white:usb3" "usb1-port1" "usb2-port1" "usb4-port1"
>   	;;
> +asus,rt-ac88u)
> +	ucidef_set_led_default "power" "Power" "white:power" "1"
> +	ucidef_set_led_netdev "lan" "LAN" "white:lan" "eth1"
> +	ucidef_set_led_usbport "usb2" "USB 2.0" "white:usb2" "usb1-port2"
> +	ucidef_set_led_usbport "usb3" "USB 3.0" "white:usb3" "usb1-port1" "usb4-port1"
> +	;;
>   esac
>   
>   board_config_flush

This should be part of DT. You can make power LED enabled by default.
You can reference USB ports in DT.

I don't think you can point Ethernet interface in LED node at this
point - support for that should be added.


> diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network
> index 6d970e1d0e..822320c0a6 100644
> --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network
> +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network
> @@ -13,6 +13,9 @@ bcm53xx_setup_interfaces()
>   	asus,rt-ac87u)
>   		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
>   		;;
> +	asus,rt-ac88u)
> +		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan"
> +		;;
>   	linksys,panamera)
>   		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 extsw" "wan"
>   		;;
> diff --git a/target/linux/bcm53xx/base-files/etc/init.d/set_nvram_vars b/target/linux/bcm53xx/base-files/etc/init.d/set_nvram_vars
> new file mode 100755
> index 0000000000..9c2b3ebf4d
> --- /dev/null
> +++ b/target/linux/bcm53xx/base-files/etc/init.d/set_nvram_vars
> @@ -0,0 +1,13 @@
> +#!/bin/sh /etc/rc.common
> +
> +START=99
> +boot() {
> +	. /lib/functions.sh
> +
> +	case $(board_name) in
> +		asus,rt-ac88u)
> +			# clear et0macaddr which makes cfe recovery mode inaccessible, set eth1 & eth2 mac addresses and wireless LEDs behaviour variables on nvram
> +			nvram unset et0macaddr set et1macaddr=$(nvram get 0:macaddr) set et2macaddr=$(nvram get 1:macaddr) set 0:ledbh9=0x7 set 1:ledbh9=0x7 && nvram commit
> +			;;
> +	esac
> +}

I still don't know what to do about it.
Does et0macaddr really break CFE somehow?!
Why do you need to set both et1macaddr and et2macaddr?
Should they really use MAC of wireless interfaces? It smells fishy.


> diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile
> index aadac9c3d4..fc85a131cc 100644
> --- a/target/linux/bcm53xx/image/Makefile
> +++ b/target/linux/bcm53xx/image/Makefile
> @@ -167,6 +167,14 @@ define Device/asus_rt-ac87u
>   endef
>   TARGET_DEVICES += asus_rt-ac87u
>   
> +define Device/asus_rt-ac88u
> +  $(call Device/asus)
> +  DEVICE_MODEL := RT-AC88U
> +  DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
> +  ASUS_PRODUCTID := RT-AC88U
> +endef
> +TARGET_DEVICES += asus_rt-ac88u
> +
>   define Device/asus_rt-n18u
>     $(call Device/asus)
>     DEVICE_MODEL := RT-N18U



More information about the openwrt-devel mailing list