I have a 3rd party library which provides a kernel module (
module.ko) and is required to be loaded automatically on bootup. However,
module.ko is not tied to a specific version of the Linux kernel and can work across many versions.
Note I do not have the source for
module.ko; it comes precompiled.
I am creating an RPM package for this 3rd party library and therefore creating a SPEC file.
My first approach was to use
lib/modules/$(uname -r) to automatically load
module.ko on bootup. This works fine; however, I do not want to have to reinstall my package every time I upgrade the Linux kernel. This is because, in the SPEC file,
module.ko is copied to
$(uname -r) is the current kernel version.
The second approach is to create a service that loads the kernel on bootup using
insmod. This avoids
modprobe altogether, as
modprobe requires the kernel to be copied to
My question is whether the second approach is the only way to achieve this, or if there is a better one?