Sunday, February 20, 2022

[SOLVED] How to distribute kernel modules using a RPM?

Issue

What is the recommended approach for distributing a kernel module using a RPM? Ideally, for portability, I would like the RPM to be able to build the modules against the running kernel's headers before installing.


Solution

I've used Dynamic Kernel Module Support or DKMS before to distribute a Linux driver targeting multiple kernel versions (2.6.31-37). DKMS itself is a collection of bash scripts that can automate both the building and rebuilding of a kernel module based on the current installed version of Linux. You can distribute drivers as either RPM or DEB files which contain the driver source, DKMS scripts, and optionally, binary versions of the driver tied to particular kernel versions.



Answered By - ctuffli
Answer Checked By - Mary Flores (WPSolving Volunteer)