Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Thanks for your support

Too early for any post-merge plans, there is still lot to upstream and fix

BTW guys it would be a massive help if everyone here and on the other topic could add and provide a tested-by tag for each device... Just to add value to all the commits!

and @mattimat

Ahh, thanks! It was an user error.

So it's a DSA limitation. :confused:
Thanks again!

Its just the preinit logic, it will always use the first LAN interface for failsafe unless you set it per device which really doesn't make sense

1 Like

if we really want we can """workaround"" that with a preinit script but could be that it's not worth it...

Nope, we had that initially but its crazy to set it per device, this is a known global default that should be used, and its sane to assume that first LAN interface gets used

1 Like

There's a time for all of us to unite and show ours appreciation for all work done here. "Tested-by" left.

GO! GO! GO!

Edit: Fixed my interpretation :smiley:

1 Like

Moved to the new partition layout with 1 enlarged rootfs, and currently on the 71addb3 build. While trying to sysupgrade using LuCI to latest build ef42fc4 I get bellow error, is this expected ? Should I force upgrade ?

Image check failed:

Sun Jan 8 22:55:18 EET 2023 upgrade: The device is supported, but this image is incompatible for sysupgrade based on the image version (1.1->2.0). Sun Jan 8 22:55:18 EET 2023 upgrade: *** Partition layout has changed from earlier versions. You need to reinstall the firmware from UART or a migration initramfs image. Settings will be lost. *** Image check failed.

Adding bellow partition layout and size:

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: 00100000 00020000 "pstore"
mtd11: 023c0000 00020000 "ubi_kernel"
mtd12: 0d240000 00020000 "rootfs"
root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 6.8M      6.8M         0 100% /rom
tmpfs                   203.4M     11.5M    191.9M   6% /tmp
/dev/ubi0_1             175.2M      2.8M    167.7M   2% /overlay
overlayfs:/overlay      175.2M      2.8M    167.7M   2% /
tmpfs                   512.0K         0    512.0K   0% /dev

Do I need to now change the compat version to 2.0 ? I was under the 1.1 version (after changing the interfaces names using the one liner command) when backing up config and then I used it to restore the config after moving to new partition layout.

uci set system.@system[0].compat_version="2.0"
uci commit system

Also is the sysupgrade issue now fixed by having only one rootfs or still need to kill wpad before upgrade ?

1 Like

If you restored the config after migrating to single rootfs then yeah, you have to increase the compat version and then sysupgrade will work fine.

Nothing really changed in regards with ath11k, its still annoying as hell but I have no surefire way to fix it

1 Like

Yup, sysupgrade issue still there. Was under the impression it is related to having two rootfs partitions.
Worked after killing wpad+sysupgrade.

Extraordinary work @robimarko and @Ansuel for finally having a PR final. Added also a Tested-by tag. Hope that helps.

1 Like

No idea what that means. If I find out where/how, I’ll gladly do it :+1:

1 Like

Thank you guys so much for the hard work, just left a coffee and a tested-by on the PR!

Was using the firmware from December last year, then a week ago soft-bricked the device during an update - of course totally my fault (this might help somebody: the orange light was on for around ~2-3s then a very slight blink of blue led and reboot constantly, no LAN leds up, thought the device was dead, but after a lot of retries I was able to time it correctly for it to go into recovery - but only after I opened up the device to get a better access to the reset button), was able to flash again, then I migrated into single partition and all is working very well.

PS: Today I updated from 2f7a3cc to ef42fc4 and sysupgrade was just rebooting the device until I did: service wpad stop && sleep 8 && sysupgrade <fw> then the update went w/o any issues.

1 Like

See https://github.com/openwrt/openwrt/pull/11731 for examples from others, as in post a line with

Tested-by: Real Name Surname # device

in that PR discussion - only after you have indeed (successfully) tested it, of course.

1 Like

Is NSS Hardware Acceleration enabled in the final build? If not, how would it affect day to day performance when compared to the Xiaomi stock version?

No, and it won't be.

Any idea how it will impact day to day performance on wired & wireless clients?

I'm using it as my main router (PPoE) since months ago. Two wired PC and a dumb AP router (all LAN ports in use). I also have about 25 WiFi devices connected. Running ddns-scripts and https-dns-proxy too.

Runs very stable and it gets the full download/upload speed (1000Mbps)

It's working great for a daily use, you won't miss Xiaomi's soft.

3 Likes

First of all, awsome job @robimarko and @Ansuel and all the testers.

Hey @dimfish,
could you please give us information on how to get from your last build to robimarkos build?
I guess there is no problem with the partion layout and size, right?
So we need to change the compat version of our backup, flash to robimarkos last build and thats it?

Thank you.

Hi i am new to this forum just joined to tell what just happened to me , maybe to help someone troubleshooting his device , i was on robimarko build the old partition layout one and i decided to upgrade to the new one , sadly during the upgrade the current went off , sadly part 2 i didnt turn on the uart at the time , i tried multiple times using tftp and xiaomi own tool to restore the device but with no luck since mtd12 & mtd13 where brocken cause current went off during format of those , so no partition , out of desperation i tried over and over the xiaomi tool and tftping different iso in different format etc. but the router was stuck in bootloop , then after the 200ish flash a new option appeared in the printenv , it was like flag_boot_recovery = 1 and i was able to stop uboot from running autoboot with uart set to 0 and edit the printenv , i turned on and rebooted the router got into the shell again and using tftp i loaded openwrt-ipq807x-generic-xiaomi_ax3600-initramfs-uImage.itb this image , then bootm and finally i was on openwrt again now i just sysupgraded to openwrt-ipq807x-generic-xiaomi_ax3600-squashfs-sysupgrade.bin this image twice ( dont know why twice but the first time was still bootlooping ) and the router is back to life , i also had to remove some printenv variables that xiaomi tool put in the env because otherwise it would never boot cause it still was searching a file in the memory that doesnt exist . now rocking latest snapshot with a lot of space . thanks to @robimarko for the awesome work

2 Likes