Subject: Re: adding stuff to files.i386.newconf
To: None <>
From: Charles M. Hannum <>
List: current-users
Date: 12/03/1994 04:17:52
   in files.i386 there are lots of examples of modules with dual dependencies
   eg a module needed by either driver isa/a.c or isa/b.c could be in on
   one line as c.c a or b

   I don't see how to do that with files.i386.newconf.

Well, you can look at the examples that are already there.  Here's

1) define  scsi {}
2) file	   scsi/scsi_base.c		scsi
   file	   scsi/scsi_ioctl.c		scsi
   file	   scsi/scsiconf.c		scsi

3) device  scsibus at scsi {target = -1, lun = -1}

4) device  sd at scsibus: disk
   file	   scsi/sd.c			sd needs-flag
5) major   {sd = 4}

6) device  aha at isa: scsi, dma
   file	   arch/i386/isa/aha1542.c	aha

I suppose I should explain what that actually means.  B-)

1) Define a device type called `scsi', with no special properties.
(The `{}' is magic; without it, you have an attribute, not a device
type.  (Actually, they're basically the same thing, but pretend you
didn't hear that and you'll be less confused.)  Attributes can also be
used to include optional files, but in this case they're not

2) Define some files which are included if any devices of type `scsi'
are configured.

3) Define a scsibus as being on any device of type `scsi'.  Note that
we *have* to do it this way, because doesn't grok a
specification like `at aha or ahb or ...'.  One device can only be
`at' (read: attached to) another device; this is why `scsi' is a
device type and not an attribute.

4) Define some other devices which can be on a `scsibus'.

5) Define the major number of `sd' for root, swap, and dump
specifications, to generate swapxxx.c.  This sucks and should go away.

6) Define some devices of type `scsi'.  Note that some of these also
use ISA DMA, so they have the attribute `dma' to pull in dma.c.

I hope this makes sense.  I figured out how it works by writing code
that uses it.  Unfortunately, the only documentation I've seen on is really poor.