Adding OpenWrt support for Xiaomi AX3600 (Part 1)

That's what I'm hoping for. If it works, I'll be really happy!

That seems like a much easier way to do the replacements, but I wasn't aware of the possibility to do that in a single file. I'll have to look that up.

Probably a mistake on my side:

Yes, for sure this can be done on a live system. That's the reason I wrote a script with sed instead of .... better options.

Had to recover each flash locally, however, because if flash fails (which it did every single time for me) you'll end up with an unresponsive system. Then you can recover (instead of setting the whole thing up from the ground) again, by just, you know... restore.

Hopefully, this is a thing of the past.

i save my config from r0-928dceb and made the update to r0-8faba05...
after this the AX3600 boots with the new layout...

but i can not use my old config files...

Are you on a unix-like system or on Windows, for your regular stuff?

i use windows...

EDIT
was my mistake... i mad a small change and forgott an ' sorry

all works fine

1 Like

:slight_smile:
Well, since I already wrote it I'm going to post it anyway, just in case somebody else encounters a similar problem:

HOW TO EDIT YOUR OpenWRT CONFIG IN WINDOZE

Unpack your *.tar.gz
If your windows experience is the same as mine, you'll have to do it twice.
(From gz. to tar, then again from tar to filesystem folders)
You'll get a folder with the name "etc".
Use your favorite tool to replace "eth0" with "wan" and "eth1" to "eth3" with "lan1" to "lan3" in all files.
Pack it back to "tar" and then "gz" with your favorite compression tool.
Then use this in your LuCI
System->Backup/Flash Firmware->Restore
section.

This should get you back your old config.
I wish I could be more hopeful, but Windows tools often suck.
Best of luck anyways!

before i upgrade to r0-928dceb i use the script with your code!

find etc/config -type f -exec sh -c "cp -a {} {}.orig && cat {}.orig | sed -r 's/\beth0\b/wan/' | sed -r 's/\beth([1-3])\b/lan\1/'>{}" \;

thanks for this!

and now is safe only my config files and made the "ubiformat" and "sysupgrade" to the newest release...
than i upload my config and all works fine!

thanks @all

2 Likes

Thank you, that worked perfectly.

1 Like

Thank you for your work and dedication.
Maybe it was just me, but I was having a hard time finding the commit messages, probably wrong filter or order on github, but finally found it. https://github.com/robimarko/openwrt/commit/dd5d52aac7fa13ecbc691856943256f0adc187d0
I was on your previous build and it worked perfectly.

Easiest way is to just open the branch and look at history as commit hashes will change upon force pushing

@robimarko on AX6 the method outlined in the device commit is definitely not working, the result is a bootloader loop after point 5.

Atm I recovered to factory, lost SSH and serial...

Is it correct to write the "openwrt-ipq807x-generic-redmi_ax6-initramfs-factory.ubi" at point 5.?

Yes, the whole idea is to flash an initramfs image to be able to change layouts.

I would suggest using fw_setsys to permanently set uart_en to 1 in bdata from a running OpenWrt

1 Like

Excuse if this is noise as I don't have an AX6, but that git commit message seems to be leaving out the "-s 2048 -O 2048" ubiformat parameters for some reason (I assume/believe it's needed).

Looking at the old wiki instructions they were included...

1 Like

Yeah, that was set, but around the second or third recovery attempt, that option got disabled.

I intentionally dropped those as they should be autodetected but you are right, they might be needed.
Install procedure is pretty much the same on AX6, AX3600 and AX9000 as Xiaomi used the same logic, just mtd device numbers are different

A problem in the partition layout ? Or the thing bootloop in initramfs?

I forgot to say I single/enlarged rootfs in both my ax3600 yesterday, following Robi instructions.
It didn't look relevant to add my input, as two other users already had validated it was working.

Did I understand it correctly, that now we have the expanded openwrt version from robimark, too (official unofficially supported?)
If yes, are we able to switch from dimfish's version to yours and back without any issues or is there something different, which either locks us to one of the options?

Anyone tried to switch from one build to another to see if they are compatible?

1 Like

I am worried about AX6 now, however, I don't have the device and its supposed to be pretty much like AX3600 and AX9000 in terms of flashing.

Were you able to capture the log when it was bootlooping?

1 Like