head	1.1;
access;
symbols
	dws_pl15i:1.1
	cluster_15h:1.1
	dws_pl15h_ibcs:1.1;
locks; strict;
comment	@# @;


1.1
date	94.02.26.22.05.12;	author dws;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Added iBCS emulation support.
@
text
@Pseudo-BSD-Style Kernel Configuration for Linux, Release 1.0
============================================================

In an attempt to make Linux kernel configuration a little more like the
config-file-based scheme used in 4.xBSD, SunOS 4, OSF/1 etc. I've come
up with a "config" shellscript (based on an old version of the standard
Configure script) which works in a roughly similar fashion to the BSD
/etc/config program, replaces Linux's Configure script (generates
.config and autoconf.h files), and uses a new file format superficially
similar to that used by /etc/config (hence "pseudo-BSD-style", or pBs).

Another script (based on a different version of Configure 8-) called
"confconv" automatically converts an existing "config.in"-format
file to my pBs format and adds some default values for things not
specified in the config.in file.

I've also included a couple of patches to change the kernel Makefile
and tools/version.c so that the default video mode, RAMdisk size,
kernel image file name, and root device can be specified in the pBs
config file, and a kernel identifier is incorporated into the kernel
banner string.

This release tested with the 0.99.14 kernel source and to a lesser
extent, 0.99.15. The patches are against the 0.99.15 source.


Files
-----

config		The config script. Usage: config [-v] <config-file>
		(-v prints lines as they are read)
confconv	Script to convert config.in file to pBs config file
		(stdin to stdout).
version.c.diff	Patch to /usr/src/linux/tools/version.c
Makefile.diff	Patch to /usr/src/linux/Makefile
ARTHUR		Example pBs config file for 0.99.15
README		This file


Installation
------------

Make directory /usr/src/linux/conf and copy config and confconv there.
Apply diffs.

To compile kernel:
cd conf and run "confconv <../config.in >FOO", edit FOO to taste.
Run "config FOO"
cd .. and make zlilo (or whatever)
("make config" also needed if sound drivers configuration required)


Makefile changes
----------------

Since the kernel Makefile has no way of knowing the name of the config file
you want to use, the "make config" target has been kludged a little: it now
runs an interactive shell to let you run config by hand, then does the
drivers/sound config stuff as usual. Not very neat, but I couldn't
figure out anything better without major hacks. Also beware of putting
the config script in the /usr/src/linux directory...


pBs config file syntax
----------------------

Broadly similar to BSD config files: one directive per line, comments
precededed by '#'. Unsupported features are comma-separated multiple
"options" directives, continuation lines and probably other esoteric things.
Duplicate lines are not checked for.

Directives are a simple subset of BSD's which map reasonably well onto
Linux configuration, plus some Linux-specific things which are handy:

	ident <name>

	Gives an identifying name (traditionally uppercase) 
	to this kernel configuration. Incorporated into kernel banner
	string in version.c with supplied patch (in place of "(root@@foo)").

	cpu <type>

	<type> can be i386, i486 or i586 - the latter two will switch on
	-m486 optimisation (equivalent to CONFIG_M486 in config.in).
	May be extended if Linux/68k ever gets integrated or a
	Pentium-optimising gcc is released 8-)

	options [<symbol> | <symbol> = <number> ]

	Specify a configuration option (boolean or integer). Equivalent
	to CONFIG_* symbols in config.in, minus the CONFIG_. Note spaces
	are needed round the '='.

	config <image> root on [<device> | CURRENT]

	Specify root device (ROOT_DEV in Makefile) and a kernel image
	filename (used both in build directory and for installed
	kernel). "/dev/" is assumed to prefix <device>.

	videomode <mode>

	Equivalent to kernel Makefile SVGA_MODE symbol: ie <mode> is
	a mode number or one of NORMAL_VGA (80x25), EXTENDED_VGA
	(80x50) or ASK_VGA (interactive).

	ramdisk <size>

	Equivalent to kernel Makefile RAMDISK symbol.

	# <comment>			

	Comment propagated to output.

	#<comment>
	
	Comment not propagated (useful for commenting out directives).


confconv
--------

The conversion rules are as follows:

input:					output:

* <comment>				# <comment>
bool <prompt> <variable> y		options <variable>         # <prompt>
bool <prompt> <variable> n		#options <variable>        # <prompt>
int <prompt> <variable> <num>		options <variable> = <num> # <prompt>

Lines in false if/then/else/fi clauses are output but commented-out.

"options CONFIG_M486" is a special case and instead output as "cpu i486"
to conform to the BSD scheme more closely.

Automatically inserted into the pBs file are the directives:

	ident DEFAULT

	config vmlinux on CURRENT

	videomode NORMAL_VGA

Syntax checking in both scripts is quite lazy, but probably not likely
to result in major weirdness.


To Do
-----

The next major development will be to implement multiple configuration
support as in BSD, ie. a separate build directory tree for each
differently-named kernel configuration, with a single source tree. One
obvious problem here is /usr/include/linux/autoconf.h. Watch this space...

--
Scott Telford (s.telford@@ed.ac.uk), 94/02/20.
@
