Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Here are all the steps and buttons I click.

First screen

Interface choice

And the popup that appears ont this screen (of the imgur photo) after clicking the bottom right button
https://imgur.com/cT7ZdHa
I bet the popup isn't normal...
If only I was able to read it
EDIT: finally able to read it, well sort of : can't understand chinese and googletrad doesn't really help, can someone translate this?
https://imgur.com/lAwWS1c

On the choose interface screen don't continue and just do the reset process to enter recovery mode and it should start to flash.

You do know It only has 3 ethernet ports?

It workded! You can't imagine how much I love you <3.

flash worked, now I'm back to miWifi. Just need to gain SSH again and I'll be ready to go .

@robimarko, in order to avoid the mistake, once I got SSH working, I flash the ubi file. reboot to OpenWRT, check if wifi is still broken (was the reason of why I tried a sysupgrade from the latest version of your git).
ACTIVATE UART xD
Then I have to flash the itb file from tft? (do you think I can try the xiaomi tool since it asks for the file I want to flash).
And then I'll be ready to go with classic sysupgrades?

Thanks all for your help !

You need to flash the UBI to both rootfs partitions, otherwise you will get a brick when sysupgrading.
Also, make sure to enable UART, you have commands for that on the Wiki

I am about to order a new AX3600 from Taobao and try the builds available here.

Apart from the router itself, what else I should have?

@robimarko I have both rootfs partitions flashed with the factory.ubi image but there has to be a bug in the sysupgrade process, it just won't upgrade no matter how many times I try.

If I try to flash the sysupgrade.bin with ubiformat I get this error:

ubiformat: error!: file "/tmp/openwrt-ipq807x-generic-xiaomi_ax3600-squashfs-nand-sysupgrade.bin" (size 12176160 bytes) is not multiple of eraseblock size (131072 bytes)

Have you tested sysupgrade on the ax3600 lately?

I have used it only on AX9000 lately but it uses the exactly the same setup.
The issue seems to be in the logic as it seems that the bootloader somehow tends to boot the old kernel and new rootfs and vice versa

1 Like

The sysupgrade.bin file is not for use with ubiformat!

2 Likes

An UART adapter can be great for debugging, to get SSH access you'll need another router, or a soft on your computer.

1 Like

I understand that and was only testing as I found no other way to get it to flash the sysupgrade.bin.

Is it possible to create a sysupgrade.bin that we can flash with ubiformat similar to what xqrepack does?

xqrepack makes a UBI image and just calls it sysupgrade, its got nothing to do with sysupgrade.
Hence why you use .ubi image for ubiformat

1 Like

So it's not possible to create a sysupgrade.ubi that doesn't wipe your config?

I don't really understand what do you mean by that?
Think of UBI as a wrapper for volumes that may but don't have to include images with some contents by default.
You can only completely wipe and write the whole what you call ".UBI" image but you can name it however one wants.
Sysupgrade image is a completely different thing, it's a TAR archive that contains metadata so you can only flash it on the supported device and then contains kernel and rootfs as separate images which it then flashes using the various helper scripts based on the device in question.

So what you call "sysupgrade.ubi" doesn't exist and cannot exist

3 Likes

I was just looking for a way to flash a newer build without wiping config.

I have also tried directly flashing with mtd -r write to rootfs/rootfs_1 and it still boots to the old kernel.

Thanks

DO NOT USE THE MTD tool on NAND devices.
It does not care about bad blocks at all.

Again, the issue is in the logic for flashing sysupgrade as there is something else that needs to be set for the bootloader to choose the new kernel

1 Like

Hi,
I'm a long time user of openwrt, but this is my first post and
I wanted to thank you all for sharing you work!!!

I just bought AX3600, follow wiki instructions and installed robimarko last build.
Only had time for configuring it, but it already looks very good :slight_smile:

@robimarko
Can openwrt network->SWITCH menu options be implemented with this HW?
No problem if it's no priority, I just wanted to know if it could be done with this HW.
TIA

Thanks for all your time.

I have the chinese version of ax3600, i followed the instructions on the wiki page, i downloaded the precompiled openwrt factory.ubi from https://github.com/robimarko/openwrt. but when i flash to an inactive mtd then reboot, my router only flashes orange led, no ssid. did i miss the step?