Commit graph

168 commits

Author SHA1 Message Date
Peter Wemm 76631bb35a Argh! I broke the static hints parser at the last minute on freefall when
I added the $FreeBSD$ (commented) line.
Fix:
 1: s/break/continue/
 2: will somebody please shoot me! :-]
2000-06-14 07:43:56 +00:00
Peter Wemm f71c01cc52 Borrow phk's axe and apply the next stage of config(8)'s evolution.
Use Warner Losh's "hint" driver to decode ascii strings to fill the
resource table at boot time.

config(8) no longer generates an ioconf.c table - ie: the configuration
no longer has to be compiled into the kernel.  You can reconfigure your
isa devices with the likes of this at loader(8) time:
  set hint.ed.0.port=0x320

userconfig will be rewritten to use this style interface one day and will
move to /boot/userconfig.4th or something like that.

It is still possible to statically compile in a set of hints into a kernel
if you do not wish to use loader(8).  See the "hints" directive in GENERIC
as an example.

All device wiring has been moved out of config(8).  There is a set of
helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98)
that extract the 'at isa? port foo irq bar' from the old files and produces
a hints file.  If you install this file as /boot/device.hints (and update
/boot/defaults/loader.conf - You can do a build/install in sys/boot) then
loader will load it automatically for you.  You can also compile in the
hints directly with:  hints "device.hints"  as well.

There are a few things that I'm not too happy with yet.  Under this scheme,
things like LINT would no longer be useful as "documentation" of settings.
I have renamed this file to 'NOTES' and stored the example hints strings
in it.  However... this is not something that config(8) understands, so
there is a script that extracts the build-specific data from the
documentation file (NOTES) to produce a LINT that can be config'ed and
built.  A stack of man4 pages will need updating. :-/

Also, since there is no longer a difference between 'device' and
'pseudo-device' I collapsed the two together, and the resulting 'device'
takes a 'number of units' for devices that still have it statically
allocated.  eg:  'device fe 4' will compile the fe driver with NFE set
to 4.  You can then set hints for 4 units (0 - 3).  Also note that
'device fe0' will be interpreted as "zero units of 'fe'" which would be
bad, so there is a config warning for this.  This is only needed for
old drivers that still have static limits on numbers of units.
All the statically limited drivers that I could find were marked.

Please exercise EXTREME CAUTION when transitioning!

Moral support by: phk, msmith, dfr, asmodai, imp, and others
2000-06-13 22:28:50 +00:00
Peter Wemm 3f664fc689 A checkpoint of a part of a work-in-progress. Some more cleanups for
config(8).  This commit allows control of the creation of the
#include "foo.h" files.  We now only create them explicitly when needed.
BTW; these are mostly bad because they usually imply static limits on
numbers of units for devices.  eg: struct mysoftc sc[NFOO];
These static limits have Got To Go.
2000-06-10 22:13:40 +00:00
Sheldon Hearn f2e366a105 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:09:25 +00:00
Peter Wemm ac0711e123 Mark the 'conflicts' keyword as obsolete, and don't generate (unused)
resource table entries for it.
2000-01-29 18:14:59 +00:00
Philippe Charnier d67724c7c9 Use Ns and Sx. -current is 4 not 3. 2000-01-23 20:16:21 +00:00
Peter Wemm 8ef328cfe9 Remove the cam-specific device wiring code. This was a duplicate of
the data in the resource tables, and cam is getting it directly now.
2000-01-23 18:05:24 +00:00
Peter Wemm 18ecdacc22 Bump configvers.h as a precaution. Although existing config files will
work unmodified still, new config files won't work on the old ones.
2000-01-23 12:24:48 +00:00
Peter Wemm 218f95f38b Clean up something in config(8) that has annoyed me for ages. Remove
the need to specify the unit number of unwired devices.  ie: instead
of saying "device fxp0" we can say "device fxp" which is much closer
to what it actually means.  The former (fxp0) implied something about
reserving the 0th unit, but it does not and never did - it was a
figment of config(8)'s imagination that we had to work around..
"device fxp0" simply means "compile in the fxp device driver", so we
may as well just write it as "device fxp" which is closer to what it
really means.

Doing this also saves us from filling up the ioconf.c tables with
meaningless entries.
2000-01-23 12:01:08 +00:00
Peter Wemm 22c22b08b0 Fix a bungle with the CAM static wiring tables. Write CAMCONF_UNSPEC
instead of -2.  This (I believe) caused static wirings to not match.
This should fix Bill Pechter's problem but we'll see.

Problem discovered by:	Bill Pechter <pechter@shell.monmouth.com>
2000-01-12 14:20:12 +00:00
Bruce Evans 838aeb6957 Remove even known options if they are in the wrong options header. This
fixes movement of options.  Stale copies were left behind.
2000-01-09 12:52:01 +00:00
Peter Wemm 58fa7951a2 Bump configversion. The controller/device changes are upwards but not
downwards compatable.  If you try and config a s/controller/device/ kernel
with an old config(8), the results will be less than satisfactory.
2000-01-09 07:10:27 +00:00
Peter Wemm b5cda9cb3c Support getting *.$MACHINE from sys/conf as well as sys/$MACHINE/conf.
This would mean that we could move files.alpha, files.i386, files.pc98
etc all next to conf/files, and the various Makefiles next to each
other.  This should go a long way towards committers "seeing" the
Alpha etc stuff and remembering to update that too as it would be
right next to the i386 config files.  Note this does not include
the GENERIC etc files as they can't be shared.  I haven't actually
moved the files, but the support is here for it.  It still supports
the per-machine conf directories so that folks working on a new arch
can just distribute a subdir of files.
2000-01-08 16:48:12 +00:00
Peter Wemm 9414269597 Apply the axe to some more cruft in config(8). In particular:
- redo the "at" configuration system so that it just syntax checks
  to make sure the device you're configuring something "at" appears to
  exist.  Nuke a bunch of complexity that was responsible for creating
  "clones" of wildcard devices and some wierd stuff in a few places
  including the scbus config tables etc.
- merge "controller" and "device" - there is no difference as far as
  the kernel is concernend, it's just something there to make life
  difficult for config file writers.  "controller" is now an alias for
  "device".
- emit full scsi config into the resource tables.  We could trivially
  change cam to use that rather than it's own "special" table for wiring
  and static configuration.  ATA could use this too for static wiring.
- try and emulate some of the quirks of the old system where it made
  sense.  Some were too strange though and I'd be very suprised if they
  were features and not outright bugs.  nexus handling is still strange.
  One thing in particular is that some of the wierd entries in the
  newbus devtables is now gone as it was a quirk side effect of the
  wildcard/question-mark cloning above.

GENERIC and LINT still build etc.
2000-01-08 15:57:22 +00:00
Bruce Evans ab55b0e78f Fixed removal of unknown options. For options files with only a single
known option, unknown options following the known option were not
removed.  Now I think only unknown options in unknown options files
are not removed.  This is harmless because unknown options files should
not be used, but removing the files would be cleaner.
2000-01-08 14:34:50 +00:00
Peter Wemm e44b832ddd Add a 'warning' option for the files* files. This is intended to enable
giving a dire warning about certain drivers going away in the future.
1999-12-12 09:38:48 +00:00
Peter Wemm 952017bedf Fix another quirk in the unknown device detection, and also deal with
unknown 'controller' lines.
1999-12-06 15:52:18 +00:00
Archie Cobbs 98ca0c27f3 A better version of the previous checkin. If the user specifies
a custom file that could override a FreeBSD file under a different
configuration, but doesn't under this one, give a different warning.
1999-12-03 00:28:06 +00:00
Archie Cobbs 1e306bb1c6 When specifying additiona user-specified kernel compilation source
files in a 'files.XXX' file, config allows non-FreeBSD source files
with the same name as a FreeBSD source file to override the latter,
and in this situation it issues a warning.

However, if one of the user-specified files is actually a FreeBSD
source file (perhaps your kernel has some custom option that requires
that file), config mistakenly thinks it's a completely new file
and goes ahead and overrides all previous information for that file
(and issues the warning).

Fix this.

With help from:	julian
1999-12-02 23:43:08 +00:00
Andrew Gallatin 4c6aa17cdc Allow config to generate proper ioconf.c files when devices request DMA
channel 0.

Submitted by: dfr
1999-11-22 14:31:55 +00:00
Peter Wemm 6c54a82eb6 Re-support "tape" as an alias for device and clean up a bit more cruft
left over from the original system (d_dk was for preassigned iostat unit
numbers for disks)
1999-11-09 07:20:22 +00:00
Marcel Moolenaar c1454d67ec Add option "-d destdir" which instructs config to use another output
directory than the default one. If the option is not given, then the
output of config is exactly as before. Only when an alternate output
directory has been specified will config modify its behavior.

Additional changed:
o  Remove the now conflicting and unused NODEV define. It
   conflicts with NODEV in sys/param.h.
o  Rename the now conflicting MACHINE token to ARCH. It
   conflicts with MACHINE in sys/param.h.
o  Fix some easy style bugs.
o  Fix some easy grammar bugs in the manpage.

Approved by: peter, archie
1999-10-30 10:55:48 +00:00
Peter Wemm 1c56dc3655 Further cleanup. Also remove the following unused or defunct tokens:
and, bio, cam, master, minor, net, priority, sequential, size, slave, trace
1999-10-10 17:36:11 +00:00
Peter Wemm 1b00e6b51a Zap references to 'major' token, it's not used.
Zap references to devices.i386 - it's not used. (neither is devices.pc98
or devices.alpha)
1999-10-08 06:20:43 +00:00
Peter Wemm 97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Chris Costello f437b38cf7 Fix a bunch of broken cross-references 1999-08-18 05:55:22 +00:00
Nik Clayton 414a35e60a Add $Id$, to make it simpler for members of the translation teams to
track.

The Id line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:12:29 +00:00
Peter Wemm 1b24aa44b9 Delete special handling for 'device-driver' suffix, it's not used in
the kernel source now.
1999-07-03 19:22:52 +00:00
Peter Wemm 2da5c22ea3 Don't include trailing whitespace in ID tokens before comments. ie:
options FOO=10		# comment
would give FOO the value of "10		" and that caused unwanted
touches on the opt_*.h files.

I hope I've got this right..
1999-07-01 16:20:16 +00:00
Peter Wemm 02e7144a4e Detect and remove defunct or unknown options from opt_*.h files. This
can happen when options are removed from the options files.
1999-07-01 16:17:13 +00:00
Peter Wemm ed7e72e681 Check and warn about unknown devices in the config file along the same
lines as the pseudo-device checking.  Previously 'device xyz0' would have
been silently accepted without comment.
1999-06-03 20:37:19 +00:00
Peter Wemm ef354ff70d Understand 'config kernelname' and pretend it was a
'makeoptions KERNEL=kernelname'.  Warn about any trailing stuff as it's
not handled here.  This is a simple bandaid, hopefully to head off some
complaints from certain people.
1999-05-10 02:42:58 +00:00
Peter Wemm 3e624da0af Put on my viking helmet from the closet, and get out the war axe and
"retire" some more stuff.
1999-05-09 18:54:25 +00:00
Peter Wemm 8fb476c521 We don't have composite devices here either. 1999-05-09 17:48:23 +00:00
Poul-Henning Kamp bb4d56144e config(8) lobotomy, please see commit msg in sys.
(I have no idea why cvs didn't take these changes before.)
1999-05-09 17:23:38 +00:00
Luoqi Chen e07fcb3e2e Make options like NO_F00F_HACK work (with context sensitive lexical rules). 1999-04-27 01:37:01 +00:00
Peter Wemm 061eb3abb3 Bump configvers; when the updates to generic/lint get committed, the old
config has severe indigestion.
1999-04-24 21:38:50 +00:00
Peter Wemm 96217b0fbc More cleanups, tweaks and features.
- make this work:   options FOO123=456   *without quotes*
- grumble (but accept) vector xxxintr, and tty/net/bio/cam flags.
- complain if a device is specified twice (eg: 2 x psm0)
- don't require quotes around:  port IO_COM2
- recognize negative numbers.  (ie: options CAM_DEBUG_UNIT=-1)
- GC some more unused stuff (we don't have composite disks from config(8)).
- various other nits (snprintf paranoia etc)
1999-04-24 18:59:19 +00:00
Peter Wemm 14dd465c07 The Alpha probably wouldn't appreciate getting the pc98 isa port
definitions.  Change it from  machine != I386 to machine == PC98.
1999-04-19 14:40:55 +00:00
Peter Wemm 4498c1f307 Slightly reorder the all: to make sure it's before any alternate kernel
names for debugging etc.  all: should now always be the first target.
1999-04-19 13:53:07 +00:00
KATO Takenori 5fad759c59 Use pc98/pc98/pc98.h instead of isa/isareg.h in PC98 kernel.
Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1999-04-18 14:27:33 +00:00
Peter Wemm e6fbbbe459 Further cleanups. i386_ioconf.c and alpha_ioconf.c were essentially the
same and were merged into a single newbus_ioconf.c.  CG'd some more unused
code.
1999-04-18 13:36:29 +00:00
Peter Wemm 188334f6de Get out the blow torch and hack away all the unused stuff. Note that
I zapped the MACHINE_MIPS stuff, it isn't likely to be useful apart from
recognition of the machine name.  It would be reasonable to expect new
ports would look something like the alpha/i386 from a config perspective.
1999-04-17 14:41:41 +00:00
Peter Wemm 2c43119102 Corresponding minimal changes for kernel configuration after new-bus
commit.
1999-04-16 21:28:10 +00:00
Bruce Evans e05da2e941 Made booting with -a work for all configurations. Previously it
only worked for configurations with "swap on generic".

usr.sbin/config/config.y:
- ignore all "swap [on] device ...' specifications except for
  warning about them.  They haven't done anything related to swap
  for almost 4 years, and were previously silently ignored,
  except for "swap on generic" which stopped swap${KERNEL}.c
  from being generated.  Code to support swapping is now deader
  than before.

usr.sbin/config/mkswapconf.c:
- don't generate a dummy setconf() function in swap${KERNEL}.c.

sys/i386/conf/files.i386:
- swapgeneric.c is now standard.  It should be merged into autoconf.c
  so that it doesn't conflict with swap${KERNEL}.c for kernels named
  "generic".

sys/i386/i386/autoconf.c:
- don't call setroot() for mfs roots.  Since setroot() doesn't do anything
  harmful, this was just a waste of time, except possibly for booting with
  -a it may have helped prevent an undesireable call to setconf() by
  finding a bogus rootdev.
- honor -a for ffs roots.  -a now overrides all other ways of specifying
  the root device.  Previously, -r had precedence over -a, and the -a
  handling was usually a no-op.
- don't honor -a for non-ffs roots, since it would currently just get in
  the way of a clean panic.

sys/i386/i386/swapgeneric.c:
- don't declare things that are now always declared in swap${KERNEL}.c.
  Don't decide things that are now decided in autoconf.c.  Code to
  support the "generic" case is now dead instead of useless.
1999-04-15 14:52:24 +00:00
Peter Wemm b282e6c130 Clean up the -g/DEBUG handling. This logic can go in the Makefile
so that config -g can work the same as:  makeoptions DEBUG="-g"
1999-04-13 18:22:57 +00:00
Greg Lehey 4357ca882d Back out default debug kernel. The flags revert to historical behaviour.
Requested-by:	ache
		bde
		dg

Modify targets for debug kernels:  when -g was specified, make will
now build a debug kernel called kernel.debug, and create a stripped
version called kernel at the same time.  The two targets install and
install.debug are otherwise unchanged.

Requested-by:	dillon

Update man page accordingly.
1999-04-11 03:40:11 +00:00
Andrey A. Chernov 052ce6c70d add -s to usage
PR: 11056
Submitted by: Nickolay N. Dudorov <nnd@mail.nsk.ru>
1999-04-10 14:03:38 +00:00
Andrey A. Chernov fb6a9d37a0 add -s to synopsis 1999-04-10 01:56:20 +00:00
Greg Lehey 84676b86e6 1. Modify config to issue different code for debugging.
2.  Config complains if you use -g:

    Debugging is enabled by default, there is no ned to specify the -g option

3.  Config warns you if you don't use -s:

    Building kernel with full debugging symbols.  Do
    "config -s BSD" for historic partial symbolic support.
    To install the debugging kernel, do make install.debug

    (BSD was the name of the config file I used; I print out the same
    name).

4.  Modify Makefile.i386, Makefile.alpha, Makefile.pc98 and config to
    work if a kernel name other than 'kernel' is specified.  This is
    not absolutely necessary, but useful, and it was relatively easy.
    I now have a kernel called /crapshit :-)

5.  Modify Makefile.i386, Makefile.alpha, Makefile.pc98 "clean" target
    to remove both the debug and normal kernel.

6.  Modify all to install the stripped kernel by default and the debug
    kernel if you enter "make install.debug".

7.  Update version number of Makefiles and config.
1999-04-07 09:42:29 +00:00