Add OpenWrt support for Xiaomi "Redmi AX6000"

ax6000-ubootmod-initramfs-factory.ubi that i took from downloads? The file from guide, step 3, that i tried to flash before bootloop?

So i just "Load Image" this file into default region (0x4600.....) and it will boot into OS and i should do guide again from step 4?

Excuse me, i am kinda dummy at openwrt, uboot etc

I suggest you back read from here.

Thank you for the detailed response, @jav !

I'm trying to switch to ubootmod layout according to the instructions in #11565, however, it seems that my partitions are different from what I should have in stock layout (according to the PR#11565).

Before executing (step# 3) "ubiformat /dev/mtd7 -y -f /tmp/ax6000-ubootmod-initramfs-factory.ubi", my partitions were:

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: 01e00000 00020000 "ubi_kernel"
mtd8: 05000000 00020000 "ubi"

After executing (step# 3) "ubiformat /dev/mtd7 -y -f /tmp/ax6000-ubootmod-initramfs-factory.ubi", I received the following output:

"ubiformat: mtd7 (nand), size 31457280 bytes (30.0 MiB), 240 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 239 -- 100 % complete
ubiformat: 240 eraseblocks have valid erase counter, mean value is 2
ubiformat: flashing eraseblock 72 -- 100 % complete
ubiformat: formatting eraseblock 239 -- 100 % complete"

But my partitions remained the same (the ubi partition did not change to mtd5).

What Am I missing?

Thanks in advance!

Did you reboot? Partition change will only be visible after a reboot.

1 Like

Correct me if i'm wrong but i think you need to run command below as stated by @jav in a previous post. It is what i ran anyway to successfully switch to the new ubootmod layout.

mtd -r -e ubi write ax6000-ubootmod-initramfs-factory.ubi ubi

All in all, unfortunately at the moment there is so many different bits and pieces of information on how to get OpenWrt flashed on this router, be it from stock MiWiFi firmware or from initial OpenWrt firmware, which is understandable, as this is new hardware being supported, but it does make it very confusing to the average user.

An amalgamation of the complete procedure needs to be put together covering all the different scenarios and flash methods via SSH/UART. I was just lucky enough that i managed to follow the instructions from here and there (some steps i cannot remember) and am on the latest OpenWrt U-Boot layout image.

I am sure with more thorough testing that a complete and succinct procedure will be posted on the Wiki.

It worked :slight_smile:

I considered rebooting the router, but was not sure about it (and was afraid to brick the router) since the instructions did not say to do so..

Thank you for your help (and patience)!

Thanks!

Eventually everything worked after a reboot.

I agree that it is a matter of time (and efforts of the members of this amazing community) until we see a complete and detailed guide for the average user.

Wiki updated. Please check that's fine. All installation steps are now there. Probably the root password generation section can be removed as isn't used.

2 Likes

Looks good. My preference is to reference the install procedure contained in the commit message since rather than pasting it all in the wiki:

  1. It is the original words of the original author/minimizes copy/paste errors, etc.
  2. It keeps the wiki page smaller

That is just personal preference.

1 Like

Considering the confusion there is between different install procedures and options, I think it makes more sense to put it all together in a comprehensive way, so newcomers don't get confused.

2 Likes

Greetings!

Running u-bootmod OpenWRT with 10.01.2023-dated images, flashed strictly by two guides.

Is it safe to sysupgrade from LuCi webui? Seems that image proposed there is newer than in openwrt download section.
Is it possible to update base-files package from LuCi webui? For me it caused read-only partition error.
Does Packet Steering should be enabled? Any latency boost for our fast device?

Thank you!

LuCI sysupgrade is safe. Just make sure you use the right layout image (u-boot mod in your case).

From OpenWrt upgrade page: the use of opkg upgrade is very highly discouraged, and specifically Avoid upgrading core packages.

2 Likes

About SQM against bufferbloat - works like charm for me on 10.01.23 image.
Just installed related package and deps for LuCi, entered my ISP rates and enabled it.
Was getting +10-40 ms under load, now it is +0.
Checked here: Waveform and Cloudflare.

I can see both sides (of linking vs copy-pasting), but regardless, you've clearly improved the wiki page. Thanks - I was tempted to improve it but didn't get round to it :grin:.

Good point about the using the right layout when upgrading. Attended Sysupgrade takes care of that, right? I wonder if it'll ever be preferred upgrade mechanism, at least for normal users.

sysupgrade should reject the wrong layout image (if it isn't forced, of course), but an extra check won't hurt, as being a very new target, it may slip through.

1 Like

How did you get the SQM worked? I haven't see any one mentioned that SQM worked properly with AX6000. I tried SQM myself on both BPI-R3 & AX6000, no effect at all.

the Waveform bufferbloat test was not accurate to me, I tried different combination of SOF/HOF, with SQM ON/OFF, results were never same nor can it reproduce the similar results over same settings.

Or maybe I need to update my firmware, can you post the snapshot version you used for test SQM and that it worked?

This is my SQM configuration (PPPoE in a VLAN over GPON). Just very recent configuration, so no much testing done, but looks like it's working fine. I'm using a custom snapshot build.

config queue 'eth1'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option enabled '1'
        option interface 'pppoe-wan'
        option download '580000'
        option upload '580000'
        option debug_logging '0'
        option verbosity '5'
        option linklayer 'ethernet'
        option overhead '37'
        option qdisc_advanced '1'
        option squash_dscp '1'
        option squash_ingress '1'
        option ingress_ecn 'ECN'
        option egress_ecn 'NOECN'
        option qdisc_really_really_advanced '1'
        option iqdisc_opts 'nat dual-dsthost ack-filter'
        option eqdisc_opts 'nat dual-srchost ack-filter'

Thank you, the snapshot Im using is
OpenWrt SNAPSHOT r21657-9260027535 / LuCI Master git-22.361.69865-deed682

I will try to git update & recompile to latest version and give SQM a try.

I'm behind you, at
OpenWrt SNAPSHOT r21629-9d8eff6799 / LuCI Master git-22.361.69865-deed682

I haven't seen any relevant new commit that's worth updating to.