How to compile just one kernel module?

Yes, kernel-ml can be considered as a “workaround”.

This is why I offered a second option: to ask ELRepo for a kmod package.

Kmod packages indeed provide “one kernel module” (some may include more than one). As a bonus, they survive kernel updates. Usually you’d need to rebuild the module for every kernel update. Thanks to the kABI-tracking nature, kmod packages usually work within a given EL minor release (el8, el9, etc). No need to reinstall.

Anyway, I went ahead and built the kmod-via-rhine package for you:

x86_64:
kmod-via-rhine-0.0-1.el8_6.elrepo.x86_64.rpm

src:
kmod-via-rhine-0.0-1.el8_6.elrepo.src.rpm

They should be available from ELRepo’s mirror sites shortly.

If you are interested in how to build a driver package for “one kernel module”, take a look at the src.rpm.

3 Likes