To build and run Nachos on Mac OS X, you should need a copy of the NachOS source and the Mac OS patch available here. You will also need a reasonably recent version of the Mac OS X binutils (provided with Xcode). First, place the patch file in your Nachos root directory. The contents of that directory should look similar to the following:
COPYRIGHT c++example code coff2noff osx_ppc.patchFrom the root directory of your Nachos copy, run the following commands:
$ patch -p0 < osx_ppc.patch $ cd code/build.osx_ppc $ ln -s ../build.solaris/Makefile Makefile $ make depend $ make (optional) $ ./nachos -K # this will run the nachos thread test; the output should be correct.
For information on how to build the test programs, refer to the instructions for building Nachos on Linux here.
You will likely have to add something like the following to the Makefile.dep for coff2noff:
# If Mac OS X ifeq ($(osname),Darwin) hosttype = x86Darwin # PPC Macs are big-endian. Intel macs are little-endian. ifeq ($(shell uname -p), powerpc) HOSTCFLAGS = -DHOST_IS_BIG_ENDIAN endif endif