$Id: install,v 1.1 1996/03/20 20:01:19 paul Exp $
  
Setting up and starting MINIX
-----------------------------

1) There are a number of Solaris binaries and scripts that you need in your
path before going any further.  

STEP 0: Check your search path for install and gcc using the commands:

which gcc
which install

If which fails to locate gcc then you will need to install gcc before
proceeding.  Minix installation relies on the SVR4 version of install,
so if which reports that install is picked up from /usr/ucb you must change
your path so that the SVR4 version of install (in /usr/sbin) is the one used.


STEP 1: Create a directory for MINIX.  Go there.


STEP 2: Type: m=`pwd`

At this point the variable $m refers to the directory you are now in.
If you are using csh then you will have to type the following instead:

setenv m `pwd`


STEP 3: Untar the smx tar file in $m.


STEP 4: Now you have to edit the Makefile in $m/src/Solaris so that
DESTDIR specifies the directory that you want the Solaris binaries and
scripts in.


STEP 5: Inside $m/src/Solaris, type: make install


STEP 6: Put the smx binary directory (DESTDIR from STEP 4) in your $PATH.

For each of the following programs, use which to check that the 
the program picked up from your search path is the program
in the smx binary dicrectory:

combine     mcc         mlogin
cv          minix       sol2sun


STEP 7: Set MX_INCL and MX_LIB

The mcc script and some Makefiles rely on the correct setting of
the MX_INCL and MX_LIB environment variables.  MX_INCL should be
set to the full pathname of the include directory and MX_LIB
to the full pathname of the directory into which the library
files will be installed.


STEP 8: Next, the libraries must be created.  Do a "make install" in
$m/src/lib.  The libraries will be installed in the $MX_LIB directory.


2) The OS load image consists of 4 programs---kernel, mm, fs and init.
All 4 can be generated by doing a "make image" in $m/src/tools.
This creates an OS boot image in the file $m/src/tools/image.


3) All of the commands are under $m/src/commands.  Simple, one source
file commands are in the simple directory, with more complex ones
having their own directories.  If you do a "make all" in $m/src/commands
then all of the program binaries will be created.  Solaris Minix comes
with file systems that contain all of the standard program binaries,
so you need't do a "make all" as part of the installation process.  If
you modify a program, the best way to load it onto a SunOS Minix file
system is to use the sunload command from within smx.  Before
you can use sunload you have to change the sunload script within 
smx so that sunosdir gives the full (SunOS) pathname of the
$m/src/commands directory.


4) Change to the $m/src/tools directory and run minix using the shell 
command line:

minix .minix

This works because there is a .minix file in $m/src/tools that contains
correct pathnames relative to $m/src/tools.  You will probably want to 
create your own .minix file that contains full pathnames so that
you can run minix without needing to change to $m/src/tools.  Instructions
are given below.


5) You can now log into smx 1.7.2 as root.  The smx command "shutdown now"
shuts down minix in a controlled fashion, ensuring that all file
systems are sync'ed before terminating smx.


Setting up for your own configuration
------------------------------------

  A configuration file can be used to specify a setup for your Minix
system.  Typing 'minix <config file>' can be used to select a
particular configuration, otherwise the current directory then your
home directory are searched for the file '.minix'.  Each line of the
'.minix' file must contain an option followed by a suitable value
(blank lines are ignored).  The possible options are:

	# -   begins a comment line (must be the first character on
	      the line).

	hdx? -where ? is a number from 0 to 7.  This specifies which
	      SunOS file will be used for each of the Solaris Minix disks.
	      It is best to use absolute SunOS pathnames here, otherwise
	      names are taken to be relative to your current directory
	      when you start up smx.
	      
	image - This is the name of the file that contains the kernel,
	      MM, FS and init code.

	host - This option is needed to give your Minix system a name
	      so that the 'mlogin' program can be used.  For more
	      details, see the entry for mlogin in doc/manual.

	memory - Specifies the amount of memory to be allocated for
	      your Minix system.  The units used are kilobytes.
	      
	protect - specifies the level of memory protection to be used.
	      Level 'none' gives no protection, level 'half' puts read and
	      execute protection on text segments, while level 'full' 
	      gives almost complete memory protection (as a SunOS
	      process would experience). 'half' is the default since
	      'full' will considerably degrade the performance of
	      Minix. It is also possible to give a command line
	      option eg. '-mnone', '-mhalf' or '-mfull' to the 'minix'
	      boot program.

	debug - either 'on' or 'off' can be specified. This will enable
	      or disable the debugging functions in the file
              'src/kernel/debug.c'. This is equivalent to the command
	      line option '-d'.
	
  image and hdx0 (the root file system) must be specified.  If memory is
not specified then the default is 2048Kb.

  It is a good idea to edit the existing '.minix' file
so that the disks and image file are given their absolute pathname on
your SunOS system.



