Adding OpenWrt support for Xiaomi "Redmi Router AX6S"/"Xiaomi Router AX3200"

Some information about the NAND chip and layout on my device that might be interesting for the wiki page:

chip: GD5F1GQ5UEYIG (GD/ESMT SNAND 128MiB 3.3V 8-bit)

layout under 1.0.35 BR01 official FW (output from kernel)
Recognize NAND: ID [c8 51], [GD5F1GQ5UEYIG], Page[2048]B, Spare [128]B Total [128]MB
nand: device found, Manufacturer ID: 0xc8, Chip ID: 0x51
nand: GD/ESMT SNAND 128MiB 3.3V 8-bit
nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
[NAND]select ecc bit:12, sparesize :112
[BBT] BMT.v2 is found at 0x3ff
13 ofpart partitions found on MTD device MTK-SNAND
Creating 13 MTD partitions on "MTK-SNAND":
0x000000000000-0x000000020000 : "PL_Header"
0x000000020000-0x000000080000 : "Preloader"
0x000000080000-0x0000000c0000 : "ATF"
0x0000000c0000-0x000000140000 : "uboot"
0x000000140000-0x000000180000 : "Nvram"
0x000000180000-0x0000001c0000 : "Bdata"
0x0000001c0000-0x000000240000 : "Factory"
0x000000240000-0x000000280000 : "crash"
0x000000280000-0x0000002c0000 : "crash_syslog"
0x0000002c0000-0x0000020c0000 : "firmware"
2 fit-fw partitions found on MTD device firmware
0x0000002c0000-0x000000560000 : "kernel"
0x000000560000-0x0000020c0000 : "rootfs"
mtd: device 11 (rootfs) set to be root filesystem
0x0000020c0000-0x000003ec0000 : "firmware1"
0x000003ec0000-0x0000070c0000 : "overlay"
0x0000070c0000-0x000008000000 : "obr"
mtd: partition "obr" extends beyond the end of device "MTK-SNAND" -- size truncated to 0x500000
mtk-snand 1100d000.snfi: [mtk_snand] probe successfully!
layout under OpenWRT 22.03-SNAPSHOT (output from kernel)
mtk-snand 1100d000.snfi: chip is GD5F1GQ5xExxG, size 128MB, page size 2048, oob size 128
[BBT] BMT.v2 is found at 0x3ff
10 fixed-partitions partitions found on MTD device 1100d000.snfi
Creating 10 MTD partitions on "1100d000.snfi":
0x000000000000-0x000000080000 : "Preloader"
0x000000080000-0x0000000c0000 : "ATF"
0x0000000c0000-0x000000140000 : "u-boot"
0x000000140000-0x000000180000 : "u-boot-env"
0x000000180000-0x0000001c0000 : "bdata"
0x0000001c0000-0x000000240000 : "factory"
0x000000240000-0x000000280000 : "crash"
0x000000280000-0x0000002c0000 : "crash_log"
0x0000002c0000-0x0000006c0000 : "kernel"
no rootfs found after FIT image in "kernel"
0x0000006c0000-0x0000075c0000 : "ubi"

However I only have ~50MB as an overlayfs despite the ubi region in the mtd is 111MiB≈116MB in size.

2 Likes