Subject: Re: Request for comments: let config(1) generate LKMs
To: Hiroyuki Bessho <bsh@grotto.jp>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-toolchain
Date: 09/18/2007 22:58:55
--5CUMAwwhRxlRszMD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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:
> >=20
> > I think though that if we start to do this, we should not stop at drive=
rs.=20
> > I'll follow up to other messages, but I think some of the issues you're=
=20
> > running into go away if we modularize more (if not most) of the kernel.
>=20
> 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=20
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=20
modules. One makefile per module seems like a LOT of makefiles, especially=
=20
for the case where each module is really just a wrapper around one or two=
=20
or three .o's.

More importantly, we build the make file as it is. We also are a project=20
that uses clever makefile magic to reduce the amount of work we do. So I=20
think one makefile is sufficient, but I also fully expect we'll have=20
cookie-cutter make fragments that make generate an lkm from a few .o's.

Something like

MODULES=3D ne_isa ne_pcmcia rtl8390
MODSRCS_ne_isa=3D 	ne_isa.c
MODSRCS_ne_pcmcia=3D	ne_pcmcia,c

and so on.

The main difference is we have one makefile as opposed to over a hundred.

Take care,

Bill

--5CUMAwwhRxlRszMD
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFG8LqfWz+3JHUci9cRApiuAKCEPFdeBxnlGQAkGCR/+IIxODJm1ACfensZ
KGYTAGuUyoxH5hfsgPmfwvM=
=7KIU
-----END PGP SIGNATURE-----

--5CUMAwwhRxlRszMD--