I am experimenting with flashcache on my Ubuntu and it looks interesting enough to do a long term test with it. I downloaded the sources, compiled them and installed the resulting kernel module. So far so good.But once I update my Operating System and a new kernel is installed, the module needs to be recompiled for the new kernel and installed in a different path.I am sure this can be done automatically, but I don't know how. Whenever I update the kernel on my system, serveral modules are automatically compiled (amongst others the virualbox modules).How can I automatically recompile a manually installed kernel module upon upgrading my kernel package? I basically need some hook that does the make and make install stages for flashcache during an apt-get upgrade.
Automatically build a manually installed kernel module upon installing a kernel update on Ubuntu
ubuntu;upgrade;kernel modules
The usual way is to use DKMS (initially developed by Dell to support specific drivers for their servers under Linux). Even nVidia has now an integration of their graphic-card-driver with DKMS - that driver needs to be recompiled with every kernel-update, too.