[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: So just how are out of tree kernel modules supposed to work now?



On Mon, 2009-04-13 at 17:55 -0400, Lennart Sorensen wrote:
> On Mon, Apr 13, 2009 at 09:13:50PM +0100, Ben Hutchings wrote:
> > On Mon, 2009-04-13 at 14:52 -0400, Lennart Sorensen wrote:
> > > I am starting to think that debian has completely broken support for
> > > compiling out of tree kernel modules as of 2.6.29 now.
> > > 
> > > It used to be, that if you needed to know if a certain function used one
> > > style or another, then you could do a compile test against the kernel
> > > headers and see if it worked or not, and try until you found the style
> > > that worked with the given kernel version.  With the removal of the
> > > symlinks in 2.6.29, this is no longer possible.
> > [...]
> > 
> > You need to use kbuild for the compile test.
> 
> Hmm.  I wonder how one could do that without creating hundreds of
> directories and makefiles.  Are there any examples of projects doing
> things that way yet?  Can you call kbuild for a single module or actually
> just a single file to see if the .o would be created?

Make a temporary directory, generate a trivial makefile and source file,
test-compile those, then remove the temporary directory.  Wrap that up
in a function which you call for each of your compatibility tests.

This has been used successfully in version 2.3 of the sfc network driver
(though we do also have file tests which I'll need to change).
Unfortunately that hasn't been publicly released yet so I can't point to
it.

Ben.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: