Bringup History of Mac OS X

The heritage of different operating systems has been discussed many times. Mac OS X includes code from Mach and BSD, AmigaOS is based on TRIPOS, MS-DOS is a CP/M-86 clone and Windows NT is modeled after VMS. But what machines and operating systems were used for cross-compilation and bringup of these systems? In order to find this out about Mac OS X, I talked to a few people working at NEXT and Apple, and people that worked on Mach and BSD.

Currently, Apple only ships Intel-based machines. Mac OS X for Intel was released in 2006. The Intel version had been “leading a secret double life” since 2000, i.e. Mac OS X existed for Intel all the time, but was not released. In that time, Mac OS X was never self-hosting; instead, it was cross-compiled on PowerPC Macs. The first released version of Intel Mac OS X was a version of 10.4 for the Pentium 4 based “Developer Transition Kit” in 2005.

The first version of what would later be Mac OS X was “Rhapsody DR1” released in 1997. It ran on PowerPC 604 Macintoshes (the 603 was not supported because it lacked a hardware pagetable walker) and was cross-compiled from OpenStep 4.2 running on Intel Pentium II CPUs. Rhapsody, which was basically OpenStep 5.0, also continued to run on Intel, but as mentioned before, Intel became a second-class architecture. Actually, somewhere between Rhapsody and OS X 10.0, there was a time when the GUI was not built for Intel.

Nextstep 3.1 from 1993 was the first version of Nextstep/OpenStep to support Intel CPUs (and also PA-RISC and SPARC) next to the existing Motorola 68K support. Bringup was done on a 25 MHz 68040 NeXTstation running NextStep 2.1, and the target CPU was a 486DX50.

At NEXT, the systems used for bringup of the original 68030 NeXT Computer were Sun machines running SunOS 3.0, a BSD-derivative. The NEXT engineers ported the Mach 2.0 kernel from VAX to M68K. So this port was not only cross-architecture, but cross-OS.

Mach 1.0 was first written for VAX and was brought up on VAX-based 4.2BSD machines at Carnegie-Mellon University. Coincidently, 4.2BSD evolved into SunOS 1.0 (and 4.2BSD/VAX machines were used for its bringup), and the BSD codebase also ended up in Nextstep.

Now that we arrived at BSD, we could go back the history of UNIX, which I am not going to do at this point.

So, to summarize, BSD/VAX was used to develop Mach/VAX, and SunOS/M68K was used to port Mach to 68K, Nextstep/68K was used to port itself to i386, and the i386 version to port itself to PowerPC, and then the PowerPC version to maintain the i386 version. Today, Mac OS X for Intel is self-hosting again.

Now I would love to see is the same kind of bringup history for Linux (Minix, …), AmigaOS (SunOS 1.x, …), BeOS, Copland (Mac OS?), Windows NT (VMS? DOS?), OS/2 (DOS? AIX?), MS-DOS (CP/M?), and of course the common bringup ancestors of so many systems, BSD and UNIX. It would also be interesting to extend this information with the respective compilers used. So if you can contribute something in the comments here or on your blogs, that would be great.

12 thoughts on “Bringup History of Mac OS X”

  1. As far as I remember AmigaOS was developed on Sun based SunOS systems – at that time Sun used Motorola 68K cpus in their workstations…

  2. Nice article. According to On the Edge, the AmigaOS developers first shared a Sage 68k machine. Given the era (82-83), it was almost certainly a Sage II.

    They described using an emulator while the Lorraine board was still being built. It is likely that they only emulated the custom chips and executed the 68k instructions natively on the Sage. Lorraine was completed in Sept 1983, so at that point they probably were able to test on actual hardware although still building elsewhere.

    They only got Sun workstations after the Commodore acquisition, say Aug 1984. Since the Sun-2 series was released in Nov 1983, it’s likely those were the models the Amiga developers got.

    In summary, the first Amiga demo software and then port of TripOS was developed on an emulator running on a shared Sage II and then later built on Sun-2 workstations.

  3. I don’t know, if there are all details correct, but there is this story about the development of the “DOS extender” (DOSX.EXE) of Windows/386 and Windows 3.x (used for the “Windows standard mode”), which brought the protected mode to Windows. One of the guys of the OS/2 development team at Microsoft used the MS CodeView debugger, which was recently extended with a DOS extender and Windows support, to run Windows step-by-step with the DOS extender. In his spare time he changed the code line by line using the debugger, until Windows worked well in protected mode. Basically, the DOS extender from this debugger was shipped with Windows 3.x and even Windows 95.

    The story is not about cross-compilation. But I love the idea, that the first Windows running in protected mode was build on the basis of a component of their own DOS debugger.

  4. MirBSD was brought up by native compilation from OpenBSD at first, since they did not diverge that much. Incrementally. Some things, like the ELF transition, were harder (we changed our compiler (newer than OpenBSD’s) and kernel first, then had an ELF capable kernel with a.out userland, then ELF userland, finally ELF kernel and bootloader with some help from OpenBSD and NetBSD again). This is somewhat valid for i386 and sparc, until MirBSD #7. I did not succeed at cross-building sparc from i386 at that time.

    The i386 GNAT compiler was cross-built from GNU/Linux.

    MirOS #7 to #8 transition lost sparc (due to lack of time) and involved so many changes that the MirOS #10 sparc support was cross-compiled from MirBSD/i386 instead, including Ada this time (incidentally, this was easier than cross-compiling Perl).

    I plan on cross-bootstrapping Java™ 7 for i386 from OpenBSD/i386, since the original plan (IcedTea/OpenEmbedded) is badly manageable.

    Since cross-OS and cross-architecture stuff is problematic, I try at all times to keep being self-hosted; for major library transitions, I build myself a fully statically linked system first.

  5. FWIW, Linux was brought up by on Minix on a 386 (same machine that was used to run it). It became self-hosting when Linus Torvalds accidentally trashed his Minix partition, and decided to finally bite the bullet and make it good enough to use as his primary OS.

  6. re: bd_

    Isn’t that how it always happens? I made the the switch to Linux in 1996 when my hard drive died and when I got a new drive, I couldn’t find my Win95 CD. I had a slackware CD I got from a friend, installed it and haven’t looked back.

  7. Mac OS crosscompiled from LisaOS that crosscompiled from Apple /// that crosscompiled from Apple //

    NetWare never become selfhosted it always was compiled from DOS.

    OS/2 crosscompiled from DOS also.

    Windows NT x86 crosscompiled at first from MIPS, the X-Box crosscompiled from Windows 2000 and the X-Box 360 from a specially ported PowerPC G5 version of Windows XP.

    BeOS first was designed for AT&T Hobbit processor, but this never saw light, and then moved to PowerPC. The x86 version was compiled from PowerPC.

Leave a Reply to Alex Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.