lkml.org 
[lkml]   [2004]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Stop the Linux kernel madness
From
Date
Hello,

On Fri, 2004-06-18 at 02:27, 4Front Technologies wrote:
> Our commercial OSS drivers work perfectly with Linux 2.6.5, 2.6.6, 2.6.7
> and they are failing to install with SuSE's 2.6.5 kernel. The reason is that
> they have gone and changed the kernel headers which mean that nothing works.

Not really. The 2.6 kernel series allow to put output files in a
different directory than the sources -- see the O= option; there is a
little documentation in the main Makefile. Without the O= option, the
kernel sources and object files needed to compile external modules will
reside in the same directory. With the O= option, they will reside in
different directories. This means that a single /lib/modules/$(uname
-r)/build symlink is not sufficient anymore. Therefore we have the build
symlink pointing to the output files, and a new source symlink pointing
to the real source tree. This change hasn't found its way into mainline
yet, which is unfortunate. For the discussion, see
http://marc.theaimsgroup.com/?l=linux-kernel&m=108628265102121&w=2 and
follow-ups. I keep pinging Sam Ravnborg (the kbuild maintainer), but
apparently he is busy with other projects at the moment.

In addition, there is an extra Makefile in /lib/modules/$(uname
-r)/build that has the usual targets needed for module building, so the
traditional way of building modules (make -C /lib/modules/$(uname
-r)/build modules SUBDIRS=$(pwd)) still works. There is no need to build
scripts, scripts_basic, or whatever in that directory.

Based on this difference, there are two principal ways to build external
modules since 2.6.7 (and through back-porting also in the current SUSE
kernels, which are based on 2.6.5). We chose to ship the kernel sources
in /usr/src/linux in a (mostly) unconfigured state, and put the output
files needed for building external modules below /usr/src/linux-obj/.

This means that you have several choices:

- Configure the kernel sources in /usr/src/linux as you wish.

- Use one of the standard SUSE configurations.

I have written a HOWTO describing how to work with the SUSE kernel
sources, which is available as /usr/src/linux/README.SUSE in our
packages. An up-to-date online version is available at
http://www.suse.de/~agruen/kernel-doc/.

> For instance our kernel interface module doesn't compile anymore we see the following
> errors:
>
> > make -C /lib/modules/`uname -r`/build scripts scripts_basic include/linux/version.h
> > make[1]: Entering directory `/usr/src/linux-2.6.5-7.75-obj/i386/bigsmp'
> > make[1]: Nothing to be done for `scripts'.
> > make[1]: *** No rule to make target `scripts_basic'. Stop.
> > make[1]: Leaving directory `/usr/src/linux-2.6.5-7.75-obj/i386/bigsmp'
> > make: *** [ossbuild] Error 2
> >
> > Trying to compile using INCLUDE=/lib/modules/2.6.5-7.75-bigsmp/build/include
> > In file included from /usr/include/asm/smp.h:18,
> > from /usr/include/linux/smp.h:17,
> > from /usr/include/linux/sched.h:23,
> > from /usr/include/linux/module.h:10,
> > from src/sndshield.c:49:
> > /usr/include/asm/mpspec.h:6:25: mach_mpspec.h: No such file or directory
> > In file included from /usr/include/asm/smp.h:18,
> > from /usr/include/linux/smp.h:17,
> > from /usr/include/linux/sched.h:23,
> > from /usr/include/linux/module.h:10,
>
>
>
> Why is this happening?. It's working fine with Linux 2.6.5 and also worked with
> Linux 2.6.4 kernels from SuSE 9.1


Sincerely,
--
Andreas Gruenbacher <agruen@suse.de>
SUSE Labs, SUSE LINUX AG


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.254 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site