Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Once I regain access to this piece of sh*t, I will try again. The last time I did it was 2 years ago, the only thing I remember that it was a pain in the ass.

Yeah, I just find it insane that bdata reset itself.
You can probably use the create_exploit JS for AX9000 and a lot more models as I see RA69 being supported.

Hi, first of all thank you devs for the amazing work. I just want to know if it is possible to obtain gigabit speeds with pppoe over vlan tagged ethernet, like any tweak available that can help achieve maximum speeds. Currently hitting 590mbps on latest build with mtu=1500. I already have sw offloading + pkt steering + irqbalance enabled.

EDIT: I had to reboot the router, and now speed is back to maximum.. it seems some of the options needed a reboot to take into effect

Well here’s an angle: given that as far as I know this was the only AX6 testing 1.7 FW, maybe there’s a slight possibility that a petition (bdata possibly) was corrupt/had bad sectors/other which cause both 1.7 not to work (couldn’t read something that prior versions didn’t look for), and also caused this reset.

Not super likely, but possible I suppose.
Unless other AX6 were also attempted…

---- EDIT - based on below this is not correct.

Migrated from 928dceb just now to 83a1694 single partition and it worked flawless.
To be sure: if you now release another build, we can update normally with sysupgrade? Or if the PR is done and images from OpenWrt master are generated?

Just to conclude on the AX6, the issue was the size of the initramfs image. My custom image was slightly bigger than 16MB and apparently that is the limit. Once we enabled ZSTD compression and the size got below 16MB, it worked flawlessly. Thanks @robimarko for the help! :+1:

1 Like

Yeah, you can just sysupgrade from now on

1 Like

@robimarko we can add a check to the artifact image to check for the max size just to handle these case

Haven't really looked into it, but I have set ZSTD to be used by default if ipq807x is used.
I tried various load addresses for kernel, even the modified one that QCA moved to using as well but even with a better load adress then we hit deflate running out of U-boots CONFIG_BOOTM_SIZE

The max size looks to be 16 m ?

Yeah, looks to be 16-ish MB.
I could probably squeeze meg or two more with a different load adress, but then deflate will fail as CONFIG_BOOTM_SIZE is 64M and you quickly run out of that as that has to account for the loaded image as well as the decompressed one.

1 Like

ok then as a safe value i would add size check and limit it to 16mb max... with that the image build will fail if that size is exceeded.

1 Like

Ok it's just a simply | check-size 16M this will make the build fail if the image size is bigger than 16M

Also upgraded without issue.
Thanks @ all !

After booting into openwrt i'm getting this message

I don't wanna break my router can anybody please help..

You need to sysupgrade now with the openwrt-ipq807x-generic-xiaomi_ax3600-squashfs-sysupgrade.bin image.


Here is all the things that i learned today to flash the Openwrt on Xiaomi AX3600. Might be helpful to newbies like me.

-----------------After unlocking SSH follow these steps----------------------

nvram set uart_en=1
nvram set boot_wait=on
nvram commit

//return the current os details
uname -a

//Check the folders and partions available in the router
cat /proc/mtd

----------------after typing above command it will show something like this---------------------------
mtd12: xxxxxxxxxxxxxxxxxxxxxx "rootfs" this means 0
mtd13: xxxxxxxxxxxxxxxxxxxxxx "rootfs_1" this means 1

//returns the current boot flag id.
nvram get flag_boot_rootfs

--------Copy the os file to the router /tmp folder using tool like " WinScp " or from the terminal using command like scp...

// install the os in mtd13 partition
ubiformat /dev/mtd13 -f /tmp/ "filename without quotes"

//setting the boot flag to be boot from the openwrt partitions
nvram set flag_last_success=1
nvram set flag_boot_rootfs=1
nvram commit


Then do the system upgrade with .bin image file if you get the " initramfs " mode warning from openwrt update page.

----------------To go back to default os-------------------

fw_setenv flag_last_success 0
fw_setenv flag_boot_rootfs 0

I have strange issue. Nvram is not found. I have been using this router for months (with regualry sysupgrading). Any advice maybe I'm misssing something?

root@OpenWrt:~# nvram get flag_boot_rootfs
-ash: nvram: not found

BusyBox v1.35.0 (2023-01-03 12:07:39 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 OpenWrt SNAPSHOT, r0-928dceb
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
root@OpenWrt:~# nvram get flag_boot_rootfs
-ash: nvram: not found
root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "0:sbl1"
mtd1: 00100000 00020000 "0:mibib"
mtd2: 00300000 00020000 "0:qsee"
mtd3: 00080000 00020000 "0:devcfg"
mtd4: 00080000 00020000 "0:rpm"
mtd5: 00080000 00020000 "0:cdt"
mtd6: 00080000 00020000 "0:appsblenv"
mtd7: 00100000 00020000 "0:appsbl"
mtd8: 00080000 00020000 "0:art"
mtd9: 00080000 00020000 "bdata"
mtd10: 00080000 00020000 "crash"
mtd11: 00080000 00020000 "crash_syslog"
mtd12: 023c0000 00020000 "rootfs"
mtd13: 023c0000 00020000 "rootfs_1"
mtd14: 01ec0000 00020000 "overlay"
mtd15: 00080000 00020000 "rsvd0"

with openwrt use this

fw_printenv flag_boot_rootfs

Thank you (all) for the awesome work!

My main use case (Mesh on 5G) is working again! Mesh is still unusable: the network link between nodes looks good, but the traffic is unstable, Speedtests times out, Android thinks that the Wifi can't provide internet, etc.

The OpenWrt failsafe without serial access is still unusable (on ipq807x-2023-01-07-0009): failsafe mode starts but the router is unreachable through network. (I don't have serial access, but that would work surely.)

You did fix exactly this problem earlier, so I hope it's just an user error. :sweat_smile:
Would you mind testing OpenWrt failsafe mode again on X3600, just using the RESET button and an ethernet cable? Is it accessible through network?