[comp.os.minix] First non Intel Minix ?

arthur@warwick.UUCP (John Vaudin) (06/02/87)

We have just pseudo finished a port of Minix to a 32016 based home brew
machine which consists of 32016 CPU, MMU, FPU, ICU, DMA (socket) 1Mbyte RAM.
I/O is a couple of dumb RS232 ports and a twin floppy interface.

The kernel seems to work fine up to the point that is works on a PC, ie as
yet no support for process groups ( imminent ), and no proper support
for CPU generated traps, like MMU abort FPU exception etc. Also the port
has inherited the brain damaged "memory management scheme" of the original,
ie fixed size contiguous processes. However at least they are all protected 
from each other. 

The C library seems to all work, and most of the utilities. However there are
some bugs remaining in some of the utilities. Of the bugs fixed so far most 
are either 16 bit int dependancies, or text AND data start at zero 
dependancies. I am sure the rest will follow fairly quickly, but as this
is only a spare time effort it may take a little time. Also we currently lack
an editor, although hopefully MicroGNUEmacs will be ported shortly. 

All the work has been done using cross support from a VAX running 4.3bsd
using the SVR2 32016 compiler. Unfortunately this means that we have no
compiler to run under Minix. I'm sure we could get the SVR2 one to work
but since you need a SysV licence to run it I guess this would kind
defeat the object of a nice cheap UNIX look alike. I am investigating the
GNU C compiler, which we do have, but it does not generate 32000 code 
(yet :-). An alternative would be to use the ACK, but we do not have the $1000
needed to buy it ( any suggestions anyone ?).

I imagine it would not be difficult to get this port going on any 32000
based system, since MMU etc are all standard, eg ICM3216. Obviously
the device drivers need reworking but the rest should just fly. I guess
however that until the C compiler problem is sorted out and also the
system has been debugged a bit more thoroughly we can't really think
about passing it on.

I hope this proves however that it is not to hard to port Minix to other
processors. The port took about two months part time, for the kernel.
In general I was impressed by the ease of getting the thing to work. My
main moan, is that the code assumes that the bss is zero. This is not
guarateed even on a real UNIX system, and it certainly IS NOT TRUE on my
stand alone 32000 box. The version of the kernel we have does not make these
assumptions any more, but after the hassle caused trying to find them all
I gave up and just zeroed the bss for the mm and fs. I regard this as a 
hack, and would like to see the dependancies taken out, but then it works
so why bother? My second moan is that the code assumes that text AND data
segments start at zero. Now on a PC they do, and so obviously you would expect
this to be wired in somewhere, but when the representation obviously allows
other arrangements then it is bad to assume it ( check out the code on line
2004 for example ). But apart from those two on the whole the job is
refreshingly easy. We have hardly touched the fs at all and then only to fix
genuine bugs, not portability problems. The mm also is fairly untouched
except for the above mentioned problem. The kernel is however fairly 
extensively hacked. The device drivers are different obviously. I think
if I asked the guy who did the tty driver port ( Tim Bissel ) he might
have a thing or two to say about the original. Put politely it is a mess. 
Try converting it to use two seriel line not one PC keyboard and screen, 
and you will see the problem. The so called split into device independant 
and dependant parts is a bit of joke I'm afraid. Our version is better but
still poor by any absolute standards, we hope to do better.

Just to stimulate argument I will say the in my opinion the 32000 is probably
THE ideal Minix machine available. The chip set includes a REAL MMU which
is completely standard across the range of processors. At the low end
a 32016 chip set with MMU FPU ICU can be had for <100 pounds. It provides
comparable performance with the 68000 based machines but without all the
problems associated with that machine when you want to support a real 
operating system such as Minix. Fork is a pain with no MMU and even if you
put one on the CPU won't restart unless you upgrade to a 68010. Things like
Atari's and Amiga's are really not designed for this type of software.

Unfortunately the 32000 is nothing like as popular as the 68000, but as the
Motorola fans are so fond of telling the Intel fans that has nothing to 
with the quality of the product.

Do we get the pize for first working non Intel Minix ???? :-)

	John Vaudin arthur@uk.ac.warwick.ubu
	Tim Bissel  donald@uk.ac.warwick.ubu
 

ast@botter.UUCP (06/04/87)

In article <540@ubu.warwick.UUCP> arthur@ubu.UUCP (John Vaudin) writes:
>We have just pseudo finished a port of Minix to a 32016 based home brew.

Congratulations, although in my experience "pseudo-finished" is not quite 
isomorphic to "finished."

>In general I was impressed by the ease of getting the thing to work. My
>main moan, is that the code assumes that the bss is zero. 
MINIX does not assume the bss is 0.  It explicitly zeroes it itself (see
book, line 6159).  It is not clear why you had a problem.

>My second moan is that the code assumes that text AND data
>segments start at zero. 
Not true.  When the separate I & D flag is given to the compiler, yes, but
the default is that text indeeds starts at 0, but data starts where text
finishes.

Keep the net posted on your work.

Andy Tanenbaum (ast@cs.vu.nl)