On Sun, 2011-02-20 at 13:52 +0100, Brice Goglin wrote:
> Le 15/02/2011 04:33, Debian Bug Tracking System a écrit :
> >> Hello,
> >> > 
> >> > linux-headers-2.6.37-trunk-common misses scripts/basic/Makefile.
> >> > This file is needed by scripts/Makefile.build. For instance,
> >> > it breaks "make kernelrelease" which makes external module build
> >> > harder.
> >> > 
> >> >  $ make kernelrelease -C /lib/modules/2.6.37-trunk-amd64/build
> >> >  make: Entering directory `/usr/src/linux-headers-2.6.37-trunk-amd64'
> >> >  /usr/src/linux-headers-2.6.37-trunk-common/scripts/Makefile.build:44:
> >> >   /usr/src/linux-headers-2.6.37-trunk-common/scripts/basic/Makefile: No 
> >> > such file or directory
> >> >  make[4]: *** No rule to make target 
> >> > `/usr/src/linux-headers-2.6.37-trunk-common/scripts/basic/Makefile'.  
> >> > Stop.
> >> >  make[3]: *** [scripts_basic] Error 2
> >> >  2.6.37
> >> >  make: Leaving directory `/usr/src/linux-headers-2.6.37-trunk-amd64'
> >>     
> > [...]
> >
> > You need to pass M=<your-module-directory> (in fact M=dummy will work).
> > You can get away without it for some targets, but in general you should
> > assume this is required.
> >   
> 
> Hello Ben,
> 
> Thanks for the hint. Indeed it avoids the problem.
> 
> However, make kernelrelease returns 2.6.37 instead of 2.6.37-smp-amd64
> now, so it looks like we have another problem but I am not sure where.

Why do you even care what the version is?  Kbuild knows where your
modules are supposed to be installed.  And usually you will be given a
target kernel release rather than the source/headers path.

In the OOT module I maintain at work, we do:

KVER := $(shell sed -r 's/^\#define UTS_RELEASE "(.*)"/\1/; t; d' 
$(KPATH)/include/generated/utsrelease.h $(KPATH)/include/linux/utsrelease.h 
$(KPATH)/include/linux/version.h 2>/dev/null)

but this is only used for checking whether the version is new enough to
be supported.  For that, 'make kernelrelease' would be sufficient,
except that we have to support versions before that target was added.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

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

Reply via email to