fabianishere / udm-kernel

Custom Linux kernels for the UniFi Dream Machine
https://github.com/fabianishere/udm-kernel-tools
Other
127 stars 10 forks source link

UDM SE #16

Closed CaptainRedHat closed 2 years ago

CaptainRedHat commented 2 years ago

Hey there, I love the work you've done on creating custom kernels for the UDM(Pro). However, I have a Unifi Dream Machine Special Edition. As far as I can tell from my limited research, the UDM SE is basically just a Debian linux box that's been configured as an appliance. Out of the box, it doesn't run containers like the UDM and UDM Pro do. It appears to run Unifi OS directly and runs the applications natively, installing them from .deb packages. Anyway, I need to compile the xt_HL.ko module for it which adds the TTL netfilter target, because I need to modify the TTL on my backup internet connection. I was able to obtain the GPL archive from ubiquiti for the 2.4.9 firmware. I attempted to use this repo to build a new kernel, but when I extracted the module from the created .deb archive, copied it to the UDM SE, and tried to load it, all I get is insmod: ERROR: could not insert module xt_HL.ko: Invalid module format. Any ideas on how to properly build this module? Can I just build the module itself or do I have to build a full kernel and load it?

fabianishere commented 2 years ago

You can just build the module you want from the kernel sources you received. Just make sure that the config exactly matches the config running on your UDM SE.

dmesg might give you more info as to why the module is not loading.

CaptainRedHat commented 2 years ago

You were absolutely right. I didn't have the correct version tag. [151991.984388] xt_HL: version magic '4.19.152 SMP mod_unload aarch64' should be '4.19.152-ui-alpine SMP mod_unload aarch64' After modifying the local version string in the .config to contain "-ui-alpine", it worked and the module is loading now. Thanks for your help!