Commit Graph

11 Commits

Author SHA1 Message Date
thorpej ea4d1b7ea1 Rather than using a separate "class" keyword, treat device classes like
special attributes.  From Chris Demetriou.
1998-02-16 22:05:35 +00:00
thorpej bc1733bc88 Add code to emit the cfdriver structures into ioconf.c. This requires
a change to the config grammar, to specify a device's class (i.e. DV_xxx)
like:

device	sd class disk: ...

Also emit an ioconf.h, which contains extern declarations of the
cfdriver structures.

While I'm here, add support for specifying multiple options per defopt
line, as well as specifying the file name in which the options will
appear.

defopt	foo bar baz

generates "opt_foo.h", "opt_bar.h", and "opt_baz.h"

defopt	opt_mumble.h foo bar baz

generates "opt_mumble.h" which contains all three options.

Also, clean up and fix some bugs in the code that generates header files.
1998-01-12 07:37:40 +00:00
thorpej 9fec93804a Changes to config(8) to support dump configuration in the wake of the
new swap system.  The dump specification syntax is now more flexible,
and supports constructs like the following:

config netbsd root on ? type ? dumps on ?
	- wildcarded root, fstype, and dump device

config netbsd root on ? type ffs dumps on sd0b
	- wildcarded root, ffs root fs, always dump on sd0b

config netbsd root on de0 type nfs dumps on wd0b
	- mount an nfs root using de0, and write kernel crash dumps
	  to wd0b

Also, garbage-collect some now unused code, now that swap configuration
is no longer handled by config(8).
1997-06-14 04:25:55 +00:00
thorpej 267e8357fc Implement an unfortunate, and temporary, kludge to address the problem
reported in PR #3668 from maximum entropy <entropy@tanstaafl.bernstein.com>.

The problem: The unit number is not being conveyed to the configuration
crosscheck with root is a network interface; the device number is set
to NODEV, which sets up the (correct) defaults for swap/dump devices.
We can't change NODEV to a unit number, as the PR's patch suggests, as
this breaks the swap/dump defaults.  Rewriting that code is not really
justified, since it's soon to be obsoleted.

The kludge: add an "nv_ifunit" member to struct nvlist, which convey's
a network interface's unit number to the crosscheck routine.  It's not
pretty, but it's not terribly invasive, and can be garbage-collected
easily when the swap/dump goo is obsoleted.
1997-05-25 18:42:54 +00:00
thorpej 07c71aa7f7 Implement new grammar and semantics for specifying file systems
and the root device:

- New "file-system" keyword is used to configure file systems into
  the kernel.
- New way of specifying root device, which allows root file system
  type to always be specified.  Examples:

	config gennetbsd swap generic
	config sdnetbsd root on sd0a swap on sd0b
	config nfsnetbsd root on nfs

  are replaced by:

	config gennetbsd root on ? type ?
	config sdnetbsd root on sd0a type ffs swap on sd0b
	config nfsnetbsd root on ? type nfs
	config lenetbsd root on le0 type nfs

  Note that specific network interfaces may now be specified as
  the root device.
- swapgeneric.c is no longer used; generate a swap*.c file for each
  "config" line in the kernel configuration file.
1997-01-31 03:12:30 +00:00
gwr 1ed260c698 Move some externs to where they are needed. 1996-11-11 23:40:09 +00:00
mycroft 8441b8f88d Remove interrupt vector handling. This is done dynamically by all ports now. 1996-08-31 21:15:05 +00:00
cgd 9c4f9d2daa spaces vs. tabs, spaces/tabs at EOL bogons. 1996-03-17 06:29:19 +00:00
thorpej cb6211e540 New device attachment scheme:
- split softc size and match/attach out from cfdriver into
	  a new struct cfattach.

	- new "attach" directive for files.*.  May specify the name of
	  the cfattach structure, so that devices may be easily attached
	  to parents with different autoconfiguration semantics.
1996-03-17 02:08:22 +00:00
thorpej c5f7cf3a9e RCS id police. 1996-03-03 17:21:25 +00:00
cgd 064307e690 config.new has been moved here. names updated to match. 1995-04-28 06:54:58 +00:00