Subject: Re: Request for comments: let config(1) generate LKMs
To: Bill Stouder-Studenmund <email@example.com>
From: Pavel Cahyna <firstname.lastname@example.org>
Date: 09/22/2007 21:58:31
On Tue, Sep 18, 2007 at 10:58:55PM -0700, Bill Stouder-Studenmund wrote:
> On Wed, Sep 19, 2007 at 12:43:08AM +0100, David Laight wrote:
> > On Tue, Sep 18, 2007 at 01:08:51PM -0700, Bill Stouder-Studenmund wrote:
> > > On Fri, Sep 14, 2007 at 01:19:18AM +0900, Hiroyuki Bessho wrote:
> > >
> > > I think though that if we start to do this, we should not stop at drivers.
> > > I'll follow up to other messages, but I think some of the issues you're
> > > running into go away if we modularize more (if not most) of the kernel.
> > I think I'd want to do it the other way around.
> > Have per driver makefiles that build driver_foo.o which can
> > either be LKMs or be linked into the main kernel image.
> > Then config(n) would control which of them get included into
> > specific kernels.
> I think that idea is a bit orthogonal, describing how exactly we build
> them. I don't think it's something we can't also discuss.
> I however don't like it. :-) We probably are looking at over a hundred
> modules. One makefile per module seems like a LOT of makefiles, especially
> for the case where each module is really just a wrapper around one or two
> or three .o's.
> More importantly, we build the make file as it is. We also are a project
> that uses clever makefile magic to reduce the amount of work we do. So I
> think one makefile is sufficient, but I also fully expect we'll have
> cookie-cutter make fragments that make generate an lkm from a few .o's.
> Something like
> MODULES= ne_isa ne_pcmcia rtl8390
> MODSRCS_ne_isa= ne_isa.c
> MODSRCS_ne_pcmcia= ne_pcmcia,c
Doesn't sys/conf/files and so on have all the information that is needed
already? Such a Makefile fragment looks like an useless duplication.