public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	lkml <linux-kernel@vger.kernel.org>,
	"kbuild-devel@lists.sourceforge.net" 
	<kbuild-devel@lists.sourceforge.net>
Subject: Re: External kernel modules, second try
Date: Sun, 7 Mar 2004 13:53:48 +0100	[thread overview]
Message-ID: <20040307125348.GA2020@mars.ravnborg.org> (raw)
In-Reply-To: <1078620297.3156.139.camel@nb.suse.de>

On Sun, Mar 07, 2004 at 01:44:58AM +0100, Andreas Gruenbacher wrote:
> Hello,
> 
> here is the patch I posted previously that adds support for modversions
> in external kernel modules that are built outside the main kernel tree
> (first posting archived here: http://lwn.net/Articles/69148/). Relative
> to the original version, the attached version also works when compiling
> with O=.
Hi Andreas.
I have started to look into this.
The changes im Makefile when you use SUBDIRS as a flag does not look
pretty.

What I have in mind is something like this:
- Get rid of current use of SUBDIRS. It is no longer used in any
  arch Makefiles.
- Introduce a KBUILD_EXTMOD variable that is only set when building
  external modules
- Introduce a new method to be used when compiling external modules:
  make M=dir-to-module
- Keeping the SUbDIRS notation for backward compatibility
- When using SUBDIRS or M= the 'modules' target is implicit.
- make clean and make mrproper/distclen only deletes files in the
  external module directory (as done in your patch)
- Error out if any updadtes are requires in the kernel tree
- Find a magic way to include a Kconfig file for the external module
- Allow kbuild Makefiles to be named Kbuild, so local stuff can be in
  a file named Makefile file
  note: this can be achieved using makefile/Makefile today but
  it makes sense since there is not much 'Make' syntax left in
  kbuild makefiles today.

Above will not be made in one go. My next step is to make a patch for the
first four steps - to see the actual impact on current makefiles.

Comments welcome!

Could you explain what is the actually gain of using the
modversions file your patch creates. (modpost changes)

> The patch also adds a modules_add target that does the equivalent of
> modules_install for one external module.
Looks good.

> The third change is to remove one instance of temporary file creation
> inside the main kernel tree while external modules are built. I think
> there are still other cases where temp files in the kernel tree are
> used. IMHO they should all go away, so that a ``make -C $KERNEL_SOURCE
> modules SUBDIRS=$PWD'' works against a read-only tree.
Agree - should be easy to test using a CD.
Are there an easy way to mount just a directory structure RO?

	Sam

  reply	other threads:[~2004-03-07 12:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-07  0:44 External kernel modules, second try Andreas Gruenbacher
2004-03-07 12:53 ` Sam Ravnborg [this message]
2004-03-07 13:03   ` Arjan van de Ven
2004-03-07 13:46     ` Andreas Gruenbacher
2004-03-07 14:01       ` Arjan van de Ven
2004-03-07 14:26         ` Andreas Gruenbacher
2004-03-07 15:09           ` GPL 3 mark kandianis
2004-03-07 15:14             ` Måns Rullgård
2004-03-07 16:43               ` John Bradford
2004-03-07 16:05         ` External kernel modules, second try Sam Ravnborg
2004-03-07 16:08           ` Arjan van de Ven
2004-03-07 16:45             ` Andreas Gruenbacher
2004-03-07 16:49               ` Arjan van de Ven
2004-03-07 18:33               ` Sam Ravnborg
2004-03-07 13:32   ` Andreas Gruenbacher
2004-03-07 15:09     ` Sergey Vlasov
2004-03-07 18:37       ` Sam Ravnborg
2004-03-07 16:18     ` Sam Ravnborg

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=20040307125348.GA2020@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=agruen@suse.de \
    --cc=kbuild-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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