With OpenWrt making it as a “builtin” is supposed to cause the package to be in the rootfs of the image. Compiling it as a module is supposed to compile it as an installable package. It doesn’t matter what I select, in either case the image builds but the actual kernel modules are absent. I get a package file, but it is empty in either case:
It’s the only repo I know of that has the standalone (not in-tree) MT6625 driver set up as an OpenWrt package. Do you know any other location for the out-of-tree driver?
The in-tree version will require a lot more work to port into an OpenWrt package.
i’m not sure it was ever working…afair it was only a try…there was a repo imho from @abbradar that added the driver. but all sources are for older linux-versions an may not compile due to api-changes.
so imho it’s better to add the version i have in the kernel repo to a patchfile in openwrt to patch kernel directly (in-tree)
maybe you can look in my openwrt repo, and adapt the way to include newer driver version. But if this source creates empty package i guess it’s broken anyway
Yes, I’ve already been working on this in parallel, but OpenWrt doesn’t make this easy.
I have got this driver into the tree and got it to build, but I can’t test it. OpenWrt’s cfg80211 driver causes a kernel panic when it is built with the “Testmode command support” that this driver requires. Even if I take a vanilla OpenWrt 21.02.2 pull, use their configuration and make the sole change of enabling the cfg80211 driver’s testmode support it causes a kernel panic when loaded.
So I am working on debugging OpenWrt’s cfg80211 before I can test this out.
The way OpenWrt is designed at the moment you cannot have wireless drivers in the Linux tree because all cfg80211 and mac80211 are built using out-of-tree backports. You will have to build the driver as out-of-tree module and using cfg80211 headers from backports rather than Linux sources.
See mt76 package for an example how to do that in principle (obviously the driver sources as well as build-system will need some changes for that to work).
And well, yes, the build system is a mess and generating the wireless backports using semantic patches and all that is quite a science for itself…
Thanks for the advice. I’m doing ok with the actual driver porting. I’m still fighting with the build system, but at least I have something that compiles. I’m only three symbols short of it actually loading, so I think I might have something in the next day or two.
My biggest issue now is that there is clearly a bug in OpenWrt’s cfg80211 module as they supply it. If I take a vanilla 21.02.2 build, make the sole change of checking “Enable Testmode Command Support” for kmod-cfg80211 (which is something the mt6625 driver needs) then any time I load any other working wireless driver the cfg80211 module oopses and causes a kernel panic. There is clearly something wrong in their backports, and that is where I’m going to have the biggest problem debugging.
you could try dropping testmode depency…i guess it’s not really needed, only defined in Kconfig. maybe some code needs to be disabled. imho driver should be working without
On the OpenWrt menuconfig under Kernel Modules->Wireless Drivers->kmod-cfg80211
Yes, CONFIG_PACKAGE_CFG80211_TESTMODE. The mt6625 driver complains during compilation if testmost isn’t turned on
Probably. I haven’t looked yet at why the mt6625 driver needs it. If it looks like I’m not going to be able to get testmode to work in OpenWrt then I’ll look at figuring out why the driver needs it and seeing if I can eliminate that need.