Subject: Re: Request for comments: let config(1) generate LKMs
To: Bill Stouder-Studenmund <>
From: Hiroyuki Bessho <>
List: tech-toolchain
Date: 09/23/2007 01:54:37
At Tue, 18 Sep 2007 13:21:11 -0700,
Bill Stouder-Studenmund wrote:
> >   I think we can allow users to say
> > 
> > module       ne0	at isa? port 0x280 irq 9
> > module "nex" ne1	at isa? port 0x290 irq 10
> > module "nex" ne2	at isa? port 0x300 irq 11
> > 
> >   In this case, module ne.o has ne and ne_isa driver codes and a
> > device instance ne0. Module nex.o will have only config(9) glue staff
> > to probe port 0x290 and 0x300 and attach ne1 and/or ne2 because ne and
> > ne_isa related codes are in module ne.o.  I'm not 100% sure this works
> > yet, but I guess that allowing users to specify module name for
> > devices will provide good way for some configuration.  And if it
> > works, config(1) can detect that module nex.o depends on module ne.o
> > and can submit some useful information.
> Why would we want to support this option? I don't see the benefit to 
> making something like the "nex" module.

  I'm afraid this "nex" was not a good example for optional module
name after `module' keyword.  I thought we'd better to allow users to
change how to "group" the codes into modules. (Sorry that I can't
think of a better English word than "group".  I mean which codes go to
which module.)  I was afraid that whatever rules we define, users might
want the other way.

> I think a good rule is:
> a) If nothing depends on the attribute, leave it out.
> b) If something hard-coded into the kernel depends on the attribute, build 
> it into the kernel. Also mark it as present for whatever dependency system 
> we come up with.
> c) if modules depend on the attribute and nothing hard coded into the 
> kernel does (i.e. we aren't also in case (b)), make a module. And note all 
> the dependencies.

  I'd say for c):

  c) if one module depends on the attribute that is not in the
  kernel, the attribute is compiled into the depending module.

  d) if more than one modules depend on the attribute that is not in
  the kernel, a module for the attribute is made. And note all the

  I hope this will reduce the number of modules and dependencies in
some cases.

> Take care,
> Bill