Subject: checkconf - script for checking kernel config files
To: None <current-users@NetBSD.ORG>
From: Luke Mewburn <lukem@telstra.com.au>
List: current-users
Date: 10/26/1995 12:19:58
Here's the latest version of 'checkconf' - a script I've written that
checks kernel config files.

This version, besides having more up-to-date info, now stores the
descriptions in /usr/local/etc/kern.{devices,pseudo,options} that
is more readable and maintainable than previous versions. Extract
this shar file, and put kern.* into /usr/local/etc.

I'd appreciate any feedback from various portmasters (or others)
on anything that's wrong, especially entries marked with '-->'.

Note that in my perusal of /sys/arch/*/conf/*, I noticed a few
defines, devices, etc, that differ between the ports that could be
made more consistant. I could provide a list if necessary :)

--- cut here --- file: checkconf.shar
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	checkconf
#	kern.devices
#	kern.options
#	kern.pseudo
#
echo x - checkconf
sed 's/^X//' >checkconf << 'END-of-checkconf'
X#!/usr/bin/perl
X#
X# Copyright 1994, 1995 Luke Mewburn <lm@werj.com.au>.  All rights reserved.
X#
X# Redistribution and use in source and binary forms, with or without
X# modification, are permitted provided that the following conditions
X# are met:
X# 1. Redistributions of source code must retain the above copyright
X#    notice, this list of conditions and the following disclaimer.
X# 2. Redistributions in binary form must reproduce the above copyright
X#    notice, this list of conditions and the following disclaimer in the
X#    documentation and/or other materials provided with the distribution.
X# 3. All advertising materials mentioning features or use of this software
X#    must display the following acknowledgement:
X# 	This product includes software developed by Luke Mewburn.
X# 4. The name of the author may not be used to endorse or promote products
X#    derived from this software without specific prior written permission.
X# 
X# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
X# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
X# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
X# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
X# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
X# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
X# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
X# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
X# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
X# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
X# 
X# $Id: checkconf,v 1.13 1995/10/18 06:26:05 root Exp $
X#
X# checkconf --
X#	check the validity of netbsd kernel config files
X#
X# $Log: checkconf,v $
X# Revision 1.13  1995/10/18  06:26:05  root
X# the kern.* config files are in /usr/local/etc
X#
X# Revision 1.12  1995/10/18 04:25:12  root
X# move devices, options, and pseudo devices out into readable
X# sub-files, and parse these files
X#
X# Revision 1.11  1995/10/17 23:57:22  lukem
X# clarify TCP_COMPAT_42 & SBPRO
X#
X# Revision 1.10  1995/08/16  07:41:30  lukem
X# add atari & mvme68k
X# fix devname/devnum parsing of device entry
X#
X# Revision 1.9  1995/07/06  04:53:33  lukem
X# suggest alternatives to OBSOLETE options
X#
X# Revision 1.8  1995/03/13  09:20:01  lukem
X# added hp300, pmax, vax. improved descriptions
X# support for (old-style) config files re-integrated.
X# support for arch specific options/devices/pseudos added.
X#
X# Revision 1.7  1995/03/03  08:46:22  lukem
X# updated entries for alpha, amiga, da30, mac68k, pc532, pmax, sparc, sun3
X# cleaned up/sorted all data structures into a reasonable order
X#
X# Revision 1.6  1995/03/02  13:13:53  root
X# support for multiple depth include files
X# initial macintosh definitions
X#
X# Revision 1.5  1995/02/18  16:09:05  root
X# added amiga definitions
X# cleaned up general defs
X#
X# Revision 1.4  1995/01/24  11:33:28  root
X# updated for config.new & NetBSD 1.0
X#
X# Revision 1.3  1994/08/06  10:01:04  root
X# updated %devices entries for more generic definitions
X# updated %pseudo-devices for the same
X# cleaned up a couple more options
X#
X# Revision 1.2  1994/08/06  08:48:04  root
X# fixed up a few of the descriptions as suggested by Charles Hannum
X#
X# Revision 1.1  1994/08/06  08:33:30  root
X# Initial revision
X#
X
X#
X# TODO:
X#	- entries marked with '-->' need to be clarified
X#	- fix open_relative to work with dirstack, maybe by using "pwd.pl"
X#
X
Xrequire "shellwords.pl";
Xrequire "dumpvar.pl";
X
Xdie("Usage: $0 conf_file\n") unless (@ARGV);
X
X#
X#	constants
X#
X$MAX_COLS =	80;
X$PATH_OPTIONS =	'/usr/local/etc/kern.options';
X$PATH_DEVICES =	'/usr/local/etc/kern.devices';
X$PATH_PSEUDO =	'/usr/local/etc/kern.pseudo';
X
X
X#
X#	known machine types
X#
X%machines = (
X    'alpha',		'DEC Alpha AXP',
X    'amiga',		'Amiga',
X    'atari',		'Atari',
X    'da30',		'DA-30 single-board (not supported anymore)',
X    'hp300',		'HP 9000/300',
X    'i386',		'Intel 386 or higher',
X    'mac68k',		'Macintosh',
X    'm68k',		'Motorola 68000',
X    'mvme68k',		'Motorola m68k VME card',
X    'pc532',		'PC532 NS-32532 based homebrew',
X    'pmax',		'DEC Rxx00 based MIPS workstation',
X    'sparc',		'Sparc',
X    'sun3',		'Sun 3',
X    'vax',		'DEC VAX',
X);
X
X%options =	&parse_info_file($PATH_OPTIONS);
X%devices =	&parse_info_file($PATH_DEVICES);
X%pseudo =	&parse_info_file($PATH_PSEUDO);
X## &dumpvar("main", "options", "devices", "pseudo");
X
X#
X#	changable entries
X#
X
X%geninfo = ();
X%confinfo = ();
X%optinfo = ();
X%devinfo = ();
X%pseudoinfo = ();
X
X
X
X#
X#	slurp in the file
X#
X@fhs = ('FH0');
X&open_relative($fhs[0], $ARGV[0]);
X
Xwhile(@fhs)
X{
X    $curfh = $fhs[0];
X    while (<$curfh>)
X    {
X	chop;
X	s/#.*//;				# remove comments
X	next if /^\s*$/;			# skip blank lines
X	($cmd, @arg) = &shellwords($_);
X
X	ENTRY:
X	{
X	    $cmd eq "include" && do
X	    {
X		local($tfh);
X		$tfh = sprintf("FH%d", int(@fhs));
X		unshift(@fhs, $tfh);
X		$curfh = $fhs[0];
X		&open_relative($curfh, $arg[0]);
X		last ENTRY;
X	    };
X	    $cmd eq "machine" && do
X	    {
X		if (defined($geninfo{'machine'}))
X		{
X		    print "machine already specified as $geninfo{'machine'}\n";
X		    last ENTRY;
X		}
X		$arch = $arg[0];
X		foreach (@arg)
X		{
X		    $geninfo{'machine'} .= ", " if ($geninfo{'machine'});
X		    $geninfo{'machine'} .= $machines{$_} || "${_}[UNDEFINED]";
X		}
X		last ENTRY;
X	    };
X	    $cmd eq "timezone" && do
X	    {
X		$cmd = shift(@arg) * 60;
X		$optinfo{"TIMEZONE"} = $cmd ? " = $cmd" : "";
X		if ($arg[0] eq "dst")
X		{
X		    $optinfo{"DST"} = $arg[1] ? " = $arg[1]" : "";
X		}
X		last ENTRY;
X	    };
X	    $cmd eq "maxusers" && do
X	    {
X		print "maxusers already specified as $geninfo{'maxusers'}\n"
X			if defined($geninfo{'maxusers'});
X		$geninfo{'maxusers'} = shift(@arg);
X		last ENTRY;
X	    };
X	    $cmd eq "makeoptions" && do
X	    {
X		last ENTRY;		# XXX: do something?
X	    };
X	    $cmd =~ /^(cpu|ident|maxfdescs)$/ && do
X	    {
X		$cmd = "options";
X	    };
X	    $cmd eq "options" && do
X	    {
X		local(@opts) = split(',', join('', @arg));
X		foreach $option (@opts)
X		{
X		    local($argname, $argval) = split('=', $option);
X		    $argval = " = " . $argval if (defined($argval));
X		    $optinfo{$argname} = $argval;
X		}
X		last ENTRY;
X	    };
X	    $cmd eq "config" && do
X	    {
X		$cmd = shift(@arg);
X		print "config already specified as $confinfo{$cmd}\n"
X			if defined($confinfo{$cmd});
X		$confinfo{$cmd} = join(' ', @arg);
X		last ENTRY;
X	    };
X	    $cmd eq "pseudo-device" && do
X	    {
X		$pseudoinfo{shift(@arg)} = join(' ', @arg);
X		last ENTRY;
X	    };
X	    $cmd =~ /^(controller|device|disk|tape|master)$/ && do
X	    {
X		$cmd = shift(@arg);
X	    };
X	    $arg[0] =~ /^at$/ && do
X	    {
X		$devinfo{$cmd} = join(' ', @arg);
X		last ENTRY;
X	    };
X	    print "Unknown directive: $cmd.\n";
X	} # ENTRY
X    } # while <file>
X    shift(@fhs);
X} # while fhs
X
X
X#
X#	print the config file's innermost secrets :)
X#
X
Xgrep ((do {$geninfo{$_} = "undefined" unless defined($geninfo{$_})} ),
X	('machine', 'maxusers'));
X
Xprint <<GENINFO;
XFile:       $ARGV[0]
XMachine:    $geninfo{'machine'}
XMax Users:  $geninfo{'maxusers'}
XGENINFO
X
Xprint "\nConfigurations:\n---------------\n";
Xforeach $ent (sort keys %confinfo)
X{
X    &print_block($ent, 16, $confinfo{$ent} || "[UNDEFINED]");
X}
Xprint "[NON DEFINED]\n" unless keys %confinfo;
X
Xprint "\nOptions:\n--------\n";
Xforeach $opt (sort keys %optinfo)
X{
X    $desc = $options{"${arch}:$opt"} || $options{$opt};
X    &print_block($opt . $optinfo{$opt}, 24, $desc || "[UNDEFINED]");
X}
X
Xprint "\nDevices:\n--------\n";
Xforeach $ent (sort keys %devinfo)
X{
X		# the following regex handles 'ncr96scsi'...
X    ($devname, $devnum) = ($ent =~ /^(\D+(\d+\D+)*)(\d+|\*)$/)[0,2];
X    $desc = $devices{"${arch}:$devname"} || $devices{$devname};
X    unless ($desc)
X    {
X	# do nothing
X    }
X    elsif ($devnum eq "*")
X    {
X	$desc = "generic $desc";
X	$desc =~ s/\s*%d\s*//g;
X    }
X    else
X    {
X	$desc =~ s/%d/$devnum/g;
X    }
X    &print_block($ent, 24, $desc || "[UNDEFINED]");
X}
X
Xprint "\nPseudo devices:\n---------------\n";
Xforeach $ent (sort keys %pseudoinfo)
X{
X    $desc = $pseudo{"${arch}:$ent"} || $pseudo{$ent};
X	# num defaults to 32 if pty, or 1 otherwise.
X    if ($num = $pseudoinfo{$ent})
X    {
X	$ent .= " = " . $num;
X    }
X    else
X    {
X	$num = ($ent eq "pty") ? 32 : 1;
X    }
X    $numstr = ($num == 1 ? "" : "s");
X    $desc =~ s/%d/$num/g;
X    $desc =~ s/%s/$numstr/g;
X    &print_block($ent, 24, $desc || "[UNDEFINED]");
X}
X
Xexit 0;
X
X
X#
X# print_block --
X#	display info in the form:
X#
X#  v---------$MAX_COLS------------------v
X#  v--$offset--v  
X#  $tag           $lines
X#
X#	($lines may cross multiple lines. $tag is printed for 1st line only)
X#
X
Xsub
Xprint_block
X{
X    local($tag, $offset, $lines) = @_;
X    local($width) = $MAX_COLS - $offset - 2;
X    local($indent) = '@' . '<' x ($offset - 1);
X    local($para) = '^' . '<' x ($width - 1);
X    local($form) = <<"ENDOFFORM";
Xformat STDOUT =
X$indent $para
X\$tag,  \$lines
X.
XENDOFFORM
X    eval $form;
X    write;
X    $tag = "";
X    write while ($lines);
X} # print_block
X
X
X#
X# open_relative --
X#	changes to basename of given file, and opens it
X#
Xsub
Xopen_relative
X{
X    local($fh, $full) = @_;
X    local($dir, $file) = $full =~ m#(.*)/(.*)#;
X    unless ($file)
X    {
X	$file = $full;
X	$dir = ".";
X    }
X    chdir($dir) || die("$0: can't chdir to $dir - $!\n");
X    open($fh, $file) || die("$0: can't open $full - $!\n");
X} # open_relative
X
X
X#
X# parse_info_file --
X#	parse given file into an associative array. each line
X#	of the file contains "key \t+ value". # is comment to EOL.
Xsub
Xparse_info_file
X{
X    local($file) = $_[0];
X    local(%retval, *FH);
X    open (FH, $file) || die("$0: can't open $file - $!\n");
X    while (<FH>)
X    {
X	chop;
X	s/#.*//;				# remove comments
X	next if /^\s*$/;			# skip blank lines
X	next unless /^([^\t]*)\t+([^\t].*)$/;
X	$retval{$1} = $2;
X    }
X    %retval
X} # parse_info_file
END-of-checkconf
echo x - kern.devices
sed 's/^X//' >kern.devices << 'END-of-kern.devices'
X#
X#	Known devices (master, controller, device, disk, and tape entries)
X#
X# These entries are matched with the regex '(\D+)(\d+|\*)$' for ease.
X# %d is replaced with the actual device number
X#
X# Architecture specific devices can be defined with 'arch:devname'.
X# (for when a device name has a conflicting meaning between multiples archs.)
X# These override any devices of the same 'devname' for that architecture.
X#
X# For new devices, if '([^\*])(\*)' matches, then the %d is removed,
X# and "generic" is appended to the front of the description...
X#
X# $Id: kern.devices,v 1.2 1995/10/18 06:26:18 root Exp $
X#
X
X#
X#	backplanes & card slots
X#
Xalpha:apecs		--> backplane chipset %d
Xalpha:asic		IO ASIC controller %d
Xalpha:sio		Saturn PCI->ISA bridge %d
Xamiga:gvpbus		virtual bus for GVP DPRC-based cards %d
Xamiga:zbus		ZORRO bus %d
Xhp300:hpib		--> HP interface backplane %d
Xisa			alpha, i386 ISA bus %d
Xmac68k:nubus		NuBus %d
Xmainbus			alpha, amiga, atari, mac68k, mvme68k, sparc, sun3 backplane %d
Xmvme68k:iio		mvme68k IO controller %d
Xmvme68k:pcc		peripheral channel controller %d
Xobio			sparc, sun3 backplane %d
Xpc532:membus		backplane %d
Xpci			PCI bus %d
Xpmax:ioasic		IO ASIC on 3MIN, MAXINE, 3MAXPLUS
Xsparc:sbus		S-bus %d
Xtc			alpha TurboChannel bus %d
Xvax:backplane		backplane %d
Xvax:sbi			nexus backplane %d
Xvax:uba			unibus adapter %d
Xvmel			sparc, sun3 VME long backplace %d
Xvmes			sparc, sun3 VME short backplace %d
X
X#
X#	console devices
X#
Xalpha:pcivga		PCI VGA adapter %d
Xalpha:pckbd		PC-style ISA keyboard %d
Xalpha:tga		TGA graphics adapter %d
Xamiga:grfcc		--> some custom chip based graphics %d
Xamiga:grfcl		Picasso II graphics card %d
Xamiga:grfcv		CyberVision 64 graphics card %d
Xamiga:grfrh		Retina III graphics card %d
Xamiga:grfrt		Retina II graphics card %d
Xamiga:grful		A2410 (U. of. Lowell) graphics card %d
Xatari:grfbus		hardware independant graphics driver %d
Xbwtwo			sparc, sun3 mono display %d
Xcgsix			sparc, sun3 accelerated 8 bit colour display %d
Xcgthree			sparc, sun3 8 bit colour display %d
Xcgtwo			sparc, sun3 4 bit colour display %d
Xgrf			amiga, atari, hp300, mac68k graphics display card %d
Xi386:lms		Logitech mouse %d
Xi386:mms		Microsoft InPort bus mouse %d
Xi386:pc			pccons PC console driver %d
Xi386:pms		PS/2 auxiliary port %d
Xi386:vt			pcvt PC virtual multi-console driver %d
Xite			amiga, atari, hp300, mac68k bitmapped terminal %d
Xkbd			amiga, atari keyboard %d
Xkd			serial console keyboard & display %d [OBSOLETE]
Xmac68k:adb		Apple Desktop Bus %d
Xpmax:cfb		PMAG-B colour frame buffer %d
Xpmax:mfb		PMAG-A mono frame buffer %d
Xpmax:pm			--> unknown display %d
Xpmax:sfb		PMAGB-B accelerated colour frame buffer %d
Xpmax:xcfb		personal DECstation onboard colour frame buffer %d
Xsun3:cgfour		--> unknown sun3 colour display %d
X 
X#
X#	cpus, clocks, registers, proms, memory
X#
Xclock			alpha, amiga, atari, mvme68k, sparc, sun3 clock
Xcpu			alpha, sparc, vax cpu
Xeeprom			sparc, sun3 EEPROM
Xfpu			6888[12] numeric co-processor
Xi386:npx		80x87 numeric co-processor
Xsparc:auxreg		auxillary controller %d
Xsparc:memreg		sun4c memory error register
Xsparc:oclock		sun 4/[12]00 clock
Xsparc:timer		counter-timer
Xsun3:idprom		system type & serial number ID PROM
Xsun3:obctl		control space hack
Xsun3:obmem		on-board memory space
Xsun3:prom		--> PROM
Xvax:mem			--> vax memory
X
X#
X#	IDE devices
X#
Xi386:wd			ST506/IDE disk %d
Xi386:wdc		ST506/IDE controller %d
X
X#
X#	floppy devices
X#
Xfd			amiga, atari, i386, sparc floppy drive %d
Xfdc			amiga, atari, i386, sparc floppy controller %d
X
X#
X#	other non-SCSI storage devices
X#
Xatari:ramd		atari ram disk %d
Xhp300:ct		CS/80 cartridge tape drive %d
Xhp300:mt		--> unknown device (no source file?) %d
Xhp300:rd		hp300 hard disk %d
Xi386:mcd		Mitsumi non-SCSI CDROM %d
Xi386:wt			Non-SCSI tape drive %d
Xrd			pc532, sun3 ram disk %d
Xsparc:xd		Xylogics long VME/SMD disk %d
Xsparc:xdc		Xylogics long VME/SMD controller %d
Xsparc:xy		Xylogics short VME/SMD disk %d
Xsparc:xyc		Xylogics short VME/SMD controller %d
Xvax:ra			--> unknown disk %d
Xvax:tms			--> TMS magtape interface component %d
Xvax:tmscp		TMSCP magtape interface %d
Xvax:uda			UDA50 disk interface %d
X
X#
X#	SCSI devices
X#
Xalpha:tcds		--> TurboChannel SCSI controller %d
Xamiga:afsc		A4091 SCSI controller %d
Xamiga:aftsc		A4000-T SCSI controller %d
Xamiga:ahsc		A3000 SCSI controller %d
Xamiga:atzsc		A2091 SCSI controller %d
Xamiga:bzsc		Blizzard II SCSI controller %d
Xamiga:flsc		Fastlane Z3 SCSI controller %d
Xamiga:gtsc		GVP SCSI controller %d
Xamiga:idesc		A4000 & A1200 IDE controller %d (emulates SCSI)
Xamiga:ivsc		IVS SCSI controller %d
Xamiga:mgnsc		Magnum SCSI controller %d
Xamiga:mlhsc		Hacker SCSI controller %d
Xamiga:otgsc		12 gauge SCSI controller %d
Xamiga:wesc		Warp engine SCSI controller %d
Xamiga:wstsc		Wordsync II SCSI controller %d
Xamiga:zssc		Zeus SCSI controller %d
Xcd			SCSI CDROM %d
Xch			SCSI tape changer %d
Xesp			alpha, sparc AIC6360 SCSI controller %d
Xhp300:scsi		98658 based SCSI controller %d
Xi386:aha		Adaptec 154x ISA SCSI controller %d
Xi386:ahb		Adaptec 174x EISA SCSI controller %d
Xi386:ahc		Adaptec 2940 PCI SCSI controller %d
Xi386:aic		AIC6360 SCSI controller %d
Xi386:bt			BusLogic 742 SCSI controller %d
Xi386:sea		--> unknown Seagate SCSI controller %d
Xi386:uha		UltraStor 14f SCSI controller %d
Xmac68k:ncr96scsi	--> Quadra SCSI controller %d
Xncr			alpha, i386 NCR 53C8xx based PCI SCSI controller %d
Xncrscsi			atari, Mac II NCR5380 based SCSI controller %d
Xpc532:ncr		NCR 5380 based SCSI controller %d
Xpmax:asc		--> 5000/2x0 SCSI controller %d
Xpmax:oldscsibus		4.4bsd pmax-specific scsi driver %d [DEPRECIATED]
Xpmax:rz			SCSI disk %d
Xpmax:sii		SCSI interface %d
Xpmax:tz			SCSI tape %d
Xscsibus			SCSI bus %d
Xsd			SCSI disk %d
Xsi			sparc, sun3 VME NCR 5380 SCSI controller %d
Xsparc:dma		sun4c SCSI dma %d
Xsparc:espdma		sparc FSBE/S or sun4m SCSI dma %d
Xsparc:sw		on-board NCR 5380 SCSI controller %d
Xst			SCSI tape %d
X
X#
X#	sound
X#
Xi386:gus		Gravis Ultrasound %d
Xi386:pas		ProAudio Spectrum %d
Xi386:pss		Personal Sound System %d
Xi386:sb			Sound Blaster %d
Xi386:sp			--> AD1848 based Soundport %d
Xmac68k:asc		Apple Sound Chip %d
Xsparc:audio		Sparcstation audio %d
Xwss			alpha, i386 Windows Sound System %d
X
X#
X#	networking
X#
Xamiga:ae		Ariadne (AMD 79C960 based) ethernet %d
Xamiga:bah		CBM ARCnet %d
Xamiga:es		SMC 91C90 ethernet %d
Xamiga:qn		Quicknet ethernet %d
Xde			alpha, i386 DEUNA ethernet %d
Xed			amiga, i386 WD/SMC 80x3, 8216, 3C503, NE[12]000 ethernet %d
Xhp300:hp		HP ISA ethernet %d
Xi386:el			3com 3c501 ethernet %d
Xi386:ep			3com 3c579? ethernet %d
Xi386:is			Isolan ethernet %d [OBSOLETE? - use le%d]
Xi386:we			WD ethernet %d [OBSOLETE - use ed%d]
Xie			i386, sparc Intel 82586 ethernet %d
Xle			alpha lance ethernet %d
Xmac68k:ae		DS8390 based ethernet %d [why not 'ed' - same chipset?]
Xpmax:tt			--> PMAD ethernet %d [???]
Xvax:qe			QBUS ethernet %d
X
X#
X#	serial & parallel
X#
Xamiga:mfc		MultiFaceCard I/O board %d
Xamiga:mfcp		MFC parallel port %d
Xamiga:mfcs		MFC serial port %d
Xamiga:msc		A2232 MSC serial card %d
Xamiga:par		parallel port %d
Xcom			alpha, i386 serial port %d
Xhp300:dca		HP 98644A serial comms interface %d
Xhp300:dcl		HP 98628A serial comms link %d
Xhp300:dcm		HP 98642A serial comms multiplexor %d
Xhp300:ppi		HPIB printer/plotter interface %d
Xi386:ast		4 port serial card #%d
Xi386:rtfps		serial comms multiplexor %d
Xlpt			alpha, i386, pc532 parallel port %d
Xpc532:scn		serial port %d
Xpmax:dc			serial port %d
Xpmax:dtop		--> desktop serial interface %d
Xscc			alpha, pmax i82530 dual UART serial port %d
Xser			amiga, mac68k serial port %d
Xzs			atari, mvme68k serial port %d
END-of-kern.devices
echo x - kern.options
sed 's/^X//' >kern.options << 'END-of-kern.options'
X#
X#	Known options
X#
X# Architecture specific options can be defined with 'arch:option'.
X# (for when an option has a conflicting meaning between multiples archs.)
X#
X# $Id: kern.options,v 1.3 1995/10/18 06:26:18 root Exp $
X#
X
X#
X#	CPUs
X#
XFPCOPROC		6888[12] support
XFPSP			68040 FPU support
XFPU_EMULATE		atari, sun3 6888[12] FPU emulation
XM68020			68020 support
XM68030			68030 support
XM68040			68040 support
XMC68030			68030 support [OBSOLETE - use M68030]
XMC68040			68040 support [OBSOLETE - use M68040]
Xalpha:DEC_2000_300	DEC AXP 2000/300 "Jenson" support
Xalpha:DEC_2100_A50	DEC AlphaStation 4000 4/233 "Avanti" support
Xalpha:DEC_3000_300	DEC AXP 3000/300 "Pelican" support
Xalpha:DEC_3000_500	DEC AXP 3000/[4-9]00 "Flamingo" support
Xhp300:HP320		HP 9000/320 support
Xhp300:HP330		HP 9000/{330,318,319} support
Xhp300:HP340		HP 9000/340 support
Xhp300:HP350		HP 9000/350 support
Xhp300:HP360		HP 9000/360 support
Xhp300:HP370		HP 9000/370 support
Xhp300:HP375		HP 9000/{375,345,400t,400s} support
Xhp300:HP380		HP 9000/{380,425t,425s,433s} support
Xi386:I386_CPU		80386 support
Xi386:I486_CPU		i486 support
Xi386:I586_CPU		Pentium support
Xi386:MATH_EMULATE	i387 floating point emulation [why not FPU_EMULATE?]
Xpmax:DS3100		DECstation [23]100 support
Xpmax:DS5000		generic DECstation 3MAX & TC (config.new) or 5000/{xx,1xx,200} (config.old) support
Xpmax:DS5000_100		DECSTATION 5000/1xx (3MIN) support
Xpmax:DS5000_200		DECstation 5000/200 (3MAX) support
Xpmax:DS5000_240		DECstation 5000/240 (3MAXPLUS) support
Xpmax:DS5000_25		DECstation 5000/25  (MAXINE) support
Xpmax:DS5000_260		--> DECstation 5000/260 support [HOPEFULLY ;]
Xsparc:SUN4		Sparc sun4 architecture support
Xsparc:SUN4C		Sparc sun4c architecture support
Xsparc:SUN4M		Sparc sun4m architecture support
Xsun3:SUN3_110		Sun 3/110 support
Xsun3:SUN3_160		Sun 3/160 support
Xsun3:SUN3_260		Sun 3/260 support
Xsun3:SUN3_50		Sun 3/50 support
Xsun3:SUN3_60		Sun 3/60 support
Xvax:VAX630		VAX 11/630 support
Xvax:VAX750		VAX 11/750 support
X
X#
X#	misc stuff
X#
XDST			daylight savings is used by RTC
XDUMMY_NOPS		speed hack; will break on some machines
XGENERIC			generic swap support
XLKM			loadable kernel modules
XTIMEZONE		timezone to adjust RTC by (minutes west of UTC)
Xi386:USER_LDT		user creatable i386 LDTs (for WINE Windows emulator)
X
X#
X#	tuning
X#
XBUFPAGES		number of pages (MAXBSIZE long) in buffer cache
XMACHINE_NONCONTIG	support for non-contiguous physical memory
XMAPMEM			--> hp300, macintosh memory mapping [OBSOLETE?]
XMAXFDESCS		--> Maximum # of file descriptors
XNBUF			number of buffer headers for swap (33%) & cache (67%)
XNKMEMCLUSTERS		size of kernel malloc area in pages
XNMBCLUSTERS		number of mbuf clusters (default 256, or 512 with GATEWAY)
XSHMMAXPGS		maximum pages for SYSVSHM, default = 1024 pages
XSYSVMSG			System V-like message queues
XSYSVSEM			System V-like semaphores
XSYSVSHM			System V-like memory sharing
Xpc532:CONFIG_NEW	--> Using config.new (pc532)
Xpmax:NEWCONF		--> Using config.new (pmax)
Xsun3:NEWCONFIG		--> Using config.new (sun3)
X
X#
X#	debug
X#
XCOMADDR			--> IO address of kernel serial console [OBSOLETE]
XCOMCONSOLE		tty line to use as kernel serial console
XCOMUNIT			--> unit number of kernel serial console [OBSOLETE]
XDDB			in-kernel debugger
XDEBUG			set to -g for full symbol table
XDIAGNOSTIC		internal consistancy checks
XKGDB			in-kernel gdb debugger
XKGDBDEV			in-kernel gdb device number
XKGDBRATE		in-kernel gdb serial port rate, default = 9600
XKTRACE			system call tracing, a la ktrace(1)
XPANICWAIT		wait for keypress until reboot [OBSOLETE]
XPCIVERBOSE		verbose output when probing PCI bus
XPRF_INTERVAL		interval of profiling interrupt
XPROFTIMER		enable profiling timer [OBSOLETE]
XSCSIDEBUG		debug specific SCSI target
XSYMTAB_SPACE		--> bytes allocated to symbol table
XSYSCALL_DEBUG		--> amiga, pmax syscall debugging
Xatari:PANICWAIT		prompt for confirmation of panic dump
Xhp300:HILVID		--> unknown hp300 option [OBSOLETE]
Xhp300:PANICBUTTON	two fast console <reset>s dump kernel [OBSOLETE]
Xsun3:CONTEXT_DEBUG	--> context switch debugging
Xsun3:EXEC_DEBUG		--> exec() debugging
Xsun3:PMAP_DEBUG		--> pmap() debugging
X
X#
X#	memory, I/O
X#
XCOMDEF_SPEED		default speed of tty lines
XDEVPAGER		allow mmap() of devices
XFASTLINKS		store short symlinks in 4.2UFS inode [OBSOLETE]
XSCSI			--> old generic SCSI system [OBSOLETE]
XSWAPPAGER		paging of processes [REQUIRED]
XUCONSOLE		allow non-root users to aquire console with TIOCCONS
XVNODEPAGER		allow mmap() of files
XXSERVER			allows machine to be an X server with PCVT
X
X#
X#	filesystems
X#
XADOSFS			Amiga DOS file system (read only)
XCD9660			ISO 9660 + Rock Ridge file system
XFDESC			/dev/fd
XFFS			standard BSD disk FS
XFIFO			FIFOs
XISOFS			ISO 9660 + Rock Ridge file system [OBSOLETE - use CD9660]
XKERNFS			/kern kernel file system
XLFS			log-structured file system (experimental)
XLOFS			loopback file system [OBSOLETE - use NULLFS]
XMFS			memory file system (shares memory and swap space)
XMSDOSFS			MS-DOS file system
XNFS			NFS support [OBSOLETE - use NFSCLIENT,NFSSERVER]
XNFSCLIENT		Network File System (NFS) client
XNFSSERVER		Network File System (NFS) server
XNULLFS			null file system (incorporates lofs)
XPCFS			MS-DOS file system [OBSOLETE - use MSDOSFS]
XPORTAL			portal file system (sockets visible as files?)
XPROCFS			/proc file system
XQUOTA			quotas in UFS
XUMAPFS			null file system (with uid & gid remapping)
XUNION			union file system
Xalpha:UMAP		--> typo for UMAPFS? [OBSOLETE - use UMAPFS]
X
X#
X#	networking
X#
XCCITT			X.25
XEON			OSI tunnelling over IP?
XGATEWAY			packet forwarding (also double num of mbufs to 512)
XHDLC			X.25 HDLC (needed by CCITT)
XIMP			host-to-IMP from ARPAnet days [OBSOLETE]
XINET			IP + ICMP + TCP + UDP [REQUIRED]
XISO			OSI
XLLC			X.25 LLC (needed by CCITT)
XMROUTING		multicast routing
XMULTICAST		multicast networking - always there [OBSOLETE]
XNFS_BOOT_RWSIZE		NFS read/write size for mount at boot
XNS			xerox XNS protocol
XTPIP			connection-based (a la TCP) protocol for ISO
X
X#
X#	compat
X#
XCOMPAT_09		NetBSD 0.9 binary compatibility
XCOMPAT_10		NetBSD 1.0 binary compatibility
XCOMPAT_42		Change UDP checksumming default to OFF
XCOMPAT_43		4.3BSD compatibility
XCOMPAT_44		4.4BSD binary compatibility
XCOMPAT_NOMID		NetBSD 0.8, BSDI, 386BSD binary compatibility
XCOMPAT_RENO		4.3BSDreno binary compatibility
XCOMPAT_SUNOS		SunOS 4.x compatibility
XCOMPAT_SVR4		SVR4 & Solaris 2.4/x86 binary compatibility
XTCP_COMPAT_42		4.2BSD TCP/IP bug compatibility
Xalpha:COMPAT_OSF1	OSF/1 static binary compatibility
Xda30:OLD_EXEC		DA-30 support for old ZMAGIC binaries [OBSOLETE]
Xhp300:COMPAT_HPUX	HP-UX binary compatibility
Xhp300:COMPAT_NOLABEL	Use default partitioning for unlabeled hp300 disks
Xhp300:COMPAT_OHPUX	HP-UX <=7.05 binary compatibility
Xi386:COMPAT_FREEBSD	FreeBSD binary compatibility
Xi386:COMPAT_IBCS2	Intel binary compatibility
Xi386:COMPAT_LINUX	Linux binary compatibility
Xpmax:COMPAT_ULTRIX	ULTRIX binary compatibility
X
X#
X#	(in)security
X#
XFDSCRIPTS		exec Execute only scripts via /dev/fd
XINSECURE		run at securelevel = -1
XSETUIDSCRIPTS		allow Execute only and SetUID scripts via /dev/fd
X
X#
X#	amiga specific
X#
Xamiga:CL5426CONSOLE	use CL5426 as console
Xamiga:GRF_A2024		A2024 graphics adapter
Xamiga:GRF_AGA		AGA chipset graphics
Xamiga:GRF_CL5426	Cirrus CL5426 graphics
Xamiga:GRF_ECS		Enhanced Chip Set graphics
Xamiga:GRF_NTSC		NTSC graphics
Xamiga:GRF_PAL		PAL graphics
Xamiga:RETINACONSOLE	use Retina as console
Xamiga:ULOWELLCONSOLE	use A2410 as console
X
X#
X#	atari specific
X#
Xatari:HZ		clock rate
Xatari:FALCON_SCSI	SCSI support for Falcon
Xatari:FALCON_VIDEO	Graphics support for Falcon
Xatari:ST_POOL_SIZE	--> smallest pool that allows TT-HIGH
Xatari:TT_SCSI		SCSI support for TT
Xatari:TT_VIDEO		Graphics support for TT
X
X#
X#	hp300 specific
X#
Xhp300:MAPPEDCOPY	use page mapping for large copyin/copyout
Xhp300:USELEDS		make the lights twinkle
X
X#
X#	i386 specific
X#
Xi386:PCVT_NOFASTSCROLL	don't enable fast scrolling for pcvt console
Xi386:SBPRO		SoundBlaster Pro [OBSOLETE]
X
X#
X#	pc532 specific
X#
Xpc532:CON_BRK_PANIC	3 breaks on console; ask to panic
Xpc532:DEV_RTC		/dev/rtc access to hardware clock
Xpc532:NO_INLINE_SPLX	don't inline splx() calls
Xpc532:PLIP		Parallel port IP
Xpc532:RAMD_ADR		address of boot-strap ram disk
Xpc532:RAMD_SIZE		size (in bytes) of boot-strap ram disk
Xpc532:RD_SIZE		size of ramdisk (in bytes)
X
X#
X#	sparc specific
X#
Xsparc:RASTERCONSOLE	fast rasterop console
Xsparc:RCONSOLE		fast rasterop console [OBSOLETE - use RASTERCONSOLE]
X
X#
X#	sun3 specific
X#
Xsun3:HAVECACHE		Sun 3/260 VAC cache controller
Xsun3:MINIROOTSIZE	size of ramdisk miniroot (in 512byte blocks)
Xsun3:RAMDISK_HOOKS	hooks for initializing the ramdisk
X
X#
X#	vax specific
X#
Xvax:ETHER		--> ethernet support
END-of-kern.options
echo x - kern.pseudo
sed 's/^X//' >kern.pseudo << 'END-of-kern.pseudo'
X#
X#	Known pseudo devices
X#
X# %d is the actual argument
X# %s is "" if %d == 1, else "s"
X#
X# Architecture specific pseudo-devices can be defined with 'arch:pseudodev'.
X# (for when a name has a conflicting meaning between multiples archs.)
X#
X# $Id: kern.pseudo,v 1.3 1995/10/18 06:26:18 root Exp $
X#
X
Xaudio			/dev/audio [OBSOLETE]
Xbpfilter		berkeley packet filter (%d FD%s maximum)
Xccd			concatenated disk driver, %d device%s
Xether			ethernet [OBSOLETE]
Xhp300:ite		--> bit-mapped terminal emulator, %d screen%s
Xi386:speaker		speaker queue [OBSOLETE?]
Xlog			kernel gateway into syslogd [OBSOLETE]
Xloop			network loopback, %d interface%s
Xmouse			amiga, atari mouse, %d port%s
Xpmax:fb			%d framebuffer%s
Xpmax:rasterconsole	support %d raster console%s on an fb pseudo-device
Xpmax:rcons		redirected console from appropriate source [OBSOLETE]
Xppp			point-to-point protocol, %d interface%s
Xpty			%d pseudo terminal%s
Xsl			compressed SLIP, %d interface%s
Xsparc:kbd		keyboard
Xtb			tablet line discipline
Xtun			network tunnelling over tty
Xview			--> amiga, atari view (graphics mapping), %d port%s
Xvn			%d vn virtual file system device%s [OBSOLETE - use vnd %d]
Xvnd			%d vnd virtual file system device%s
END-of-kern.pseudo
exit

--- cut here ---

-- 
Luke Mewburn <luke.mewburn@itg.telstra.com.au>

                I'd rather be a UNIX wizard than a Web serf.