[PLUG] Building kernel module RPM for all kernel version in RHEL 6

Arun Khan knura9 at gmail.com
Mon Mar 10 13:02:29 PDT 2014

On Fri, Mar 7, 2014 at 7:40 PM, Abhijeet Kasurde
<abhijeetkasurde21 at gmail.com> wrote:
> I want to create a RPM package out of source tar file to support all
> kernel versions in RHEL 6.

> I have created a RPM-spec file for kernel 2.6.32-358 (RHEL 6.4), and
> it gives me working RPM. Now here is problem, when I install that same
> RPM on kernel 2.6.32-279 (RHEL 6.3), modprobe fails as .ko file goes
> in /lib/modules/2.6.32-358.el6-x86_64/extra.

As Sankarshan has pointed out, your module needs to be built for each
new kernel you install.

> What do I do to support all other kernel versions and kernel patches
> using this RPM ?
> Please give some hint to create unified build system ?

DKMS is an option <http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support>

CentOS Wiki on building modules - see DKMS section.

-- Arun Khan

More information about the plug-mail mailing list