Compiling and Configuring Kernels

To compile the kernel, cd to /usr/src/vino and type "make".

If you are cross-compiling, cd to /vinoroot/usr/src/vino and type "vmake". You should have /vinoroot/usr/HOSTARCH/bin in your path, where HOSTARCH is the system type you are cross-compiling from (probably either i386-netbsd or i386-bsdi). This directory contains useful things like i386-vino-gcc, as well as "vmake", a special copy of VINO's make with cross-compiling information built into it. Most source whose makefiles use <> and things like that will cross-compile for VINO automatically if you use "vmake".

You can run make in any source directory (except for those in roots/sys) and all the right things will happen.

To configure the kernel, edit CONFIG before running make. If there is no CONFIG, copy CONFIG.generic to CONFIG and then edit it. If you change the config after compiling part of the system, you should make clean before continuing to compile. (In fact, for most config variables, you only have to clean a selected few files; we choose not to document which ones on the grounds that such documentation can easily become wrong and thus is worse than useless.)

The source tree is set up to permit keeping multiple configurations built at once, but it doesn't all quite work yet. So consider it something that will appear in a future release.

The following config variables are defined. Note that things of the form "USE_BLAH" should be commented out, not set to zero, to disable them. Also note that since CONFIG is included into makefiles, setting other random variables or typing other random text into it may cause strange errors.

CONFNAME generic Name of this configuration. This controls where object files appear. This is part of the mechanism for supporting multiple configurations. You don't need to change it.
USE_ADAPTEC enabled Enable the Adaptec SCSI ISA driver.
USE_BUSLOGIC disabled Enable the Buslogic SCSI ISA driver. (The Buslogic card will run as an Adaptec card, but not as efficiently.) If you enable both the Adaptec and Buslogic drivers, the system will most likely refuse to boot.
USE_DDB enabled Enable the in-kernel debugger. The system may not build without this in this release.
USE_STATS enabled Enable statistics collection.
USE_DEBUG enabled Enable various debugging features. The system may not build without this in this release.
USE_LEAKCHECK disabled Enable code that traces memory leaks. This can make the system somewhat unstable.
DIAG special Set default values for the diagnostic output flags of various kernel subsystems. The only one that actually is "connected" to the config file is the filesystem one.
MACHINES special Each MACHINES line consists of four fields: hostname, ethernet address, root partition name, and swap partition name. If VINO detects the specified ethernet address, the hostname and default partitions will be set to those listed. CONFIG.generic contains settings for our test machines.
DEFMACHINE ??? ??? DEFMACHINE specifies the default root and swap partitions if none of the ethernet addresses match. The default value is "??? ???", which forces the user to type something valid in at boot time.
HOST_* /usr/bin/* These variables are used when cross-compiling to specify the tools to build executables that can run on the host platform. The defaults work in our environment; you will probably need to change them.
CTAGS /usr/contrib/bin/ctags This variable specifies the tags program to use with "make tags".

Configuring Device Drivers

If you need to configure one of the NetBSD device drivers (or add a device driver that we left out of VINO), you can go to /usr/src/vino/roots/sys/arch/i386/compile/VINO and muck around with the NetBSD autoconf stuff. If you know enough about config(8) to do this without running a NetBSD configure, great (and please get in touch with us to explain certain details...) but you'll probably need to muck with the NetBSD config file we used.

Here's a procedure for doing that, although it can be dangerous and we don't really support (or encourage) it:

1. Copy roots/sys/arch/i386/conf/VINO to a NetBSD 1.2 machine. It's a NetBSD config file. Put it in the kernel source tree in the appropriate place (/usr/src/sys/arch/i386/conf), and run config on it. This will generate a directory /usr/src/sys/arch/i386/compile/VINO.

2. Copy VINO to VINONEW, edit to taste. Any driver you can put in a NetBSD 1.2 kernel config ought to work, although some might turn out to be uncompilable. Setting options is a bit less likely to work. Mucking with root and swap partition configuration is guaranteed not to work. Configuring ptys and vnode devices and so forth will have no effect.

3. Run config on VINONEW, generating /usr/src/sys/arch/i386/compile/VINONEW.

4. Diff VINO and VINONEW, and save the output as a patch file. Apply this patch to roots/sys/arch/i386/compile/VINO in your VINO source tree. Changes to the Makefile will probably have to be applied manually, but the rest should go ok.

5. Copy your VINONEW config onto roots/sys/arch/i386/conf/VINO in case you repeat this procedure later and forget where you left the new config.

6. Make (or vmake) distclean in roots/sys/arch/i386/compile/VINO. Then recompile the VINO kernel. Hold your breath, and try booting the results.