Subject: fwd:Alternative mac operating system
To: None <macbsd-general@NetBSD.ORG>
From: kr <kr@shell.portal.com>
List: macbsd-general
Date: 12/11/1994 02:53:22
This might be of interest to some of you, as a "cross"-development platform.
==============================================
>Date: Sat, 10 Dec 94 06:34:01 PST
>Errors-To: wbp@netcom.com
>Message-Id: <ee9c2d80@esprit.camcon.co.uk>
>Errors-To: brad@tazboy.JPL.NASA.GOV
>Reply-To: altmacos@tazboy.JPL.NASA.GOV
>Originator: altmacos@tazboy.jpl.nasa.gov
>Sender: altmacos@tazboy.JPL.NASA.GOV
>Precedence: bulk
>From: Jonathan.Kimmitt@camcon.co.uk (Jonathan Kimmitt)
>To: kr@shell.portal.com
>Subject: Alternative mac operating system
>X-Listprocessor-Version: 6.0c -- ListProcessor by Anastasios Kotsikonas
>
>
>Since this mailing list is about alternative mac operating systems,
>I thought subscribers might like to know about a new program,
>similar to MacMiNT, which is now available for Quadra Class macs
>
>As well as the nic.switch.ch site, I have uploaded the latest version
>to suniams1 in the incoming/Patmos directory
>
>Although superficially similar, it works in quite a different way to
>MacMiNT, and it is totally incompatible with VM, RamDoubler, etc.
>At the moment it also crashes with Appletalk on but I mean to fix this.
>
>Most software (including gcc) will compile with no source code changes.
>Even programs that use pipe(), fork(), and mmap() should work in theory.
>
>______________________________________________________________________
>
>Patmos README
>
>    Patmos "Protected address translation mode operating system" is an
>application that brings the advantages of protected mode programs to your
>Quadra
>class macintosh. By the simple expedient of taking over the memory management
>unit of the 68040 in a very simple kernel (<100K in size), we immediately gain
>compatibility with the BSD unix program environment. The advantages of
>this are
>as follows:
>
>(a) You can run certain programs (such as /bin/sh) designed for MacBSD
>(b) You can compile almost all GNU software including C and C++ without
>modifying the source code in any way
>(c) All programs run with a flat 32-meg address space, with no worries
>about 32K
>segments or the other mac paraphernalia
>(d) The majority of program bugs can be caught cleanly without crashing
>your mac
>(e) All your files are shared between Patmos and MacOS so you can edit using
>your favourite mac editor, then immediately compile in Patmos without
>having to
>reboot or copy files around.
>
>The downside is that not all macs use the memory management unit in the same
>way, or even have the same kind of MMU, so Patmos may not run on your
>particular
>mac model. However, since the kernel source code is very small, the task of
>adapting it to a new environment is very simple, and once achieved, all
>application programs running in user mode are enabled to run without even
>recompiling.
>
>Currently supported kernel functions:
>
>Protected mode addressing
>32Meg virtual address space
>Berkley a.out executable model (argc, argv, envp) etc.
>linear program growth (sbrk,mmap etc.)
>dynamic process sizing (no need to calculate size requirements in advance)
>HFS (hierarchical filing system) interfaced to BSD syscalls (open, read, write
>etc.)
>
>Partially supported but still buggy:
>
>dynamic stack resizing (true alloca etc.)
>pipes
>
>Not supported (yet)
>
>maths co-processor support
>pre-emptive multitasking
>signals
>termcap (non glass TTY)
>
>Currently ported software
>
>C, C++ (gcc-2.5.8)
>as (gas-1.38)
>ld,ar etc. (binutils-1.7)
>make (gmake-3.70)
>gzip (gzip-1.2.4)
>sed (sed-2.05)
>grep (grep-2.0)
>ls,mv,rm etc. (fileutils-3.1)
>sort,head,tail etc. (textutils-1.3)
>test,env,basename (shellutils-1.5)
>
>Installation
>
>If you have the latest version of Patmos it will be organised
>into 3 self-extracting modules:
>
>/bin.sea
>/usr.sea
>/src/Patmos.sea
>
>You can obtain this software by anonymous ftp
>
>from nic.switch.ch in the /software/mac/src/Patmos subdirectory
>
>The absolute minimum you need to do anything is the kernel (the Patmos
>application) and shell (sh). This will allow you to determine whether
>Patmos can
>run on your machine. These files are present in the /bin.sea archive, together
>with most of
>the small programs that you can typically run from a UNIX shell
>The /usr.sea archive contains everything needed to compile and run a C program
>that uses the stdio library. This includes everything mentioned above including
>the compiler itself.
>The /src/Patmos.sea archive contains what is needed to re-compile or debug
>the Patmos kernel. You will also need THINK C 5.04 or later. For your
>convenience
>the library include files are already converted to THINK format to drop right
>into
>your THINK-C folder. You will need to turn off the normal THINK-C standard
>libraries
>and headers because they are incompatible with BSD UNIX on the whole. This can
>be
>done by putting brackets () around the (C libraries) folder in the THINK
>folder.
>This procedure is documented in the THINK manuals.
>
>Create a top level folder, called 'root' for example on your hard disk.
>Extract
>the
>archive(s) into this folder. Copy sh from the bin folder into the root.
>It is desirable but not essential to create /tmp and /var/tmp directories to
>hold temporary files for the compiler.
>
>You should end up with a structure much like this.
>
>HD80:
>  root:
>    Patmos
>    sh
>    COPYING
>    bin
>    usr
>    src
>    tmp
>
>The root directory '/' for Patmos will be the folder containing the first file
>opened. After startup. This is conveniently done by dragging and dropping the
>'sh' in the 'root' folder onto the 'Patmos' Application.
>You can use other directory structures if you wish but this is untested.
>If you have an older version of Patmos the structure and archive names
>may be slightly different but things should still work the same.
>
>You do not need to set the memory size requirements of Patmos programs
>but you do need to set the total partition. This should be as large as possible
>leaving room for the system, your favourite editor, and the finder.
>3000K should be adequate to compile a noddy program
>6000K would be typical if you are using make and/or build scripts
>9000K should be sufficient if you want to rebuild the compiler or your latest
>multi-megabyte epic project.
>
>Getting started.
>
>Turn off virtual memory, RAM doubler, Appletalk before attempting to run
>Patmos. Other obscure system extensions could interfere as well.
>Make sure you boot in 32-bit moe. I hope to have a version
>compatible with Appletalk soon, but Patmos takes over the MMU so it is
>fundamentally incompatible with Apple virtual memory and RAM doubler.
>You can still use Autodoubler etc. if you have it to reduce the size of your
>executables. Since all filing system calls are via the toolbox, the operation
>of this type of program is transparent to Patmos.
>
>At startup, the Patmos application will perform some basic checks to see
>if the
>machine seems suitable before continuing. It will also consult a database of
>tested machines to warn you if your machine has ever been tested before.
>You can
>add to this database in the application by editing STR# resource 128. Just add
>the name of your machine as it appears in the "About this macintosh" box. Once
>you are happy Patmos is working, you can startup by simply dropping the sh
>program on the Patmos application. Note that the location of the sh program
>becomes the root of the filing system for that session, so you will need two
>copies of sh, one in your root folder, and one in your /bin folder.
>
>To compile and run a program you will need
>
>/usr/lib/crt0.o
>/usr/lib/libgcc.a
>/usr/lib/libc.a
>/usr/bin/{gcc,cpp,cc1,as,ld}
>
>You can prepare your source code with an editor such as the freeware BBEdit-
>2.2.2, be sure to choose the 'UNIX line endings' option when you save the
>source
>file. A typical compilation command would be
>
>gcc plugh.c where plugh.c is your program
>
>this will generate an executable in the current directory, called a.out by
>default
>Run this program by typing
>
>a.out
>
>The program's output will appear in the console window, or else a diagnostic
>message giving an error, and the CPU registers at the time of the error,
>and if
>possible, the offending instruction.
>
>If you are unfamiliar with the usage of the GNU software, all the source code
>and manual pages and documentation should be available from the same site you
>got Patmos from, as well as many other places. The most convenient way to get
>new source code to compile and run is on the many CDroms that are available.
>
>The majority of recent mac
>models use a cut down 68LC040 with no maths co-processor so the kernel
>and most programs assume the co-processor is unused. You could alter
>the kernel to save the FPU context if you have a full 68040 and this would
>then work in conjunction with gcc -m68040. You might need to edit the gcc specs
>file.
>
>Enjoy!
>
>License.
>    The Patmos kernel is copyright c1994 by Jonathan Richard Robert
>Kimmitt. It
>also incorporates as well as the author's work, libraries which are copyright
>the University of California (Berkley). The dissassembly that you get when a
>program crashes is copyright Free Software Foundation, as is the majority
>of the
>application software including the compiler. You may freely copy this software
>but you must make the source code available to anybody you distribute this
>software to, or tell them where they can get it. For full details, see the
>file
>COPYING
>    If you like this program, send a postcard with your suggestions for
>improvements, what mac you tried it on, etc. to
>
>Jonathan Kimmitt
>4 Moyne Close,
>Cambridge,
>CB4 2TA
>ENGLAND
>
>    Or if you are excessively lazy, you can send e-mail with your feedback to
>jrrk@camcon.co.uk
>
>

Greetings
Markus Krummenacker