Commit Graph

119 Commits

Author SHA1 Message Date
jtk 0b044b117e . NULL terminate the list of locator names on each attachment
. link to the list of locator names from each entry in cfdata[] (for
future use by programs to print out the device tree nicely and/or
for boot-time configuration tools)
1997-03-14 22:54:08 +00:00
leo 0b28c6c0b1 Don't dump when a non-existent root device is specified. (missed a
param to error()).
1997-03-14 20:43:05 +00:00
jtk 0f6d8d88b8 Add hash table walking functions to emit manifest constants for locator
offsets within cf->cf_loc[].
Also include locator names as strings in ioconf.c.

Still to do: wire the locator names into the cfdata.
1997-03-14 00:14:09 +00:00
thorpej d214be029a Fix arithmetic botch that caused incorrect results for configs like:
config netbsd root on sd1a

Noted by Taras Ivanenko <ivanenko@ctpa03.mit.edu> in PR #3203
and by others.
1997-03-06 23:11:55 +00:00
thorpej c9fe001e3a Cross-reference options(4). While I'm hear, garbage-collect the
reference to config(8) left over from when this program was called
config.new.
1997-02-05 19:17:28 +00:00
thorpej f12fb4ba31 Patch from Gordon Ross to make this build under SunOS, useful in
cross-compiling environments.
1997-02-03 21:18:21 +00:00
thorpej e14a0d029f Add support for generating "option headers". These allow options to
be included in object dependencies.  config(8) is told to generate
a header for a particular option with the new "defopt" keyword, used
in the files.* system description files.  Options that are placed in
header files are not given -D... cpp flags.

This approach allows options to be turned into headers incrementally,
rather than all at once, and allows for non-header options, as well.
1997-02-02 21:12:30 +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 81aa081ab6 Eliminate the "dangerous trailing context" (actually both uses of
trailing context were unnecessary).  Remove unnecessary { } around
simple actions (just a return statement).  Fix some * vs + errors.
1996-11-13 18:42:18 +00:00
gwr 7fa1418031 Fix the bug I introduced in the last commit, which broke line contuation
where newline is followed by whitespace.  Do not return a newline token
to the parser in that case (logically still the same line).
1996-11-12 17:42:47 +00:00
gwr a0b75afc0b * Eliminate all shift/reduce conflicts in the grammar. This
requires that some ordering requirements are checked by the
  back-end C code instead of the parser (dirspecs, maxpart).

* Be more careful to require newline tokens in the grammer where
  they are expected, and deal with blank lines, etc.  This allows
  elimination of a trailing context on newline in the scanner.

* Let the parser set values for "needs-count" and "needs-flag"
  instead of making those special cases in the scanner.

* Get rid of '= ' preceeding actions (obsolete yacc syntax)

* Make the scanner not insert an extra newline after includes.
  (It was just an accidental side-effect of the ENDFILE stuff.)
1996-11-11 23:54:17 +00:00
gwr 91118cc6ae Move setupdirs() here -- it is now called from scan.l (include). 1996-11-11 23:41:54 +00:00
gwr 1ed260c698 Move some externs to where they are needed. 1996-11-11 23:40:09 +00:00
gwr 3b2cf54383 Be honest about the fact that this program builds only with flex. 1996-11-11 23:36:40 +00:00
mycroft 72d4e71f08 Remove remaining vector cruft. 1996-11-11 14:18:49 +00:00
gwr 26793c36d4 Minor changes to support building on other systems (i.e. SunOS). 1996-11-07 22:59:39 +00:00
cgd 42b8d1922d correct a comment: profiled kernels go in FOO.PROF, not FOO.prof 1996-11-02 01:02:56 +00:00
cgd b031fda3b1 update comments to correctly indicate what files are being parsed when 1996-11-02 01:00:14 +00:00
ghudson e312e1563e Don't canonicalize relative paths to the source tree any more; libkern
and libcompat can handle them as long as they begin with '.'.  If a
relative path doesn't begin with '.', add a "./" before it.
1996-09-23 05:04:23 +00:00
mycroft 8441b8f88d Remove interrupt vector handling. This is done dynamically by all ports now. 1996-08-31 21:15:05 +00:00
mycroft ab6ebadde6 Add `source' and `build' directives, and corresponding options, per discussion
on tech-kern.  (See man page.)  Implementation by Greg Hudson.
Also, remove special case for i386 in vector handling, although this code isn't
actually used any more.
1996-08-31 20:58:16 +00:00
mycroft b9ae4a5e3f Remove `config-dependent' and `device-driver' flags. 1996-08-12 00:55:54 +00:00
cgd cb40dc44d0 two devices instances which are otherwise the same but do not attach
via the same attributes are _not_ the same, and should not be treated
as aliases of each other.
1996-06-17 18:21:35 +00:00
cgd 315f091f18 fix (apparently long-standing) bug which prevented devices from attaching
to interface attributes on a device other than the interface attribute that
the device was named the same as, if that one was there.
1996-03-17 21:12:03 +00:00
christos 6b2a32d7dc Declare the mountroot functions and variables fully prototyped. 1996-03-17 20:36:25 +00:00
cgd 3ac7667c57 add BSDI-style expression support to optional file specifiers. Code mostly
taken from the parts of BSDI's 'config' which are freely-distributable
(under the LBL/UC Regents license), and adjusted to fit into our version.
1996-03-17 13:18:15 +00:00
cgd 50b3b61ea3 simplify nvlist creation slightly; change newnv() to take another arg: next 1996-03-17 11:50:09 +00:00
cgd 2dd7a7984c Fix PR 2218. As noted (both in mail from me included in the PR, and
in XXX-marked comments in the recent attachment changes), this was a
long-standing bug in config.

The problem: If a device is attached to a device via an attribute exported
by that device (i.e. foo* at bar0, where 'bar' exports an attribute that
'foo' attaches to), but the device attached to is not present in the
kernel configuration file, AND another device which exports an attribute
that 'foo' attaches to _is_ present (e.g. a device baz0, if one could
specify 'foo0 at baz0'), then: the configuration file will (incorrectly)
be accepted by config, and the resulting ioconf.c will include a bogus
cfdata entry for the device (in the example, 'foo*').  This typically
causes the resulting kernel to crash during autoconfiguration.

The solution: Be much more careful about keeping track of where a device
was attached, and, in particular, if a device was attached to another device,
_always_ keep track of what device it was attached to.  Then, when
cross-checking, if the attached-to device isn't present, give up and do not
check attributes.  Also, document the process much more thoroughly.
1996-03-17 07:05:50 +00:00
cgd 9c4f9d2daa spaces vs. tabs, spaces/tabs at EOL bogons. 1996-03-17 06:29:19 +00:00
cgd 95f205f10c fix bogon in device attachment name checking. the same rules should be
used for checking device attachment names as are used for device name
checking, because device names can be used as attachment names.  (Actually,
less strict rules could be used, but there's little point in that.)  This
was not a mistake of design, this was just a mistake; i misunderstood
the devbase name checking code.
1996-03-17 06:23:18 +00:00
cgd 9c70ac56a8 fix another just-discovered long-standing bug: foo0 at bar* is not legal
syntax.  (devices which specify 'at' can't be starred.  they can be
wildcarded, with ?, but not starred.)
1996-03-17 05:19:33 +00:00
cgd dfbb6d0884 fix a bug where definitions to be placed in headers wouldn't be
right/consistent.  If you had something like:

file	file.c		foo bar baz needs-flag

and any one of foo, bar, or baz caused it to be brought into the compile,
in the header you'd end up with:

#define NFOO	1
#define NBAR	1
#define NBAZ	1

even if only one of them were selected.  Other headers might have had a
different (inconsistent) set of definitions, depending on whether any of
their components were included, and any files necessary for the unspecified
options would not actually be present in the Makefile files list.  The
correct behaviour for the example above if only 'foo' is selected by
the config file is:

#define NFOO	1
#define NBAR	0
#define NBAZ	0

which is what config now does.  This bug has been present for a while.
(I don't know for sure that it was present in 4.4-Lite2, but from looking
at the Lite2 config sources, it appears to be there.)
1996-03-17 03:21:21 +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 7d351bb3f4 fix thinkos in emitobjs() and emitfiles() that would cause empty files
lists to not have a newline properly emitted.  (It was emitting a
newline only if the line position was != 7.  However, the only time the
line position was 7 was right after the initial variable assignment
string (e.g. "OBJS=\t") was printed.)
1996-02-23 00:39:42 +00:00
scottr de8fcf0996 Spelling correction 1996-02-13 23:08:24 +00:00
cgd c626f39b3a update 'files' files search paths and manual page descriptions for
the config program renaming.
1995-04-28 08:15:48 +00:00
cgd 064307e690 config.new has been moved here. names updated to match. 1995-04-28 06:54:58 +00:00
cgd d8806814a6 specify man pages the new way. 1994-12-22 11:32:57 +00:00
mycroft b8e6ab9578 Add explicit BINDIR definitions, since these directories are distributed
separately.
1994-12-11 22:29:40 +00:00
mycroft 6f895463de Fix core dump when parsing ccd device specifications. From Jason Downs. 1994-10-31 19:13:13 +00:00
hpeyerl 2b3f96ce61 (I'm a dork for putting this in the wrong tree before)
To let us correctly configure ccd devices. <From downsj@csos.orst.edu>
1994-08-03 19:30:21 +00:00
hpeyerl 9cbb13a30b Config support for ccd driver. (from 4.4Lite) 1994-06-24 14:22:08 +00:00
cgd ce5210ad7d delete nfs_diskless, and ufs -> ffs, so kernel links properly. 1994-06-13 02:32:50 +00:00
cgd f39163138d maxfdescs checks out 1994-05-21 08:32:32 +00:00
cgd 25fe2bda71 terminate swap conf file with NODEV, not 0. 1994-04-25 23:30:52 +00:00
mycroft fcd16a0700 Remove some stuff. 1994-04-07 06:53:01 +00:00
deraadt 4b24a3521e rainse() -> raisestr(), per <arnej@fm.unit.no> 1994-04-05 23:57:26 +00:00
chopps 2e148c6734 remove old floppy thing. 1994-04-05 23:07:07 +00:00
cgd d1c44c8402 clean up printf, and make overrides work! 1994-03-30 04:25:22 +00:00