Adding OpenWrt support for Xiaomi AX3600 (Part 1)

I had your previous image from your repo 2023-01-08-1438 working well and something is or went wrong when I flashed your last image 2023-01-09-2026-openwrt-ipq807x-generic-xiaomi_ax3600-squashfs-sysupgrade.bin from today.

After flash the router gets into a boot loop, with orange led on for a period of time, then off briefly, then repeats.
This what I capture from UART:

resetting ...


Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.3.1-00147
S - IMAGE_VARIANT_STRING=HAACANAAA
S - OEM_IMAGE_VERSION_STRING=xiaoyang-gv
S - Boot Config, 0x000002e5
B -       201 - PBL, Start
B -      2736 - bootable_media_detect_entry, Start
B -      3444 - bootable_media_detect_success, Start
B -      3448 - elf_loader_entry, Start
B -      6116 - auth_hash_seg_entry, Start
B -      6359 - auth_hash_seg_exit, Start
B -     68593 - elf_segs_hash_verify_entry, Start
B -    131293 - PBL, End
B -    207095 - SBL1, Start
B -    283467 - GCC [RstStat:0x10, RstDbg:0x600000] WDog Stat : 0x4
B -    292861 - pm_device_init, Start
B -    466436 - PM_SET_VAL:Skip
D -    171593 - pm_device_init, Delta
B -    468724 - pm_driver_init, Start
D -      5368 - pm_driver_init, Delta
B -    475159 - clock_init, Start
D -      2135 - clock_init, Delta
B -    479216 - boot_flash_init, Start
D -     11864 - boot_flash_init, Delta
B -    494771 - boot_config_data_table_init, Start
D -      3202 - boot_config_data_table_init, Delta - (575 Bytes)
B -    502274 - Boot Setting :  0x00000600
B -    506208 - CDT version:2,Platform ID:8,Major ID:1,Minor ID:0,Subtype:16
B -    513132 - sbl1_ddr_set_params, Start
B -    516975 - CPR configuration: 0x300
B -    520452 - cpr_init, Start
B -    523227 - Rail:0 Mode: 5 Voltage: 784000
B -    528382 - CL CPR settled at 736000mV
B -    531218 - Rail:1 Mode: 5 Voltage: 880000
B -    535397 - Rail:1 Mode: 7 Voltage: 888000
D -     16470 - cpr_init, Delta
B -    542259 - Pre_DDR_clock_init, Start
B -    546285 - Pre_DDR_clock_init, End
B -    549671 - DDR Type : PCDDR3
B -    555374 - do ddr sanity test, Start
D -      1067 - do ddr sanity test, Delta
B -    560132 - DDR: Start of HAL DDR Boot Training
B -    564890 - DDR: End of HAL DDR Boot Training
B -    570563 - DDR: Checksum to be stored on flash is 1155630626
B -    580964 - Image Load, Start
D -    224144 - QSEE Image Loaded, Delta - (1373936 Bytes)
B -    805200 - Image Load, Start
D -        61 - SEC Image Loaded, Delta - (0 Bytes)
B -    812855 - Image Load, Start
D -     10706 - DEVCFG Image Loaded, Delta - (26004 Bytes)
B -    823652 - Image Load, Start
D -     25254 - RPM Image Loaded, Delta - (105964 Bytes)
B -    848967 - Image Load, Start
D -     96563 - APPSBL Image Loaded, Delta - (589900 Bytes)
B -    945652 - QSEE Execution, Start
D -        61 - QSEE Execution, Delta
B -    951447 - USB D+ check, Start
D -         0 - USB D+ check, Delta
B -    957852 - SBL1, End
D -    753075 - SBL1, Delta
S - Flash Throughput, 6749 KB/s  (2096379 Bytes,  310607 us)
S - DDR Frequency, 466 MHz
S - Core 0 Frequency, 800 MHz




U-Boot 2016.01 (Sep 28 2020 - 09:05:55 +0000), Build: jenkins-common_router_openwrt_ota_publish-383



DRAM:  smem ram ptable found: ver: 1 len: 4

512 MiB

NAND:  ONFI device found

ID = 1590aac8

Vendor = c8

Device = aa

qpic_nand: changing oobsize to 64 from 128 bytes

SF: Unsupported flash IDs: manuf ff, jedec ffff, ext_jedec ffff

ipq_spi: SPI Flash not found (bus/cs/speed/mode) = (0/0/48000000/0)

256 MiB

MMC:   sdhci: Node Not found, skipping initialization



PCI Link Intialized

PCI1 is not defined in the device tree

In:    serial@78B3000

Out:   serial@78B3000

Err:   serial@78B3000

Boot failure detected on both systems

machid: 8010010

MMC Device 0 not found

eth5 MAC Address from ART is not valid

write phy_id=1, reg(0x8074):0x0670

write phy_id=2, reg(0x8074):0x0670

write phy_id=3, reg(0x8074):0x0670

write phy_id=4, reg(0x8074):0x0670

bootwait is on, bootdelay=5

Hit any key to stop autoboot:  5  4  3  2  1  0 

 trigger button release!

Boot failure detected on both systems

boot from rootfs 1

  miwifi: check crash in rmem !  

ubi0: attaching mtd1

ubi0: scanning is finished

UBI init error 22

Erasing NAND...


Erasing at 0x680000 --  25% complete.
Erasing at 0x6a0000 --  50% complete.
Erasing at 0x6c0000 --  75% complete.
Erasing at 0x6e0000 -- 100% complete.

Writing to NAND... OK

resetting ...

IPQ807x# smeminfo
flash_type:             0x2
flash_index:            0x0
flash_chip_select:      0x0
flash_block_size:       0x20000
flash_density:          0x100000
partition table offset  0x0
No.: Name             Attributes            Start             Size
  0: 0:SBL1           0x0000ffff              0x0         0x100000
  1: 0:MIBIB          0x0000ffff         0x100000         0x100000
  2: 0:QSEE           0x0000ffff         0x200000         0x300000
  3: 0:DEVCFG         0x0000ffff         0x500000          0x80000
  4: 0:RPM            0x0000ffff         0x580000          0x80000
  5: 0:CDT            0x0000ffff         0x600000          0x80000
  6: 0:APPSBLENV      0x0000ffff         0x680000          0x80000
  7: 0:APPSBL         0x0000ffff         0x700000         0x100000
  8: 0:ART            0x0000ffff         0x800000          0x80000
  9: bdata            0x0000ffff         0x880000          0x80000
 10: crash            0x0000ffff         0x900000          0x80000
 11: crash_syslog     0x0000ffff         0x980000          0x80000
 12: rootfs           0x0000ffff         0xa00000        0x23c0000
 13: rootfs_1         0x0000ffff        0x2dc0000        0x23c0000
 14: overlay          0x0000ffff        0x5180000        0x1ec0000
 15: rsvd0            0x0000ffff        0x7040000          0x80000

I don't understand why I got the old partitions back, with rootfs and rootfs_1.
I'm 100% sure, I had the expanded rootfs before, I did confirmed it.