compiling modules for RH kernels
Bob Edwards
Robert.Edwards at anu.edu.au
Tue Jul 2 19:18:48 EST 2002
Duncan Roe wrote:
>
> 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".
>
Indeed, EXTRAVERSION in the top level Makefile is set to -21custom.
My problem seems to have been solved, however. My Makefile was including
/usr/src/linux/include, however, RedHat now put kernel sources into
/usr/src/linux-2.4/include. Changing the path in my Makefile seems to
have fixed the problem.
Thanks for the help all who responded.
Cheers,
Bob Edwards.
More information about the linux
mailing list