$Id$

Overview of Solaris Minix
-------------------------

Solaris Minix (smx) is designed to be used as an application program
on a timeshared Sun workstation.  The Minix user should be able to run
smx without affecting other SunOS users or requiring any special
attention from SunOS.  Solaris Minix can be used in a lab-class
situation where each student has their own copy of the Minix source
that they can modify and execute independently of others, even though
they are using the same Sun system(s) to run independent instances of
smx.

The source code for Solaris Minix was originally based on MacMinix
1.5, and the patches developed for that version have been ported to
Version 1.7.2 of Minix.  The operating system is complete with
interrupt handling and context switching written in SPARC assembly
language.  The bulk of the code is written in C and then compiled into
Sun machine code, so no emulation of another processor is used.
  
All of the I/O is eventually handled by SunOS system calls.  Minix
disks are mapped onto SunOS files using a similar method to MacMinix.
The terminals are mapped onto either the controlling terminal of the
SunOS process running Solaris Minix (stdin and stdout) or a fifo
connection for when multiple terminals are being used.  Clock and
keyboard interrupts are generated by the SunOS signals SIGALRM and
SIGIO, with some of the other signals (for example, SIGSEGV) also being
used.
  
This version of Solaris Minix is intended for Suns running Solaris 2.
It has been successfully used under SunOS 5.5.  It is assumed
that the gcc C compiler is available.
  
There are a few commands omitted from SunOS Minix. The main omission
is a C compiler and linker.  Currently, all software is compiled
within the SunOS environment using the minix libraries and header
files.  The binary file is then converted into the Minix executable
format and can be read onto a Minix file system ready to be used.
  
Some of the user programs (badblocks and diskcheck for example) have
little use within Solaris Minix and have not been ported.  Also, the
rs232 and printer tasks have not been implemented, but could be mapped
onto the corresponding SunOS devices if desired.  
  
In Solaris Minix, a configuration file is used to control the boot
process.  The file contains a list of options that specify which SunOS
files should be mapped to which Minix disks, how much memory should be
allocated to Minix, the name of the kernel/MM/FS/init image file and
an optional host name.  It is possible to have multiple instances of
Minix running, each with their own root file system but sharing other
file systems on a read only basis.
  

Summary of contents of the SunOS directory hierarcy:

- disks		        - smx root and usr file systems.
- doc		        - smx documentation
- include		- main include directory ($MX_INCL)
- include/sun		- smx specific include files
- lib			- a candidate for being $MX_LIB.
- src			- start of the source tree
- src/commands		- contains source for all Minix commands (+ subdirs)
- src/commands/sun 	- smx-specific commands, for example sunread.
- src/fs		- file system source
- src/inet              - network server source (currently unused).
- src/kernel		- kernel source
- src/lib		- start of library source tree
- src/lib/sun4		- smx-specific library code.  Included is a script to
                          extract some .o files from the standard SunOS libc.a
                          and add them to the smx libc.a.
- src/lib/sunsyscall    - system call wrappers in SPARC assembler.
- src/mm		- memory manager source
- src/test              - source for test programs.
- src/tools		- init (ps was moved into src/commands/simple).
- src/Solaris		- scripts and programs that run under Solaris.


In terms of making binaries and installing them:

- src/Solaris (including elf and smxboot sub-dirs).  Contains scripts
and programs for use under SunOS.  mcc, cv, sol2sun and combine
support the compilation process.  minix is the bootstrap loader,
and mlogin provides the ability to have multiple terminal session
within smx.

- src/lib.  The files under src/lib are compiled into SunOS libraries
and .o files and are installed in $MX_LIB under SunOS by a "make
install" in src/lib.

- src/{fs,kernel,mm,tools}.  Each directory contains one program (fs,
kernel, mm and init respectively).  These four programs are collected
together to form the boot image, which is a file stored under SunOS
that is used during the booting process to provide the smx load
image.  When networking is added, src/inet will also produce a program
that is included in the image.

- src/commands.  All user commands are stored under src/commands.  The
makefiles supplied create executable files which can be installed into
SunOS Minix using the sunload command.  This command copies the
executable file(s) from SunOS, sets up ownership and permissions, and 
multiple hard links (if applicable).

- src/test.  The test programs are found here.  The testload script is
usually used to load the test programs into smx (/usr/test is where they
are usually found).
