public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruen@suse.de>
To: Hannu Savolainen <hannu@opensound.com>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Linux Kernel Mailing Lists <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] kbuild updates
Date: Mon, 21 Jun 2004 03:27:42 +0200	[thread overview]
Message-ID: <200406210327.42241.agruen@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0406210242300.16975@zeus.compusonic.fi>

On Monday 21 June 2004 02:29, Hannu Savolainen wrote:
> On Mon, 21 Jun 2004, Sam Ravnborg wrote:
> > > Many external modules, libs, etc use
> > > /lib/modules/`uname -r`/build to locate the _source_, and this will
> > > break them all.
> >
> > Examples please. What I have seen so far is modules that was not
> > adapted to use kbuild when being build.
> > If they fail to do so they are inherently broken.
>
> For example our installation script expects that
> /lib/modules/`uname -r`/build behaves like a symbolic link that points to
> /usr/src/linux-`uname -r`. If /lib/modules/`uname -r`/build doesn't exist
> then /usr/src/linux-`uname -r` will be attempted instead.
>
> "make -C $KERNELDIR SUBDIRS=$MYDIR \
>       CC=what_we_think_is_the_right_gcc_version" modules
>
> This approach seems to work with the "stock" kernels as well as with all
> the distribution kernels what we have tried so far (except the latest
> kernel from SuSE that used different directory scheme).

Did you actually try the above command with a SUSE kernel? I don't think so; 
one of the earlier postings in the other thread spiced with strong words 
tried to do other unusual things.

> It's relatively easy to use the dual directory scheme provided that the
> object and source directories always have the same naming. However it's
> possible that in the future there will be much more projects that need to
> compile external modules. So it would be easier in general if the
> (possible) dual directory scheme is "hidden" from the external projects.

This is already in place with Sam's patches.

> It should be easy difficult to patch the Makefile in
> /lib/modules/`uname -r`/build to locate the object directory without
> requiring the caller to pass it as a parameter to the "make modules"
> command.

There is one source tree for N object trees in general. Going from the N side 
to the 1 side makes a lot more sense than going the other way around.

> There is one special problem that doesn't affect users who have compiled
> their kernel themselves. Many distributions don't include gcc, make and
> related tools in the default installation so large amount of customer
> sites don't have them installed.

You will invoke make directly, so you should check if make and the kernel 
sources for the running kernel are available.

> In addition different gcc version may 
> have to be used to compile the kernel than the one that is the default gcc
> command in the system.

Then this should be defined in the Makefile in the kernel sources. Fixing 
problems for people who build their own kernels from vanilla sources without 
paying attention to such details will take you nowhere, it will only mess 
things up even worse.

> So before anything can be compiled the installation 
> scripts have to check also if the required tools are installed. If they
> are not available then the customer needs to be instructed to install
> them. Because the installation procedure depents on the distribution it's
> very difficult to help the customer in any way. For this reason it would
> be better if the re is some kind of unbrella script for building the
> module. In the vanilla kernels it simply executes the right make command.
> If the distribution vendors see it necessary they can improve the script
> and add features like automatic installation of the required modules or
> whatever else.

There could be a few basic checks in kbuild whether or not the required tools 
are available. Telling users who compile kernel modules on their own how to 
install packages sounds a bit much asked for my taste.

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

  reply	other threads:[~2004-06-21  1:25 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-20 21:19 [PATCH 0/2] kbuild updates Sam Ravnborg
2004-06-20 21:21 ` [PATCH 1/2] kbuil: add deb-pkg target Sam Ravnborg
2004-06-20 21:22 ` [PATCH 0/2] kbuild updates Sam Ravnborg
2004-06-20 21:23 ` [PATCH 2/2] kbuild: Improved external module support Sam Ravnborg
2004-06-20 21:25   ` Arjan van de Ven
2004-06-20 21:31     ` Martin Schlemmer
2004-06-20 21:45     ` Sam Ravnborg
2004-06-20 21:38       ` Arjan van de Ven
2004-06-21  1:41   ` Petr Vandrovec
2004-06-21  9:01   ` Geert Uytterhoeven
2004-06-21 21:57     ` Sam Ravnborg
2004-06-20 21:30 ` [PATCH 0/2] kbuild updates Martin Schlemmer
2004-06-20 21:42   ` Arjan van de Ven
2004-06-20 21:52     ` Martin Schlemmer
2004-06-20 22:26       ` Andreas Gruenbacher
2004-06-20 22:39         ` Martin Schlemmer
2004-06-20 23:51           ` Andreas Gruenbacher
2004-06-21 22:31             ` Sam Ravnborg
2004-06-21 22:33               ` Martin Schlemmer
2004-06-21 22:50               ` Andreas Gruenbacher
2004-06-21 23:03                 ` Sam Ravnborg
2004-06-20 22:03   ` Sam Ravnborg
2004-06-20 22:16     ` Martin Schlemmer
2004-06-20 22:26       ` Alistair John Strachan
2004-06-20 22:54         ` Martin Schlemmer
2004-06-21 22:46           ` Sam Ravnborg
2004-06-21 22:33         ` Sam Ravnborg
2004-06-21 22:29           ` Martin Schlemmer
2004-06-21 22:56             ` Andreas Gruenbacher
2004-06-20 22:18     ` Sam Ravnborg
2004-06-20 22:25       ` Martin Schlemmer
2004-06-21 22:48         ` Sam Ravnborg
2004-06-22  5:29       ` Jari Ruusu
2004-06-22  9:20         ` Andreas Gruenbacher
2004-06-22 18:23           ` Jari Ruusu
2004-06-22 18:44         ` Sam Ravnborg
2004-06-21  0:29     ` Hannu Savolainen
2004-06-21  1:27       ` Andreas Gruenbacher [this message]
2004-06-21  6:47       ` Arjan van de Ven
2004-06-21  8:02         ` Hannu Savolainen
     [not found] <29hJN-3Jl-35@gated-at.bofh.it>
     [not found] ` <29icN-42R-13@gated-at.bofh.it>
     [not found]   ` <29imu-4ad-31@gated-at.bofh.it>
     [not found]     ` <29iwc-4g7-27@gated-at.bofh.it>
2004-06-20 22:36       ` Pascal Schmidt
     [not found] <539000871@toto.iv>
2004-06-22  1:39 ` Peter Chubb
2004-06-22  5:20   ` Sam Ravnborg
2004-06-22  8:36     ` Andreas Gruenbacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200406210327.42241.agruen@suse.de \
    --to=agruen@suse.de \
    --cc=hannu@opensound.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox