Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 1995 17:11:52 +0800 (CST)
From:      Brian Tao <taob@gate.sinica.edu.tw>
To:        Michael Smith <msmith@atrad.adelaide.edu.au>
Cc:        hackers@FreeBSD.org
Subject:   Re: Kernel configuration/compilation tool
Message-ID:  <Pine.BSI.3.91.950728163943.23040S-100000@aries>
In-Reply-To: <199507280449.OAA08807@genesis.atrad.adelaide.edu.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 28 Jul 1995, Michael Smith wrote:
> 
> I've been tinkering with the idea off and on for a while; the real
> stress lies in designing the syntax for the options/devices/etc 
> definition file, so that it can be parsed easily and yet be
> straightforward for new entries to be added.

    That's was one of the things I was wrestling with in my mind on
the flight over to Taiwan from Frisco (almost 12 hours).  Using the
LINT config as a starting point, you find the following keyword
breakdown:

      1 config
      1 ident
      1 machine
      1 maxusers
      1 tape
      3 cpu
      6 disk
     20 pseudo-device
     23 controller
     54 device
     67 options

    The single-occurence keywords along with "cpu" can be easily
answered by the user.  Most of the remaining keywords can be
configured with a simple binary decision on the part of the user
(e.g., a checkbox or a "Yes/No" question).  Some take additional
arguments (IRQ setting, port address, drive number, etc.).  Others are
only conditionally relevant (e.g., device "sc0" and "vt0" cannot be
active in the same kernel).  To make things easier for the user,
related keywords should be grouped together (e.g., all NIC's in one
place, all soundcards in another section, etc.).

    So, each line to be output into the kernel config file must be
associated with a category name, a list of arguments and parameters,
a format string (used to output a config file line), a dependency
list, and a description field.  The dependency list sounds hard to
make foolproof... I'd settle for a text warning and entrusting the
user to do the right thing.  A simple example (colon-delimited
fields):

general:options \"CHILD_MAX=%d\":Default maximum number of processes

    The util sees "options \"CHILD_MAX=%d\"" and knows that it needs
an integer supplied by the user.  That value is substituted for %d and
the resulting string output to the config file.  This and other
options labelled "general" will be presented on one section/page of
the config util.

    There ought to be more extensive guidelines than the short
comments associated with each option, and options that take more than
one parameter ought to have additional text telling the user what each
value means.  This is a start, at least.  Implementation details can
be ironed out once someone sits down and starts writing some code to
parse the config config.

> To do this 'right' will actually be fairly meaty project; you may want to
> use something like XF as a dialog designer to help your visualisation out.
> (This sort of thing requires multiple toplevels, which XF doesn't do so
> well, so you can't use it as a designer)

    I don't think XF has been updated for Tk4.0, has it?  I'm content
at the moment with typing in commands at the wish prompt and seeing
things pop up in the window.  :)  exmh 1.6.1 is running here now, and
I'll bet the equivalent written in Motif will be three times the size,
take up three times as much memory and run one-third as fast.  ;-)

> Regardless, count me in as an interested party.  I'd also be interested
> to know if there was much interest in a format/slice/partition/newfs/mount
> tool with a 'spiffy' frontend...

    That's another area I wanted to tackle.  In fact, if add in enough
utils to twiddle with most of the files in /etc, you'll end up with a
SMIT-like utility for FreeBSD, which would be a Good Thing when it
comes to getting newbies up and running.
-- 
Brian ("Though this be madness, yet there is method in't") Tao
taob@gate.sinica.edu.tw <-- work ........ play --> taob@io.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.91.950728163943.23040S-100000>