Skip to contentSkip to conversation

drbd kernel module makefile

Drbd-dev Philipp Hug 2 participants 2 messages Oct 19, 2004 DRBD driver

lore
Share & tools
lore
#0 lore raw

Is there a reason, why the drbd module Makefile calls "make module" from the kernel-source instead of just compiling itself with the header files from $(KDIR)/include?

this makes it quiet inconvient to use it with module-assistant (debian tool, to build kernel-modules from their source packages) because you need to have the complete source with correct config installed instead of just using the kernel-header modules...

in debian you can just do the following:
m-a install cloop

philipp

maintainer
#1 lore raw

/ 2004-10-19 16:36:00 +0200
\ Philipp Hug:

Quoted 3 lines

Is there a reason, why the drbd module Makefile calls "make module" from the kernel-source instead of just compiling itself with the header files from $(KDIR)/include?

because we want to be able to support as many kernel flavours and archs as possible. this is the kernel way to do build external modules, see Documentation/kbuild/modules.txt.

Quoted 4 lines

this makes it quiet inconvient to use it with module-assistant (debian tool, to build kernel-modules from their source packages) because you need to have the complete source with correct config installed instead of just using the kernel-header modules...

drbd is just happy with (preconfigured) kernel-headers, or at least it should be. to be able to build external modules against preconfigured kernel-headers, they should of course include the Makefile and neccessary scripts, with more recent 2.6 kernels even some more stuff. but they do, typically, because if they don't, they are pointless. [this works pretty well for me on a SuSE box]

Quoted 2 lines

in debian you can just do the following:
m-a install cloop

well, provided you have your (preconfigured) kernel headers in $KERNEL_INCLUDES,
you with DRBD you can just do
make KDIR=$KERNEL_INCLUDES -C drbd
and it should just work.

I'm sure you can figure out how you do this the debian way.

lge