Hi,
I'm trying to port OpenWRT to a new device based on AR9341, but I've encountered a problem. The kernel boots, however at some point it hangs. Below I paste the moment when this happens.
After about 30 seconds a reset occurs (probably by watchdog).
Has anyone encountered such a problem and knows how to solve it?
Additional information:
I also tried to port OpenWRT to a new device based on QCA9533, in this case it succeeded for version 23.05.3 - OpenWRT worked fine. When I decided to upgrade to version .4, it also stopped working at the same point.
In both cases I am using the latest stable U-Boot 2024.7, which I ported myself to make it work properly.
The model is MT02 no-name brand.
I wanted to post everything on my github, but only after I test everything and it works.
Also, this model (MT02) is common to QCA9533 and AR9341.
Externally they are no different, only after opening the case you can see the difference.
This is the cheapest repeater you can find on AliExpress, and since it has potential after modification (changing from 8MB to 16MB flash), I wanted to add support for it in OpenWRT.
I think I can further add that only the squashfs-sysupgrade image wants to boot, the initramfs-kernel version does not boot, there is only the error "lzma compressed: uncompress error 7".
These repeaters are manufactured from recycled parts, making the ART rather random, i.e. it contains data from the device from which they obtained it.
I managed to find the MAC offsets, as I wrote for QCA9533 OpenWRT version 23.05.3 worked fine, but now it does not work.
It's probably best, though, if I upload everything to github and then maybe it will be easier to find the problem.
Ok, I uploaded all the changes I created to my repository. I hope it will be easier to solve the problem now. For the moment we are focusing on the version with AR9341.
I did some more testing and on the latest snapshot it also hangs at the same moment.
Since for two different versions the problem occurs at the same moment and manifests itself in the same way, maybe the cause lies in the configuration?
In the original firmware that ran on it from the factory (an old LEDE version), the events in the log for that moment are as follows:
It would be helpful if someone with an AR9341-based device would try running version 23.05.4 or better yet a snapshot and let me know if it works and what the bootlog looks like.
Further insights:
If we disable eth0 in the DTS, then errors related to this interface do not appear, so it is admittedly not ideal, but in this case the WAN port is not physically accessible anyway.
So it seems that this is not the reason for the hanging.
After removing the PPP-related packages, the hanging continues, only the last line written out becomes: [ 17.551501] Backport generated by backports.git v6.1.97-1-29-gf1d24a3683b2
Can someone help me identify the problem more precisely?
I managed to find a “solution” to the problem: in DTS you need to disable wmac, then booting will not crash.
Of course, a new problem arises - no WiFi. To fix this problem, you would have to check more carefully in the kernel and patches what can cause it, because it affects not only AR9341, but also QCA9533.
It is possible that this problem also affects other SoCs, but I have no way to check this.
I think this could be the reason for mass bricking of routers by OpenWRT in the future, so it's worth someone taking a deeper look into it. I, unfortunately, don't have any more time to do so.
Thank you for your suggestions, in the end it turned out that the culprit of all the problems was U-Boot, or rather bugs in the implementation of AR934x support in U-Boot. I managed to fix them and OpenWRT is now working properly.