Re: Maintaining kernel module packages?
On Sat, May 19, 2001 at 08:24:45AM +1000, Herbert Xu wrote:
> David Z Maze <dmaze@debian.org> wrote:
>
> > I was under the impression that kernel-headers-x.y.z wasn't sufficient
> > to build a module. Is it in fact enough to use the kernel headers to
> > build the kernel modules from the source package? How? (It doesn't
> > seem like 'make-kpkg modules' would work here.)
>
> If your module requires something outside include/ to compile, then it is
> broken and should be modified so that this is not the case.
Several packages compile modules using:
make -C $(LINUXDIR) SUBDIRS=$(shell pwd) modules
This is the easy/common method to compile modules that _always_
works, because it guarantees that you get the same toolchain,
.config, compiler flags, etc. I have yet to see any other method
that works this well.
(That being said, I use a different method for Comedi, RTAI, and
RTnet, since I need additional Makefile rules, and I don't
expect it to work on very many architectures yet.)
Can you describe a method to get the correct .config, Rules.make,
scripts/mkdep (if you use it), architecture, cross-compilation
prefix, toolchain, etc., from the header files? I'm at a loss
to find anything other than a very trivial situation (i386, UP,
CONFIG_MODVERSION=n, non-buggy toolchain) where you can compile
kernel modules from just the header files. Yes, some modules
will work in some situations.
Please consider downloading a few packages that build kernel
modules external to the kernel and look at the various methods
used. Once you understand _why_ they do what they do, you may
change your mind about they way kernel headers are packaged.
dave...
Reply to: