* Aurelien Jarno <[EMAIL PROTECTED]> [20060801 16:53]:
> On Tue, Jul 25, 2006 at 01:46:29PM +0200, Michael Prokop wrote:

> > Running:

> > % module-assistant -f -l '2.6.17-grml' -k /$PATH_TO/linux-2.6.17-grml build 
> > rt2x00

> > does not work as debian/rules does not take care of $KERNEL_SOURCES
> > (take a look at upstream's Makefile). Therefore building the module
> > against a kernel which isn't currently running does not work (except
> > using a workaround with environment variables and running
> > "debian/rules binary-modules" manually).

> What do you mean exactly?

> Looking at the upstream Makefile:

> ifdef KERNDIR
>         KERNEL_SOURCES := $(KERNDIR)
> else
>         KERNEL_SOURCES := /lib/modules/$(shell uname -r)/build
> endif

> and to debian/rules:

>         $(MAKE) KERNDIR=$(KSRC)

> So the path to the kernel source is set correctly.

> Moreover, it is possible to build the module against a kernel which
> isn't currently running does not work, at least for debian kernels
> (tested). I don't have time to test for non-debian kernels, but I don't
> see why it won't works.

Which kernel versions and which command line did you use?

JFTR: I don't have any problems with building other external kernel
modules on my system using the same environment, (m-a) commandline,
kernel-version and -sources.

> Please provide me a log of the build.

System (current Debian unstable):

% uname -a
Linux grml 2.6.16-grml #1 PREEMPT Tue Mar 28 11:47:55 CEST 2006 i686 GNU/Linux
% dpkg --list module-assistant
[...]
ii  module-assistant                0.10.6                          tool to 
make module package creation easier
% gcc --version | head -1
gcc (GCC) 4.1.2 20060715 (prerelease) (Debian 4.1.1-9)

Running m-a and its log:

% KPKG_DEST_DIR=/tmp/ module-assistant --verbose -f -l '2.6.17-grml' -k 
/raid/Grml/kernel/linux-2.6.17-grml build rt2x00
% cat /var/cache/modass/rt2x00-source.buildlog.2.6.17-grml.1154444311
touch config.mk \
                && /usr/bin/make clean
make[1]: Entering directory `/usr/src/modules/rt2x00'
make[1]: Leaving directory `/usr/src/modules/rt2x00'
 debian/rules KVERS=2.6.17-grml KSRC=/raid/Grml/kernel/linux-2.6.17-grml 
KDREV=grml.06 kdist_image
/usr/bin/make  -f debian/rules kdist_clean kdist_config binary-modules
make[1]: Entering directory `/usr/src/modules/rt2x00'
touch config.mk \
                && /usr/bin/make clean
make[2]: Entering directory `/usr/src/modules/rt2x00'
Makefile:52: /lib/modules/2.6.16-grml/build/.config: No such file or directory
make[2]: *** No rule to make target `/lib/modules/2.6.16-grml/build/.config'.  
Stop.
make[2]: Leaving directory `/usr/src/modules/rt2x00'
make[1]: *** [kdist_clean] Error 2
make[1]: Leaving directory `/usr/src/modules/rt2x00'
make: *** [kdist_build] Error 2

When running:

% cd /usr/src/modules/rt2x00 && \
  KSRC=/raid/Grml/kernel/linux-2.6.17-grml KVERS='2.6.17-grml' 
KERNEL_SOURCE=$KSRC \
  KERNELDIR=$KSRC KDIR=$KSRC KVER=$KVERS debian/rules binary-modules

it works.

AFAICS and some tests showed, that:

| ifdef KERNDIR
|         KERNEL_SOURCES := $(KERNDIR)

from upstream's Makefile seems to be never reached and the:

|  KERNEL_SOURCES := /lib/modules/$(shell uname -r)/build

is always used instead. I'm wondering how it could work at your
system.

> Meanwhile as it works for debian kernels, I am decreasing the severity
> to normal.

I don't think that it has to do with debian vs. non-debian kernels.

regards,
-mika-

Attachment: pgpripy58xcGR.pgp
Description: PGP signature

Reply via email to