Re: Building external modules against objdirs

From: Sam Ravnborg
Date: Sun Jul 30 2006 - 13:49:17 EST

On Sun, Jul 30, 2006 at 06:46:07PM +0200, Andi Kleen wrote:
> Hi,
> It looks like building external modules against separate objdirs doesn't work
> anymore in 2.6.18.
I just tried it out with -linus (from a few hours ago).
$> cd ~/kernel/linux-2.6
$> mkdir ../o
$> make O=../o defconfig
$> make O=../o
$> cd ~/kernel/external
$> cat Makefile
obj-m := sam.o
sam-y := sam1.o
EXTRA_CFLAGS := -I$(src)/include

$> make M=`pwd` O=~/kernel/o -C ~/kernel/linux-2.6
make: Entering directory `/home/sam/kernel/linux-2.6'
LD /home/sam/kernel/external/built-in.o
CC [M] /home/sam/kernel/external/sam1.o
LD [M] /home/sam/kernel/external/sam.o
Building modules, stage 2.
CC /home/sam/kernel/external/sam.mod.o
LD [M] /home/sam/kernel/external/sam.ko
make: Leaving directory `/home/sam/kernel/linux-2.6'

So it seems to work out fine here.

Can you check that you really did a 'make prepare' in the relevant
output directory. Previously only the make *config step was needed.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at