OpenWrt support for Xiaomi AX3000T

Yes. I know. Thank you for jor job. I just wanted to point out these logs. It's probably not related to bootloop or flash. I think it has something to do with the new switch.

And could your please share the boot log of your router (with an8855) on the stock firmware, also the full output of the command via ssh?:

nvram show
cat /proc/mtd

I do not have this version of the router to analyze differences between old and new ax3000t revision.

Sorry I don't have nvram command in my build.

root@Kmicica:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "BL2"
mtd1: 00040000 00020000 "Nvram"
mtd2: 00040000 00020000 "Bdata"
mtd3: 00200000 00020000 "Factory"
mtd4: 00200000 00020000 "FIP"
mtd5: 00040000 00020000 "crash"
mtd6: 00040000 00020000 "crash_log"
mtd7: 00040000 00020000 "KF"
mtd8: 02200000 00020000 "ubi_kernel"
mtd9: 04e00000 00020000 "ubi"

I use build from other person based on patches by Linaro and probably yours fixes

Yep, I see, because OpenWrt installed;)

Ok, try
fw_printenv
There will be different result then with stock firmware, of course.

1 Like

Ok. I thought you wanted this:

root@Kmicica:~# fw_printenv
CountryCode=CN
Router_unconfigured=0
SN=49850/F4QW43325
arch=arm
baudrate=115200
boot_auto=bootxq
boot_fw0=run boot_rd_img;bootm
boot_fw1=run boot_rd_img2;bootm
boot_rd_img=nand read ${loadaddr} 0x2C0000 2000;image_blks 2048;nand read ${loadaddr} 0x2C0000 ${img_align_size}
boot_rd_img2=nand read ${loadaddr} 0x20C0000 2000;image_blks 2048;nand read ${loadaddr} 0x20C0000 ${img_align_size}
boot_wait=on
bootargs=console=ttyS0,115200n1 loglevel=8 swiotlb=512 rootfstype=squashfs firmware=0 mtd=ubi uart_en=1
bootcmd=bootxq
bootdelay=3
bootmenu_0=Startup system (Default)=bootxq
bootmenu_1=Startup firmware0=bootxq 0
bootmenu_2=Startup firmware1=bootxq 1
bootmenu_3=Upgrade firmware=mtkupgrade fw
bootmenu_4=Upgrade ATF BL2=mtkupgrade bl2
bootmenu_5=Upgrade ATF FIP=mtkupgrade fip
bootmenu_6=Upgrade single image=mtkupgrade simg
bootmenu_7=Load image=mtkload
bootmenu_delay=5
color=101
ethaddr=58:ea:1f:91:51:a8
ethaddr_wan=44:f7:70:78:54:6a
ethaddr_wan2=58:ea:1f:91:51:a9
ethprime=eth1
fdt_high=0x6c000000
fdtcontroladdr=4ffc4490
flag_boot_rootfs=0
flag_boot_success=1
flag_boot_type=2
flag_last_success=1
flag_ota_reboot=0
flag_try_sys2_failed=7
invaild_env=no
ipaddr=192.168.10.1
loadaddr=0x46000000
mode=Router
model=RD03
mtdids=nmbm0=nmbm0
mtdparts=nmbm0:1024k(bl2),256k(Nvram),256k(Bdata),2048k(factory),2048k(fip),256k(crash),256k(crash_log),34816k(ubi),34816k(ubi1),32768k(overlay),12288k(data),256k(KF)
no_wifi_dev_times=0
restore_defaults=0
serverip=192.168.10.100
ssh_en=1
stderr=serial@11002000
stdin=serial@11002000
stdout=serial@11002000
telnet_en=0
uart_en=1
wl0_radio=1
wl0_ssid=rd03_minet_546a
wl1_radio=1
wl1_ssid=rd03_minet_546a
flag_try_sys1_failed=2

Notice the flag_try_sys1_failed=2 is at the end. This is my own rc.local fix that I wrote about earlier.

3 Likes

Yes, a good workaround

Do you know if it is possible to update the Openwrt bootloader to support AN8855? This oryginal bootloader annoys me. When the router went into bootloop I couldn't do anything. Reset, failsafe, and tftpd didn't work. I only fixed it via Uart. So I had to open the case.

I am not sure any one of the alternative bootloaders supports this switch

1 Like

The bootloader from snapshot should be fine, if you don't care about TFTP recovery. If you do, you want to build openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb with AN8855 support.

You've access to UART, you can unbrick the bootloader if it somehow doesn't work.

With that being said, you want a ubootmod image, not sure if he provided one.

EDIT: From what I can see, his repository is just an OpenWrt fork and should build the U-Boot image and bootloader for ubootmod on its own. Not sure why he didn't include it.

2 Likes

Sorry it's so late

root@Kmicica:~# dmesg | grep nand
[    0.771037] spi-nand spi0.0: Winbond SPI NAND was found.
[    0.776379] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 96
root@Kmicica:~# dmesg | grep an8855
[    3.489407] an8855 mdio-bus:01: Airoha AN8855 DSA driver, version 1.0.2
[    3.963842] an8855 mdio-bus:01: configuring for fixed/2500base-x link mode
[    3.970736] an8855 mdio-bus:01: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    3.970940] an8855 mdio-bus:01 wan (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[    3.987838] an8855 mdio-bus:01 lan2 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[    3.997830] an8855 mdio-bus:01 lan3 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[    4.007884] an8855 mdio-bus:01 lan4 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[    4.020710] an8855-nl: genl_register_family_with_ops
[    4.472108] an8855 mdio-bus:01 lan4: configuring for phy/gmii link mode
[   14.121610] an8855 mdio-bus:01 lan2: configuring for phy/gmii link mode
[   14.165785] an8855 mdio-bus:01 lan3: configuring for phy/gmii link mode
[   14.198920] an8855 mdio-bus:01 lan4: configuring for phy/gmii link mode
[   14.233820] an8855 mdio-bus:01 wan: configuring for phy/gmii link mode
[   17.283966] an8855 mdio-bus:01 lan3: Link is Up - 1Gbps/Full - flow control rx/tx
[   17.291459] an8855 mdio-bus:01 lan2: Link is Up - 100Mbps/Full - flow control rx/tx
[   17.373946] an8855 mdio-bus:01 wan: Link is Up - 1Gbps/Full - flow control off

I have rebooted the router about 30 times already - everything is fine. Thank you.

2 Likes

The ubootmod makefile entry is missing the kmod, so this is the reason he didn't build it: https://github.com/openwrt-xiaomi/openwrt/blob/xq-23.05.5/target/linux/mediatek/image/filogic.mk#L968

You can build it yourself, just make sure to append kmod-switch-an8855 there before running make.

1 Like

I suspect that mt7530 is a chip from the switch that is not available in the version with AN8855, and that is why I have in the logs: mt7530-mdio: probe of mdio-bus:1f failed with error -110
This version is so different. It should be separated from an older versions.

1 Like

Yes, it looks like we now have two routers - 'xiaomi ax3000t' and 'xiaomi ax3000t v2' (an8855 edition).
And separate dts (configuration for firmwares) for them may help to exclude spam in the log

2 Likes

remittors build with an8855 support is working for me too - with xury's rc.local fix

2 Likes

Mine's quite hot too. My wardrobe top heating up can be felt from the inside.


The room is quite cold right now otherwise it runs at 60C+. It's probably not downclocking the CPU.

I cannot see CPU clocks anywhere in /dev or /sys/class.

I checked and cpufreq does not exist on the snapshot builds, so we are pretty much relying on the hardware's inert power saving capabilities at this point.

I am currently in a tropical country near the equator (with an ambient temperature around 33C+) and I can confirm that it can easily reach 69C (nice) on light usage. But after it reaches that point, the hardware gets more wonky the longer it stays on. On my experience, even on 57C, the hardware can start misbehaving after 4 days.

It is possible to place a fan on top it as AX3000T's heatsink is on the top. If done, it can drop the temperature down to as low as 43C on idle, 30C ambient. You can use a slow moving fan with high static pressure, blowing to the unit, and it will work fine.

The power consumption of this device is around 5-6 watts on idle which might be a bit too high considering that AX3000T is rated on 12V 1A DC supply (total power budget of 12 watts).

I find it weird that no one seem to have brought this up.

3 Likes

Can anybody please test:

I want to merge it ASAP

3 Likes

@xury, just curious, what conclusions did you come to, or how exactly did you determine that 0 cannot be used for flag_try_sys1_failed flag?

I'd be happy to update this in the Wiki's basic_configuration section if the value 2 is more stable than 0 for the stock bootloader, as the current script in the Wiki suggests a value of 0:

Reason:

The value 7 is the extreme value for the bootloader!

Fixing only 1 parameter is not correct!
You need to change 2 parameters at once!