Adding OpenWrt support for Xiaomi AX3600 (Part 1)

I am also waiting for an official build. According to
https://aisoa.cn/post-3144.html progress is more than working ethernet ports.

4 Likes

Maybe @robimarko or @Ansuel can comment on the progress. I check their github regularly, but I don't see any relevant commits for this HW (or IPQ807x in general).

1 Like

No progress at all, I have no free time currently due to a lot of overtime at work.

3 Likes

No problem :slight_smile:

Thanks for the feedback.

Take care

Chinese rom...Did you use this? how does it perform?

I am sure it is BS. It is not mentioned a lot on chinese forums as well.

I have heard about gituser LGA1150 on this forum several times, don't remember if it was in positive or negative, maybe expert member know more about it. For us, only way to find it out is to flash and try it ourselves. The github of LGA1150 is https://github.com/LGA1150/openwrt/tree/exp . If some other team is working on it, we can support their effort too, because we are only interested in the end results about OpenWrt support on AX3600, doesn't matter which country it is coming from if it is safe and perform well.

No... I was just replying to the latest discussion

Did someone manage to run qsdk firmware for ipq807x - for AC04 board based on openwrt 15.05.1? As far I can see vendor is using same kernel as in qsdk (4.4.60), but newer openwrt-18.06 as base
I've manage to successfully build images based on git (https://github.com/OpenWrt-Actions/Qualcomm-IPQ8074) , however due to lack access to serial console I can't test it - it might be good starting point.
https://drive.google.com/drive/folders/1as5wfBoyKKTxavJaUlbvZaoyfwkrDAdk?usp=sharing

1 Like

I just saw that Linux Kernel 5.11 was released. Maybe this can help in our journey !

I saw also that the github of LGA1150 (https://github.com/LGA1150/openwrt/commits/exp) has many commits, they are working hard.

@LGA1150 any progress on OpenWrt and AX3600 ?

Thanks :slight_smile:

1 Like

There is a lot of commits, but barely any IPQ807x related.

1 Like

LGA1150 said that he had everything working on his builds some posts up but I'm not sure if anyone here has actually tested them though.

1 Like

I think no one tried at the moment

I tried to build the LGA1150 version (exp branch).

I can boot the initram image. But, there is no network at all. I have no idea how to enable ethernet or wifi. If I try to build the ath11k drivers, there is an error.

ERROR: module '/home/dl3it/Work/openwrt.ax3600/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-5.10.16-1/drivers/net/wireless/ath/ath11k/ath11k_pci.ko' is missing.
make[3]: *** [Makefile:555: /home/dl3it/Work/openwrt.ax3600/bin/targets/ipq807x/generic/packages/kmod-ath11k-pci_5.10.16+5.10.16-1-1_aarch64_cortex-a53.ipk] Error 1
make[3]: Leaving directory '/home/dl3it/Work/openwrt.ax3600/package/kernel/mac80211'
time: package/kernel/mac80211/compile#0.55#0.32#0.74
    ERROR: package/kernel/mac80211 failed to build.
make[2]: *** [package/Makefile:114: package/kernel/mac80211/compile] Error 1
make[2]: Leaving directory '/home/dl3it/Work/openwrt.ax3600'
make[1]: *** [package/Makefile:108: /home/dl3it/Work/openwrt.ax3600/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/dl3it/Work/openwrt.ax3600'
make: *** [/home/dl3it/Work/openwrt.ax3600/include/toplevel.mk:230: world] Error 2

Maybe someone can give me some hints what needs to be imported/patched/added/enabled to enable basic networking.

I read on the thread a little ago that a special dev kit from qualcomm is necessary
I'm not sure sorry

I managed to build @LGA1150's branch with a few additional patches last week, but I haven't tested it yet because I don't have equipment to get serial access and I'm not sure if the image will boot at all and I didn't want to brick the device (I'm gonna buy a Bus Pirate v4 as soon as I can find one for sale, seems to be out of stock almost everywhere).
He seems to have fixed many ipq807 specific things, but I'm not sure how he built it since there were some critical parts broken in his code (especially ath11k PCI support etc.), so take this build with a grain of salt.

In order to fix the issue that @dl3it is dealing with, the fix is simple:
ath11k_pci.ko will not be built without CONFIG_MHI_BUS=y and CONFIG_QRTR_MHI=y in target/linux/ipq807x/config-5.10

The following pastebin contains my git diff with the other changes I had to apply:

On top of this, you will see a failure related to ath10k-ct and/or ath10k-ct-smallbuffers. You need to scroll up this thread and there's a patch that robimarko posted, basically you need to change uninitialized_var(hw_params) to *hw_params and resume the build. Or just add the patch separately in the patches dir. Everything else builds smoothly in 10m or so on my laptop.

This is my .config:

I enabled a lot of things and unfortunately my image is almost 80MB so it won't fit on the stock partition (max 35M). I tried to flash it with mtd write and it failed, I've been busy and didn't have time to rework the config to shrink it, it's on my todo list. I'm not sure why we're using the wireguard-compat module when the in-tree wireguard could be used. I had that building also with some changes to the wireguard meta-package, but let's get this working first, I guess.

I hope this helps you guys build this and we can finally get OpenWRT working!! I've been waiting and poking at this for months.

I managed to build the stock qsdk that Xiaomi ships (with kernel 4.4.60), built the wireguard module and its dependencies, loaded the wireguard.ko module successfully on the stock Xiaomi CN firmware, but as soon as you use wg show or any interface-related call, the kernel panics. Additionally, no traffic is passing through the wireguard interface (txquelen shows 1 and 1 error.), which is why I started looking at LGA1150's branch.

6 Likes

thanks @bitthief :slight_smile:

With the information you provided, I could build an image.
Wired Ethernet is still not working, Wifi sometimes comes up. But only 5GHz... I could log in, Luci is working (basic stuff), ssh and so on works. I did not get ax working; only ac.

Anyway, I can see that things start to improve :+1:

Which repository is the most active at the moment ? There are some gits available, but the LGA1150 was the first one where I succeeded to build an image.

4 Likes

Well, for the wired part I believe that @Ansuel has made it work at least in a basic state, as for the ax, openwrt support should come anytime since the patch was already submitted.

Does the 5ghz work well? No errors in logs? Or something?

about wired i ported the needed driver from qsdk but we still have not managed to understand why it doesn't work. It seems packet doesn't comunicate with the cpu for some acl rules...

The question is, can it be the ethernet driver instead of the switch driver?
I'm sorry if I'm asking dumb questions, just trying to stir things up :sweat_smile::sweat_smile::sweat_smile: