Adding OpenWrt support for Xiaomi AX3600 (Part 1)

aaand it's really stupid..... upstream kernel already have offload api... so qca keep using they own ancient code that requires major kernel patch is not sane at this point....

for this exact reason reintroducing sfa logic doesn't make any sense since we already use the offload path of the upstream kernel.


(or they are starting using the ppe directly without using nss to set them up... )

Thanks!
It's looks like usb is ok


When i installed qsdk according to theirs tutorial i pressed:

nvram set flag_last_success=0
nvram set flag_boot_rootfs=0
nvram set uart_en=1
nvram set boot_wait=on
nvram commit

So i don't know what tu think anymore!

Thanks:
Nothing happens!

Might be, there is also a new nss-ppe repo

@robimarko our suspicion was right... looks like nss was actually doing some ppe stuff under the hood and now they just had the big idea of just dropping the nss complexity and just leave the kernel handle all the stuff... pathetic the thing that with now 4 soc based on the same damn switch they still didn't consider the idea of creating a correct dsa driver...

5 Likes

If you installed QSDK then that fiddles with the partitions and then running the Mi repair tool results in at least a soft brick. I think I've read somewhere (but may be completely imagining it too!) that the repair tool also resets uart_en back to the default of 0, but then I'd expect it to also reset boot_wait as well but your boot_wait still looks to be enabled.

There isn't any chance you accidentally hooked up something not 1.8V to the router's RX?

At this point unfortunately you look to have a hard brick and the only fix would be to reprogram the NAND, not such an easy job.

we should really understand how to enter the real recovery mode... we had some doubt ipq806x had this kind of mode... but ipq807x? 100% it does have it. It's based on ancient cpu stuff but still it's ""modern"" so qca must have put some kind of debug/flash way that are enabled with the first stage of boot. Problem is lack of any documentation but we should try and check if any of these recovery mode are present following how it's implemented in comparable qcom phones.

1 Like

No i measured and is 1.8 v!
It's strange!

In a perfect world yes, but as in the case of my bricked AX9000 with a borked DEVCFG partition, there is no logic in the boot sequence to try the identical DEVCFG_1 partition. The bootloader is fully aware DEVCFG is bad, and rather than think to try DEVCFG_1 it just gives up.

There may be JTAG, but on these consumer devices that's more an afterthought. I don't imagine Xiaomi put any effort in making these recoverable beyond the repair tool.

There is really little detail on the IPQ95xx, it would be extremely weird if they moved away from using NSS as the cores are still there.
Why would they use SFE again compared to the whole NSS ecosystem, maybe they have a big customer that doesnt want it or something.

IPQ807x has a USB recovery mode, but it requires tools that are under NDA and all of the DEVCFG, etc blobs

Mhhh i assume the tools are the same used by the phones... aka special cable with specific resistance. but rip for all the other tools. Also i assume for ax3600 no usb so someone has to search the pinout...

mhhh don't know the fact that they are working on ath12k (wifi 7) and probably them finally using more modern cpu makes me think they are just starting from scratch and dropping nss for good

No, the tools are just SW but are under NDA for whatever reason.
But it's pretty much meant for development as you need SW binaries that you would only have as the vendor.
Other than that you can use JTAG, but only scripts provided are for Lauterbach Trace32, otherwise you need to manually enable the DDR clock and some other basic stuff to be able to load the U-boot to memory and run it to flash whatever you need

Its hard to guess why QCA does stuff, I would be really like really surprised if they stopped using NSS.

I think these versions from a forum user have the modules you need:

I have an AX6 auto-bricked with uart off on the shelf waiting for a recovery method for a few months ago...

I have seen a interesting method with xiaomi AX6S (MediaTek) for get u-boot with UART enabled interrupting tftp recovery process a few days ago. I know it is other soc but I would try it. Since AX3600 firmwares do not have u-boot partition whitin I think the risk for get things worse is low...

Anyway this is just an idea I am not sure at all and if someone thinks that this is dangerous or anything, please tell me soon. (* I can not try this in my AX6 because it does not even start tftp recovery proccess.)

*Do not use openwrt images or anything else of AX6S thread, it is only about the tftp recovery proccess interruption.

when enabling the qca crypto device, qca-nss-drv is enabled by default. Is there any hint for me, how to get this compiled for 5.15? the old patch from @Ansuel for 5.10 doesn't work for me.

Thanks :slight_smile:

No this not work!

TFTP recovery log

restore_defaults is set, enlarge xqup detect time
detect button press, continue check 15 secs
detect button pressed 15 secs !
confirm to launch xq_upgrade !
cmd=dhcp

Net: MAC0 addr:28:d1:27:4d:43:cf
PHY ID1: 0x4d
PHY ID2: 0xd0b1
EDMA ver 1 hw init
Num rings - TxDesc:1 (0-0) TxCmpl:1 (7-7)
RxDesc:1 (15-15) RxFill:1 (7-7)
ipq807x_edma_alloc_rings: successfull
ipq807x_edma_setup_ring_resources: successfull
ipq807x_edma_configure_rings: successfull
ipq807x_edma_hw_init: successfull
board_eth_init: ipq807x_edma_init successed
eth0
ipq807x_eth_halt: done
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 up Speed :10 Full duplex
eth0 PHY2 up Speed :100 Full duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 Down Speed :10 Half duplex
eth0 PHY5 Down Speed :10 Half duplex
ipq807x_eth_init: done
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 7
*** Unhandled DHCP Option in OFFER/ACK: 7
DHCP client bound to address 192.168.31.101 (26 ms)
Using eth0 device
TFTP from server 192.168.31.100; our IP address is 192.168.31.101
Filename 'miwifi_r3600_firmware_5da25_1.0.17.bin'.
Load address: 0x44000000
Loading: *
Got TFTP_OACK: TFTP remote port: changes from 69 to 53558
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################

572.3 KiB/s
done
Bytes transferred = 28312508 (1b003bc hex)
ipq807x_eth_halt: done
LoadAddr=44000000 NetBootFileXferSize= 1b003bc
CRC verify success!
RSA signature verify success!
Erasing NAND...
Erasing at 0x6e0000 -- 100% complete.
Writing to NAND... OK
Upgrade xiaoqiang_version...
Upgrade root.ubi...
--- xq_flash_erase Erasing Nand...0x00a00000~+0x023c0000
Erasing at 0x2da0000 -- 100% complete.
--- xq_flash_erase Erasing Nand...0x02dc0000~+0x023c0000
Erasing at 0x5160000 -- 100% complete.
common/proc_xqimage.c xqimage_upgrade 541 start:0x440002ac,subh->flash_addr:0xff ffffff,len:0x1b00000
Erasing NAND...
Erasing at 0x6e0000 -- 100% complete.
Writing to NAND... OK
========Upgrade success!========
Erasing NAND...
Erasing at 0x6e0000 -- 100% complete.
Writing to NAND... OK

In which moment did you unplugged the router exactly?

I've tried different time!
1 when finished uploading
2 when begin to erase
But when repluge power begin countdown and i can't send any command
putty log
https://bit.ly/3OJSnLV

I see three erasing sections..

Erasing NAND...
Erasing at 0x6e0000 -- 100% complete.
Writing to NAND... OK
Upgrade xiaoqiang_version...
Upgrade root.ubi...
--- xq_flash_erase Erasing Nand...0x00a00000~+0x023c0000
Erasing at 0x2da0000 -- 100% complete.
--- xq_flash_erase Erasing Nand...0x02dc0000~+0x023c0000
Erasing at 0x5160000 -- 100% complete.
  • 0x6e0000 - This is erased three times, I do not know which partition is this
  • 0x00a00000 - rootfs
  • 0x02dc0000 - rootfs_1

I made mistake about one configuration. When i made a dump Ap mode i forgot to go on my main router and configure the dhcp within a range 2-254 . I used 2 to 220. And the ax3600 dump was 254. Thanks anyway sqrwv.

Because i am a noob my question is how can i install package for extra module like openvpn etc. ?? Can i install from ssh via console or via the opkg installer inside the menu of openwrt?