This is the i386/oskit specific configuration directory.

There are several scripts in this directory to aid in the build process.
These scripts assume that you already have the oskit built and installed,
and that you know the path to the install directory. You should also have
the oskit build tools on your path.

****************************************************************************
			*** VERY IMPORTANT ***

If you have Version 0.96 of the oskit, you must first apply the patches in
the file ./oskit-patches-0.96 to your oskit source tree. Reconfigure,
rebuild and reinstall your oskit! You *do not* need to apply the oskit
patches if you have Version 0.97 or later.

If you have the daily snapshot of Kaffe OpenVM dated Jan 4 1999 or
later (based on 1.0 Beta 3 but considerably changed from that), you
must also apply the patches in the file ./kaffe-patches to your Kaffe
tree. These patches worked against the Jan 4 1999 snapshot;
snapshots since then are not guaranteed to work with these patches,

Note this restriction: currently the only display support for
Kaffe/OSKit kernels is to use the OSKit's xclient support to display
on another machine that runs an X server.

****************************************************************************


(*) config-oskit.sh:

This script will configure Kaffe to be built on the oskit. It is just a
small front end script to the Kaffe configure script, adding a few
configuration options that are required when building on the oskit. There
are some environment specific options that need to be changed, either by
copying the script and editing it, or by passing them in as command line
options. Please look at the first part of the script to see what needs to
be changed. Also note that the oskit is built using ELF tools, so you need
to make sure that you unset OBJFORMAT, or make sure that elf tools are your
default.


(*) config-oskit-unix.sh:

Same as config-oskit.sh, but configures Kaffe to run on a "unix process"
enabled version of the oskit. This gives you the ability to run Kaffe/Oskit
kernels as a unix process and debug them with GDB. A couple of points to
note:

	* The oskit must have been built with the --enable-unixexamples
	  option, which allows oskit applications to be run as unix
	  processes.
	
	* The Oskit was built with a.out tools, so you must arrange to
	  build Kaffe with a.out tools. Do "setenv OBJFORMAT aout"

	* Kaffe sees whatever filesystem your unix process has access to.

	* The initial current working directory is the root directory.

	* Your shell enviroment variables are passed into Kaffe, so your
	  CLASSPATH enviroment variable should be set accordingly.


(*) mkimage.sh:

This script builds a multiboot image from Kaffe plus other stuff.  The
multiboot image contains the files specified, and results in a memory based
filesystem being created by the oskit kernel at boot time. By default, the
output file name is called "Image." Like the other scripts, there are some
environment specific options that need to be changed, either by copying the
script and editing it, or by passing them in as command line options.
Please look at the first part of the script to see what needs to be
changed.

The most important arguments to mkimage.sh are the -dir args, which specify
which directories to place into the multiboot image. You can specify as
many -dir args as you like. The minimum usage would be:

	mkimage.sh -dir /tmp/foo -dir /tmp/fee

which will add the contents of those two directories (and all their
subdirs/files) to the image.  By default, you alway get the contents of the
Kaffe install/share/kaffe directory, which includes the standard kaffe
class files Klasses.jar and pizza.jar.

The other important consideration is the default CLASSPATH. Since there is
no "easy" way to pass a long environment string to an oskit kernel, the
oskit/kaffe startup code will read a file from /etc that contains the
default classpath. This file is called /etc/kaffe_classpath, and is the
usual colon separated list of names. This script will add that file to the
boot image. Note that the target file resides in /etc, but the source file
can reside anywhere, such as the current directory where this script is
executed. It defaults to the value of "kaffe_classpath", but can be specified
as a command line option to this script using the --classpathfile= option,
or by changing the CLASSPATHFILE variable in the mkimage.sh script.

*** What should the CLASSPATH be? When the multiboot image is booted, the
filesystem it sets up will have the same layout as all the directories
given with the -dir option, plus the default Kaffe install/share/kaffe
directory. In addition, the current working directory of the OSKit kernel
will be the root directory. So, in the example above, the filesystem will
contain /tmp/foo (and all its subdirs/files), /tmp/fee (and all its
subdirs/files), and $prefix/share/kaffe (and all its subdirs/files).
Therefore, the CLASSPATH in your classpathfile might look like:

	.:/tmp/foo:/tmp/fee:$prefix/share/kaffe/Klasses.jar

where $prefix is expanded out, not a shell variable. There is an example
kaffe_classpath file in this (config/i386/oskit) directory.

*** Can the initial current working directory be changed? Yes, you can
change the initial working directory of Kaffe by specifying a CWD option
when the boot image is invoked. Options of the form FOO=bar result in the
creation of an environment variable FOO. When Kaffe starts up, it will look
for the CWD environment variable, and if it exists, chdir to that location.
For example:

	NetBoot> fuggles:/z/tmp/Image CWD=/tmp/foo -- HelloWorldApp

*** Can a different classpathfile other than /etc/kaffe_classpath be
specified? Yes, when you start the oskit, you can change the name of the
classpathfile to any other file in the multiboot image by using the
environment variable command line option. That is, you can add
CLASSPATHFILE=some_file_name to the oskit the command line, and that
becomes an environment variable that the oskit/kaffe startup code will look
for before attempting to open the default file /etc/kaffe_classpath.
