Re: [PATCH 0/2] kbuild updates

From: Martin Schlemmer
Date: Mon Jun 21 2004 - 17:31:39 EST


On Tue, 2004-06-22 at 00:33, Sam Ravnborg wrote:
> On Sun, Jun 20, 2004 at 11:26:54PM +0100, Alistair John Strachan wrote:

> > Sam's point is that unless you ask KBUILD to put the kernel build in a
> > separate directory to its sources (this is not the default
> > behaviour), /lib/modules/`uname -r`/build will still point to the mixture of
> > source and build data, therefore no breakage will occur.
>
> Correct!
>

> > Sam, maybe if there was a way to easily detect whether a kernel had been build
> > with or without a different output directory, it would be easier to have
> > vendors take this change on board. For example, I imagine in the typical case
> > whereby no change in build directory is made, you will have something like
> > this:
> >
> > /lib/modules/2.6.7/build -> /home/alistair/linux-2.6
> > /lib/modules/2.6.7/source -> /home/alistair/linux-2.6
> >
> > Whereas when O is given, it will instead be like this:
> >
> > /lib/modules/2.6.7/build -> /home/alistair/my-dir
> > /lib/modules/2.6.7/source -> /home/alistair/linux-2.6
> >
> > I presume that checking for the existence of /lib/modules/`uname -r`/source
> > will be enough.
> >
> > #
> > # where's the kernel source?
> > #
> >
> > if [ -d /lib/modules/`uname -r`/source ]; then
> > # 2.6.8 and newer
> > KERNDIR="/lib/modules/`uname -r`/source"
> > else
> > # pre 2.6.8 kernels
> > KERNDIR="/lib/modules/`uname -r`/build"
> > fi
>
> Look ok.
>

Yeah, understood, and already seen as the solution.

I guess I just wanted to try and prevent breakage to _existing_
projects, and the need for another hack to try and figure out
how to build for 2.6 (2.6 has been a bumpy ride in external
module building regards =).

But I guess it will not happen, so rather now then much later
when 2.6 is in much wider use ... :-)


Thanks,

--
Martin Schlemmer

Attachment: signature.asc
Description: This is a digitally signed message part