Re: [PATCH] fix detection of kernel source directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> kernelsourcedir=${kerneldir%/*}/source
This is incorrect when using an out of place build tree. For example if
my build directory is..

/lib/modules/2.6.20/build
then this will end up as /lib/modules/2.6.20/source which is correct.

But if I build my kernel out of place in /home/compile/linux/2.6.20
Then this will end up as:
/home/compile/linux/source

Obviously the kernel source directory here.

However the kernel build scripts do create a symlink inside of my build
directory called source that points at the kernel sources, so the
correct and simple solution would be:

kernelsourcedir=kerneldir/source

Which is simpler than my patch.

Don't you also build your kernels out of place? I thought it was fairly
standard practice to do "make O=<build dir>" from your kernel source
directory to avoid the source and build objects getting mixed up?

On Mon, Jun 08, 2009 at 11:49:17AM +0300, Avi Kivity wrote:
> Jan Kiszka wrote:
> > James Pike wrote:
> >   
> >> Fix detection of kernel source directory when it is different to build
> >> directory.
> >> Signed-off-by: James Pike <james@xxxxxxxxxx>
> >>
> >> diff --git a/configure b/configure
> >> index e01ba98..c3b7a5f 100755
> >> --- a/configure
> >> +++ b/configure
> >> @@ -91,7 +91,7 @@ arch=${arch%%-*}
> >>  
> >>  # see if we have split build and source directories
> >>  if [ -d "$kerneldir/include2" ]; then
> >> -    kernelsourcedir=${kerneldir%/*}/source
> >> +    kernelsourcedir=`readlink -f $kerneldir/source`
> >>  fi
> >>  
> >>  if [ -n "$no_uname" -a "$want_module" ]; then
> >>     
> >
> > So far I can't reproduce any problem that the above could fix, but maybe
> > Avi sees why we need it and that it doesn't regress elsewhere.
> >
> >   
> 
> I don't.  James, what triggered this?
> 
> -- 
> error compiling committee.c: too many arguments to function
> 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux