Adding OpenWrt support for Xiaomi AX3600 (Part 1)

@Ansuel , in commit "ipq807x: xiaomi-ax3600: correctly handle boot flag from uboot" why did you switch flag_ota_reboot to flag_boot_rootfs + flag_last_success + flag_boot_success in platform.sh?

Because I was able to switch partitions easily with flag_ota_reboot: when I installed OpenWrt over OEM firmware I flash the "other" partition only and set flag_ota_reboot to 1. After reboot OpenWrt booted.

Am I missing something?

from my understanding ota reboot is only something used by xiaomi...
the bootloader actually use the boot roofs and last succes and boot success to understand what partition to run.
also if they are not in a logical mode everything is bypassed and the second partition is loaded

we initially used the ota flag and discovered that the partition switching with sysupgrade with openwrt system was unreliable and actually very random.

Thanks. Btw, can users extract crypto firmware from official router firmware and put it inside openwrt? I think this could evade the NDA.

Yes, its easily extractable from the stock fw.
Unfortunately, crypto will cause the NSS FW to crash

1 Like

ah right my mistake.
I was looking at the wrong branch.

Thank you for the details!

Will try that sysupgrade! It just bricked for me now. :see_no_evil: :grinning:

On the long run, I'd like to add support in luci-app-advanced-reboot.

1 Like

Looks like the ECM high CPU load patch is already applied.
It's looking pretty good so far!

Yes, I merged it yesterday in the evening.

3 Likes

Hi,

could use a build hint: how to properly git pull AX3600-5.10-restart?
Each time I try, I get merge errors, but I don't change code, So far I only build the firmware.

        both added:      target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8072-ax9000.dts
        both added:      target/linux/ipq807x/files/drivers/hwmon/emc2305.c

P.S. Just FYI: had problems with (local) IP6 enabled (like often I didn't get an IP4 to my DHCP clients) but now, that I disabled IP6 completely (don't need it anyways), two routers work just fine extending an existing subnet with AX-WLANs, one serving DNS and DHCP for it.

# sync remote branch
git fetch origin AX3600-5.10-restart

# force current local branch to match remote one
# warning, this will discard all the modifications(except files in .gitignore) of current local branch
git reset origin/AX3600-5.10-restart --hard
4 Likes

I bricked my router: Quick question. I have serial access and want to boot the other partition with an intact system.

what are the commands from the boot loader menu for that? If I try
"IPQ807x# setenv flag_boot_success=0"
I get
Error: illegal character '='in variable name "flag_boot_success=0"

I believe the value in setenv is space separated, so replace the equal by a space.
Also, theoretically, it should switch the partition automatically after X failed boots.

1 Like

@Ansuel ECM doesn't crash anymore after I compile without PPPoE offload.
So the problem is now narrowed down to IPv6 PPPoE or Dual-stack PPPoE

Does it produce a stack trace?

1 Like

@robimarko mine produced an OOM after just 14 hours of uptime (rebooting the router every day at 04:30). When it happens, the router is still reachable, but no wifi and no internet even on the wired side. Just to keep this ath11k leak afloat :slight_smile:

Yeah, that is quite bad.
Honestly, I don't know how to properly debug that, ath11k is just so huge.

Which one is better: shitload of backporting, or debugging this? I have a feeling that OWRT will stuck on 5.10 for a relatively long time, so I am not sure we can avoid backporting anyway...

Backporting 5.13 ath11k is gonna need to happen anyway as QCN9074 which is used in AX9000 requires it.
I got it partly done, but backporting it caused the remoteprocesor driver to stop working and it looks like the MHI bus driver in 5.10 is not new enough also.

1 Like

that worked I was able to switch to the working one! Thx a lot!

Let me know if its pushed on your git, I am happy to give it a try.