Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to distribute kernel modules using a RPM?

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.

like image 392
zer0stimulus Avatar asked Jan 01 '12 17:01

zer0stimulus


People also ask

How do you unload a kernel module with its dependencies?

To unload a kernel module, we use the rmmod (remove module) command.

What is the difference between insmod and modprobe?

insmod is similar to modprobe: it can insert a module into the Linux kernel. Unlike modprobe, however, insmod does not read its modules from a set location, automatically insert them, and manage any dependencies. insmod can insert a single module from any location, and does not consider dependencies when doing so.


1 Answers

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.

like image 179
ctuffli Avatar answered Sep 30 '22 01:09

ctuffli