compiling modules for RH kernels

Duncan Roe duncanr at optimation.com.au
Tue Jul 2 13:53:23 EST 2002


On Tue, Jul 02, 2002 at 10:29:17AM +1000, Bob Edwards wrote:
> 
> I'm hoping that there might still be some out there who know a bit
> about Red Hat kernels :-).
> 
> I am trying to compile a locally developed module to work with a
> kernel compiled from Red Hat Source RPM. The kernel I want this
> module to work with is identified as "2.4.9-21custom" (the custom
> bit on the end is something that a Red Hat kernel patch applies
> to any kernels compiled from Red Hat sources, but not by Red Hat).
> 
> I am trying to compile my module from outside the kernel tree.
> 
> It always seems to want to be for a "2.4.9-21smp" kernel (if I
> compile on a machine with that kernel running), or "2.4.9-21"
> if I compile on a machine actually running the 2.4.9-21custom
> kernel.
> 
> Can anyone give me any pointers as to how to explicitly set the
> kernel version I want this module to work with, short of editing
> include/linux/version.h or include/linux/module.h?
  ^^^^^^^^^^^^^^^^^^^^^^^    ^^^^^^^^^^^^^^^^^^^^^^^

I don't think you want to change these files. If you change the top-level
makefile at about line 4 "EXTRAVERSION = ...", version.h will be remade.

I would expect EXTRAVERSION is currently set to "-21custom" or "-21smp".

> 
> Cheers,
> 
> Bob Edwards.
> 
> 
Cheers ... Duncan.





More information about the linux mailing list