public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Alistair John Strachan <s0348365@sms.ed.ac.uk>
Cc: Martin Schlemmer <azarah@nosferatu.za.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Linux Kernel Mailing Lists <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] kbuild updates
Date: Tue, 22 Jun 2004 00:33:44 +0200	[thread overview]
Message-ID: <20040621223344.GD2903@mars.ravnborg.org> (raw)
In-Reply-To: <200406202326.54354.s0348365@sms.ed.ac.uk>

On Sun, Jun 20, 2004 at 11:26:54PM +0100, Alistair John Strachan wrote:
> [snipped a few CC addresses]
> 
> On Sunday 20 June 2004 23:16, Martin Schlemmer wrote:
> > On Mon, 2004-06-21 at 00:03, Sam Ravnborg wrote:
> > > On Sun, Jun 20, 2004 at 11:30:34PM +0200, Martin Schlemmer wrote:
> > > > I know Sam's mta blocks my mail at least (lame isp), but for the rest,
> > > > please reconsider using this.
> > >
> > > Hmm, got your mail.
> > >
> > > > 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.
> >
> > Well, glibc use it for instance as an fall-through if you do not specify
> > it via ./configure arguments, or environment (yes, glibc should not use
> > it, etc, etc, no flames please =).  So as well does alsa-driver,
> > nvidia's drivers (gah, puke, yes, its got some binary-only stuff in
> > there ;), ati's drivers and a lot of other stuff (if you really need
> > them all I can try to find time to look for more).
> >
> > I am not sure about ati's drivers and alsa, but nvidia uses kbuild.
> >
> >
> > Thanks,
> 
> Sam's point is that unless you ask KBUILD to put the kernel build in a 
> separate directory to its sources (this is not the default 
> behaviour), /lib/modules/`uname -r`/build will still point to the mixture of 
> source and build data, therefore no breakage will occur.

Correct!

> I understand Sam's reasoning and I believe it is sensible to have the source 
> and build output in separate directories within /lib/modules/`uname -r`. The 
> drivers in question can easily be updated to support the exceptional case 
> whereby users build kernels in a different directory to the source.
> 
> Sam, maybe if there was a way to easily detect whether a kernel had been build 
> with or without a different output directory, it would be easier to have 
> vendors take this change on board. For example, I imagine in the typical case 
> whereby no change in build directory is made, you will have something like 
> this:
> 
> /lib/modules/2.6.7/build -> /home/alistair/linux-2.6
> /lib/modules/2.6.7/source -> /home/alistair/linux-2.6
> 
> Whereas when O is given, it will instead be like this:
> 
> /lib/modules/2.6.7/build -> /home/alistair/my-dir
> /lib/modules/2.6.7/source -> /home/alistair/linux-2.6
> 
> I presume that checking for the existence of /lib/modules/`uname -r`/source 
> will be enough.
> 
> #
> # where's the kernel source?
> #
> 
> if [ -d /lib/modules/`uname -r`/source ]; then
> 	# 2.6.8 and newer
> 	KERNDIR="/lib/modules/`uname -r`/source"
> else
> 	# pre 2.6.8 kernels
> 	KERNDIR="/lib/modules/`uname -r`/build"
> fi

Look ok.

	Sam

  parent reply	other threads:[~2004-06-21 22:22 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 [this message]
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
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=20040621223344.GD2903@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=azarah@nosferatu.za.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s0348365@sms.ed.ac.uk \
    /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