beta-tester
Posts: 1332
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

DKMS to recompile customized kernel automatically?

Sat Jan 25, 2020 10:14 am

hello,
i have dkms installed on my RPi (Raspbian Buster) to automatically recompile a kernel module/driver for my wlan adapter, when a new kernel arrives (via "apt upgrade").

now i want to cusomize and recompile the kernel by itself by changing some kernel options for my PPS project.
but i don't like, that is have to change the options and recompile the kernel by hand, every time a new stock kernel arrives...
but i also want to stay up to date with the kernel...

so i am wondering, if i can use dkms to change, recompile and replace the stock kernel with my customized kernel automatically every time a new stock kernel arrives...

if it is possible, does somebody know how to do it ?

PS.: didn't add the wlan kernel module i use to dkms by myself.
there was a script at the module source to do the necessary things - so i have no idea how the dkms works and what the requirements are.
{ I only give negative feedback }
RPi B (256MB), B (512MB), B+, ZeroW; 2B; 3B, 3B+; 4B (4GB)

Kendek
Posts: 143
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: DKMS to recompile customized kernel automatically?

Sat Jan 25, 2020 10:58 am

DKMS (Dynamic Kernel Module Support) cannot reconfigure and recompile the Linux kernel.
Depending on what you change in the .config, you need to compile the whole kernel or just the extra kernel module(s). You can write a script to do it all in one step, but compiling the kernel takes about an hour (on RPi), so it's better to always start it manually.

Return to “Advanced users”