Xiaomi Mi Router 4A - R4AC New revision

Just passing here to say thanks to @edeso and to confirm that his method worked for me (2GHz wifi and LAN only). Then upgrading to openwrt-22.03.3-ramips-mt76x8-xiaomi_mi-router-4a-100m-squashfs-sysupgrade.bin did the job :).

Note that it worked with a slightly different layout:

root@XiaoQiang:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 01000000 00010000 "ALL"
mtd1: 00020000 00010000 "Bootloader"
mtd2: 00010000 00010000 "NULL"
mtd3: 00010000 00010000 "Factory"
mtd4: 00010000 00010000 "crash"
mtd5: 00010000 00010000 "cfg_bak"
mtd6: 00100000 00010000 "overlay"
mtd7: 00c60000 00010000 "OS1"
mtd8: 00b00000 00010000 "rootfs"
mtd9: 00230000 00010000 "disk"
mtd10: 00010000 00010000 "Config"

Nothing interesting in my reply. There is an new revision, and it requires 7663, 7615 etc. But there is no stuff at current snapshot (=
Building mage with custom dts and other stuff (.targetinfo, target/linux/ramips/image/mt76x8.mk, etc...) bring me error messages:

 * opkg_install_cmd: Cannot install package kmod-mt7603.
 * opkg_install_cmd: Cannot install package kmod-mt7615e.
 * opkg_install_cmd: Cannot install package kmod-mt7663-firmware-ap.

As we can see, current 5.15.141-1 kernel has no this modules, but 5.15.140-1 did.

original post:
Found similar issue. Bought the R4A 100m router with international stock firmware (around december 2023). It has R4AC label on back side, After invasion found some strange thing with mtd layout:
mtd6: 00100000 00010000 “overlay”
and after flashing international firmware i've got a brick. Restoring via TFTP with international firmware gave no success. But R4A did.
After flashing last openwrt-ramips-mt76x8-xiaomi_mi-router-4a-100m-squashfs-sysupgrade.bin got successfully booted OpenWRT. But it without 5GHz wireless interface. Looks like there is some other revision on international R4AC with R4A flash layout.

made successful build at snapshot with this patch (4pda). dts was taken from BestMC's imagebuilder.

Link looks broken. Can someone post the patch for v2?

There is active PR for this patch. It will be included in upstream if someone could help with review.

I compiled the image about a week ago and my colleague @sergio-gimenez and i have been running it on 10 routers, all of them work perfectly. Thank you very much.

We had different layouts on different routers but the image still worked, here's another layout example:

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "bootloader"
mtd1: 00010000 00010000 "config"
mtd2: 00010000 00010000 "factory"
mtd3: 00010000 00010000 "crash"
mtd4: 00010000 00010000 "cfg_bak"
mtd5: 00100000 00010000 "overlay"
mtd6: 00ea0000 00010000 "firmware"
mtd7: 00232d49 00010000 "kernel"
mtd8: 00c6d2b7 00010000 "rootfs"
mtd9: 008e0000 00010000 "rootfs_data"

How can we help to validate the PR? I'm not really familiar with that.