public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Building external modules against objdirs
@ 2006-07-30 16:46 Andi Kleen
  2006-07-30 17:51 ` Sam Ravnborg
  0 siblings, 1 reply; 11+ messages in thread
From: Andi Kleen @ 2006-07-30 16:46 UTC (permalink / raw)
  To: sam; +Cc: linux-kernel, agruen


Hi,

It looks like building external modules against separate objdirs doesn't work 
anymore in 2.6.18.

tmod is a simple module I use for some testing.

obj-* are objdirs tree built against separate source with make O=$(pwd) -C ../linux-...

> cat Makefile 
obj-m := tmod.o

KERNELDIR := /lib/modules/`uname -r`/build

all:
        $(MAKE) -C ${KERNELDIR} M=`pwd`

With 2.6.17 it works great:

> make KERNELDIR=/home/lsrc/obj-2.6.17
make -C /home/lsrc/obj-2.6.17 M=`pwd`
make[1]: Entering directory `/home/lsrc/obj-2.6.17'
make -C /home/lsrc/linux-2.6.17 O=/home/lsrc/obj-2.6.17
  Building modules, stage 2.
  MODPOST
  CC      /home/andi/tsrc/tmod/tmod.mod.o
  LD [M]  /home/andi/tsrc/tmod/tmod.ko
make[1]: Leaving directory `/home/lsrc/obj-2.6.17'


But with 2.6.18-rc3 it doesn't work anymore. I saw this for at least a few weeks already
with 2.6.17-git*, but only realized now it wasn't some stupid mistake on my side.

> make -C /home/lsrc/quilt/obj M=`pwd`
make[1]: Entering directory `/home/lsrc/quilt/obj'
make -C /basil/home/lsrc/quilt/linux O=/basil/home/lsrc/quilt/obj
/home/lsrc/quilt/linux/Makefile:456: *** kernel configuration not valid - run 'make prepare' in /home/lsrc/quilt/linux to update it.  Stop.
make[2]: *** [_all] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/lsrc/quilt/obj'
make: *** [all] Error 2

Is there a workaround? It would be good to fix it for 2.6.18 because it will
likely cause trouble for a lot of external projects.

-Andi

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-08-01 19:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-30 16:46 Building external modules against objdirs Andi Kleen
2006-07-30 17:51 ` Sam Ravnborg
2006-07-30 17:49   ` Andi Kleen
2006-07-30 18:31     ` Sam Ravnborg
2006-07-30 18:37       ` Andi Kleen
2006-07-30 19:17         ` Sam Ravnborg
2006-07-30 20:06           ` Andi Kleen
2006-07-31  9:39           ` Roman Zippel
2006-08-01 19:42             ` Sam Ravnborg
2006-07-30 18:34     ` Sam Ravnborg
2006-07-30 18:42       ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox