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

Re: Packaging a Kernel module (i386 only)



On Tue, Dec 09, 2003 at 02:34:00PM -0500, David Z Maze wrote:
> Steve Kemp <skx@debian.org> writes:

> Is it a patch, or a module?  I'd expect that most things come as one
> or the other.

  It's purely a module, and can be built with the kernel headers
 installed.

> >     2.  Providing it in source form and expecting the user to build it,
> >        like the nvidia module.
> >     3.  Building on my machine to produce a binary x86 module, and
> >        making the binary package Depends: upon kernel-image-2.4.21-386
> 
> I'd say that recommended practice is to always produce a -source
> package, and to produce binary module packages if it's practical.  

  OK that seems reasonable.

> The -source package should contain only documentation and a tar file in
> /usr/src, which unpacks to a directory under modules/.  (So,
> /usr/src/foo.tar.gz contains modules/foo/.)  The unpacked source is
> then a valid Debian source tree which can be built with kernel-package
> ('make-kpkg modules-image'); see the kernel-package documentation for
> what this entails.

  I can manage that OK too :)

> Actually building modules for the stock Debian kernels takes some
> effort.  I have code to do it in the lm-sensors and i2c source
> packages, but it's currently disabled; you're welcome to borrow it.

  I'll take a look at it..

> It's unlikely that the current kernel will be removed; Debian readily
> supports having multiple kernels installed.  Installing a new kernel
> might or might not make that kernel the default, depending on boot
> loader configuration and whether the admin chooses to rerun LILO.

  I guess it's a simple matter of testing it and seeing what happens.

> ...in that case, then, you're almost certainly happier building a
> module specifically for the kernel(s) you're using.  Building a
> general module source package still might be convenient if you find
> yourself rebuilding kernels regularly; if you're building a kernel
> with kernel-package and you have packaged module source set up, it's
> just one more command to build all of the add-on modules.

  In general I stick to stock kernels.  On a few machines I've had to
 rebuild the image from source with a couple of patches.  (I have a
 machine with a webcam on it that I got working by patching the pwc.o
 file directly too - but we'll pretend I'd never do that ;)

  I think that I should be able to do what you suggest, make a source
 package and also make an image for the kernel(s) that I intend to use
 this on.  

  If I get the chance I'll make a modules/tpe archive too - but I think
 that I don't need to do that just yet.

  Thanks for the comments.

Steve
--



Reply to: