mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Måns Rullgård" <mru@kth.se>
To: Jari Ruusu <jariruusu@users.sourceforge.net>
Cc: Sam Ravnborg <sam@ravnborg.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Symlinks for building external modules
Date: Fri, 04 Jun 2004 21:45:33 +0200	[thread overview]
Message-ID: <yw1xy8n3yun6.fsf@kth.se> (raw)
In-Reply-To: <20040604192304.GB3530@mars.ravnborg.org> (Sam Ravnborg's message of "Fri, 4 Jun 2004 21:23:04 +0200")

Sam Ravnborg <sam@ravnborg.org> writes:

> On Fri, Jun 04, 2004 at 08:15:02PM +0300, Jari Ruusu wrote:
>> 
>> How long have you recommended building external modules like this:
>> 
>>  make -C /lib/modules/`uname -r`/build modules SUBDIRS=`pwd`
>>   or
>>  make -C /lib/modules/`uname -r`/build modules M=`pwd`
>> 
>> Now they all have to be changed to:
>> 
>>  make -C /lib/modules/`uname -r`/source modules SUBDIRS=`pwd`
>>   or
>>  make -C /lib/modules/`uname -r`/source modules M=`pwd`
>
> That would not work either.
> You need to tell kbuild both where to find the source and the output files.
> So you have to specify both -C ... and O=...
> KERNEL=/lib/modules/`uname -r`
> make -C $KERNEL/source O=$KERNEL/build M=`pwd`
>
> There is no way to do the proposed chang and be backward compatible
> when the kernel is build using seperate output directories.

There are many external module packages that assume
/lib/modules/`uname -r`/build to contain the kernel sources.  These
can be built with

  make O=/some/path

If the content of /lib/modules/`uname -r`/build changes this will no
longer work.

> Think of the following situation
> /usr/src/linux-2.6.6-xx/  <= kernel src
>
> /lib/modules/linux-2.6.6-xx-smp/build/ <= output files (or a symlink to them)
> /lib/modules/linux-2.6.6-xx-smp/source/ <= symlink to kernel src
>
> /lib/modules/linux-2.6.6-xx-up/build/ <= output files (or symlink)
> /lib/modules/linux-2.6.6-xx-up/source/ <= symlink to kernel src
>
> /lib/modules/linux-2.6.6-xx-4g/build/ <= output files (or symlink)
> /lib/modules/linux-2.6.6-xx-4g/source/ <= symlink to kernel src
>
> Notice they all share the _same_ kernel src.
> We just have three different .config files.
>
> If there is a way to be backward compatible with
> this feature please demonstrate it.
>
> Plese note that the patch Andreas made did not break existing setups
> if a seperate output directory was not used. The only effect
> would be an additional symlink to the same dir. (build and source would
> be links to the same dir).
>
> Andreas - please expalin why you want build to be a symlink, and not
> the directory used when actually building the kernel.

I can't speak for Andreas, but I prefer to keep my root filesystem as
clean as possible.  Often it's mounted read-only.

-- 
Måns Rullgård
mru@kth.se

  reply	other threads:[~2004-06-04 19:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-03 16:58 Andreas Gruenbacher
2004-06-03 17:09 ` Måns Rullgård
2004-06-03 17:36   ` Sam Ravnborg
2004-06-03 17:55     ` Måns Rullgård
2004-06-04 17:15     ` Jari Ruusu
2004-06-04 19:23       ` Sam Ravnborg
2004-06-04 19:45         ` Måns Rullgård [this message]
2004-06-05 13:45           ` Andreas Gruenbacher
2004-06-05 13:20         ` Jari Ruusu

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=yw1xy8n3yun6.fsf@kth.se \
    --to=mru@kth.se \
    --cc=jariruusu@users.sourceforge.net \
    --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

all inboxes | Powered by JetHome®