[comp.os.minix] Atari ST Minix - first impressions

bammi@dsrgsun.ces.CWRU.edu (Jwahar R. Bammi) (10/22/88)

A quick review of ST Minix (v 1.2 i guess):

Publisher:   Prentice Hall
Order #:     0-13-584391
Manual ISBN: 0-13-584434-7
Price (US) : $79.95 + shipping
Authors    : Andrew Tanenbaum  Johan Stevenson  Jost Muller

Distribution: 9 single sided 3 1/2" floppies + 70 page manual. The
OS book by Andrew Tanenbaum is not included in the above package.
If you are knowledgable about Unix, the book is not required to run/use
Minix, but in my opinion even if you are, the book is still very worth
buying. Highly recommended reading.

Hardware Required: Minix will run on almost any ST/MegaST
configuration.  Single/Double sided floppies, hard disk (you need a
atari sh204/212 hard disk, more on this later).  The console driver
supports both mono (25 and 50 lines) and color monitors. There is
support for various national keyboard types (via an utility). As
distributed, it is configured for a minimal ST (1 single sided drive,
512K memory, any monitor). There is adequate documentation in the
manual on how to reconfigure for the various hardware configurations.
The built in clock on the megaSt is supported.

Software Supplied: Comes with complete source and binaries as
described in the Minix book. Also included is a C compiler, libraries
etc. The source for the C compiler is not included, the library source
is all there.  Left as an excercise for the reader are drivers for the
serial port, midi, and cart. ports. The distribution includes drivers
for floppy, hard disk, keyboard, screen and printer, all with source. I
have begun writing a serial driver, and it looks like its going to be
do-able.

Installation: The instructions in the manual are more than adequate to
install Minix on any configuration. The installation went very
smoothly on all the configurations i tried. One small point in the
installation instructions. The instructions seem to use the word
`sector' to mean `block' when referring to the third parameter of
`mkfs' in the instructions for setting up hard disks. The useage is
correct for floppies, but not hard disks in my mind. This caused me a
little grief because i was not thinking and blindly following the
instructions, but no big deal.

Experience: For some of us old hands from the PDP V6/V7 era, this is
almost like deja vu. It smells like, it feels like a Pdp v6/v7 unix
system but with the additional benefit of having a large linear address
space thrown in. Minix will use as much memory as you have. The root
file system is loaded into ram disk (which thereafter becomes the root
partition) from floppy/hard disk on startup. The size of the ram disk
is determined by the size of the partition it is initialized from, so
its totally flexible.  The minimum size is around 140K, a very
workable size i have found to be 256K, and if you have the luxury of
globs of memory, you can make it as large as you want. The hard disk
support allows you to use any partition(s) on any drive(s) for minix
file system(s), so it co-exists with TOS partitions quite nicely. The
hard disk driver supports multiple drives too. Utilities are provided
to read/write/list directories from/to TOS partitions on hard disks or
a floppy. The differences between the Ibm Pc and ST versions are
adequately documented. There is an interesting chapter in the manual
about the ST implementation, especially the bit about implementing
fork()/exec() semantics on a 68K. There is also adequate documentation
in the manual for recompiling Minix itself on various hardware
configurations and also on recompiling the stuff using the Alcyon
compiler. The only place where the documentation is really weak is on
details of the C compiler, libraries and associated utilities. Except
for the C compiler details, i will not complain too strongly because
the source for the libraries and associated utilities are in the
distribution, and i have a unix system right next to the St to do a
man anytime i want. The C compiler seems to be quite stable, though
the code produced is nothing to write home about. My biggest gripe
would be that it uses 6 passes to produce an executable (cpp/parser,
optimizer, code generator, assembler, linker and load format
converter). An interesting project would be to combine atleast the
linker and the converter, and maybe the optimizer and the code gen.
Unfortunately the sources for these are not supplied. Performance
wise, Minix is no speed daemon, nor is it intended to be. But the
source is "with you", and that leads to some interesting
possibilities...  (i wish i did'nt have a thesis to do :-)

More experience: In my way of looking at things, to really get some
experience, you got to roll up the sleeves and get your fingers dirty.
So i set out to port MicroGnuEmacs (mg V2a). I am happy to report that
it is up and running under Minix, with all the facilities like Dired,
regex, forking shell etc etc. I also went into the Minix archives at
bugs.nosc.mil and pulled down some upgrades and utilities. So far i
have the following:

	df/mount/umount - enhanced to store the state in /etc/mtab,
		          df reports bsd style sizes in K bytes or
			  the traditional i-node style
	ed		- i had to have this to start  me up, mined
			  was driving me up the wall. Now that mg2a is
			  up i don'nt really need it.
	ls		- enhanced ls, does columns, puts * and /'s etc
	make	        - pd make (from the same original source as the
			  TOS make that we posted the diffs for). The
			  supplied Make is a little strange.
	mg		- MicroGnu emacs V2a
	more		- enhanced more (pager)
	sh		- the sh as distributed by ast for v1.3 of minix

Be my guest and grab any of this stuff via anonymous FTP from
dsrgsun.ces.cwru.edu (129.22.16.2) from the directory ~ftp/pub/minix.
A note about the Mg port: I have'nt worked in the keybinding stuff for
special keys (function, arrows) as yet, but i will be doing so. So you
may or may not want to grab Mg just yet.

More on Hard Disks:
The supplied hard disk driver works fine with an atari SH204/212 hard
disk and the atari supplied HDX. I also tried with a Supra 20M. It almost
works, "close but no cigar". It gets some DMA interrupt which it does'nt
like, and it even manages to do a mkfs, copy files etc, but you keep
getting spurious interrupt messages, and finally the kernel panics -
el crashola. So quite obviously only a small fix is need somewhere in
the hard disk driver code, and since Supra also supplies the source to
its Dma functions, it seems like it should be do-able to put 2 and 2
together.

A few random notes:
	- always #define ATARI_ST when including stuff from the system
	  include directory, otherwise it leads to errors.
	- use chmem on cem and cv for even medium size progs.
	- the document suggests that you create a 512K ram disk on a 
	  1 Meg ST. This is nice because you have a large /tmp and also
	  have space to shove a few passes on the C compiler into /lib,
	  but it creates problems when you have say mg running from a
	  shell, and you try to fork(). The fork() fails always due to
	  lack of memory. I set up my root in a 256K ram disk, that gives
	  me enough space in /tmp to do most compiles. I only had to
	  cc -T/usr/tmp to link Mg.
	- The docs say that minix will use hard disk partitions larger than
	  TOS's max of 16M. Using the atari HDX util, it will not let
	  you create partitions > 15.9M (why atari does this BS is
	  beyond me). Using the Supra utilities you can create
	  partitions > 16M, but for some reason (that i have'nt looked
	  into as yet) mkfs fails when you specify > 16K blocks (or it
	  could very well be that i did something wrong). Everything
	  works just fine for partitions < 16M (even with the Supra utils).
	- I am having the hardest time trying to make a chmem'ed cem to
	  run from Make. I guess the work around is to exec cc or maybe
	  the passes themselves instead of doing a exec sh -c.

Coming up:
	- Fix up Mg fully (special key support)
	- serial driver
	- i am working on Prabhaker to bring up Gulam. Send him fan mail!!

I guess thats it for now, after about a day and a half with minix.

	Congratulations are certainly in order to the authors.
			THANK YOU ast, johan and jost.
-- 
usenet: {decvax,sun}!cwjcc!bammi		jwahar r. bammi
csnet:       bammi@dsrgsun.ces.CWRU.edu
arpa:        bammi@dsrgsun.ces.CWRU.edu
compuServe:  71515,155