-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom kernel not loading on UDM #30
Comments
I have had someone else having a similar issue with the UDM Base model due to the drivers for the WiFi hardware not working with the custom kernel you have installed. To verify this, could you please run the following command from UbiOS and not UniFi OS (this means SSHing directly into the UDM, you can verify it by checking the cat /sys/fs/pstore/* What is your use-case for installing the custom kernel? In this other case, the user only needed IPTV, so I compiled a custom kernel with multicast routing enabled, which did work for him. |
Thank you for the quick response. My use case is to run wireguard in kernel mode. See below for the log.
|
You might find this project useful: https://github.com/tusc/wireguard-kmod |
Hi, Sorry, I initially posted this in the wrong bug, it fits better here: I'm having the same issue. I've even tried compiling the stock kernel (and used GPL sources direct from unifi and the config direct from the UDM) to see if it was a something here that was causing the error, but seems to be some form of bug. I've tried building using GCC 6.4.0 (the same compiler used to build the stock kernel) and I have the same error. Unfortunately, it seems the rlt_wifi driver is not open source, instead it's one created by the manufacturer (mediatek), although an old, GPL version of the module seems to be available on github (https://github.com/openwrt/mtk-wifi-gpl), I've not been able to acquire the driver directly from mediatek although I'm not sure to what extent I'd be able to if I asked, nor am I sure of how the UDM could be told to load it.
Over the next few days I'll try recompiling with kernel debugging enabled to see if that sheds any more light :) |
One solution I could think of is using the open-source mt76 driver. This one is also available in more recent Linux versions, though I don’t know how well it works. |
I've tried with that built into the kernel, but it doesn't seem to work as the rlt_wifi module still tries to load. I could try and blacklist the rlt_wifi module, and I'll try that, but there is clearly something going on and it would be preferable for the rlt_wifi module to work. |
Yes, that’s the approach I was thinking of. Alternatively, the only way I expect it to work is to obtain the corresponding kernel sources for the firmware you are running, and use that to build a custom kernel. What version are you currently running? |
1.11.0 - I've obtained the corresponding kernel sources for that firmware from ubiquiti and built the kernel using them and the stock config - I got the same error (one of the first things I tried). I've not yet tried the stock kernel sources, stock config and GCC 6.4.0 but that's next on my list of things to try (after that I'll try blacklisitng rlt_wifi). |
The only way I imagine these errors happening, is due to ABI differences between the kernel and the kernel that the module was built for. It could indeed be the case that a different compiler version may result in ABI changes. |
Hi, After a bit of a nightmare building an ancient toolchain, cross compiling using:
Has worked using the GPL sources and config released by unifi and manually compiling (I also used /proc/config.gz from my UDM and added forced module loading as the only config option), I use gentoo (so used crossdev and manually created ebuilds for the old versions), but ymmv with other operating systems. I'm going to do a bit more experimentation to see if I can get the edge config options to work. gcc has this patch applied: To work with gentoo's naming conventions, and If the github runner could use the same versions of binutils, gcc and glibc as the kernel was compiled with I'm hoping it shouldn't cause any incompatibilities with binary kernel modules. the version of GCC that was used can be found by running
GLIBC by executing
Binutils was in the |
Having played around I've now built several kernels using the GPL sources provided by unifi for firmware v1.11.0-23 (or here for just the kernel), they sent them to me in a google drive link, but you can obtain them yourself by emailing [email protected], should you not wish to download from my website they were pretty quick at sending them.
firstly the stock kernel - this is using the secondly the edge3 releases (with and without the bpf changes from fabianishere/udm-kernel/pull/6) - this is using I've also built stock-udm-bpf - It therefore looks like the issue has something to do with one of the options enabled in the edge config. I will be moving through them systematically when I get a chance! |
Installed the tool and the kernel on UDM (not Pro), and then try to boot the custom kernel.
After reboot, it still runs the stock kernel. Tried multiple times, no luck.
Troubleshooting
The text was updated successfully, but these errors were encountered: