GSoC 2015

Adding Support for Mac OS 9 to QEMU


Though emulation for OS 9 hasn't been perfected, there's enough visible progress into the boot process that users may actually derive some satisfaction from booting the operating system. If you want to see our current progress, I've provided instructions on getting a testing environment set up.

Necessary Tools

You'll need a fairly recent version of GCC to compile QEMU. I'm currently using version 5.1.0, though older versions will work as well. Most Linux distributions offer GCC in their package manager. I cannot help with Mac OS X or Windows as I don't develop for those platforms, but OS X is UNIX-compatible and should work with most of these instructions.

You will also need to have Git installed; the Git Downloads page has instructions for all platforms. I'm using version 2.4.5, so if your system uses an older version (e.g. Debian), my instructions may not work for you.

Make sure that Python 2 is installed and that the system resolves python to the Python 2 intepreter. Some systems (particularly Arch Linux) use Python 3 by default, which will not work.


Create the various testing directories:

$ cd                                        # go to home directory
$ mkdir -p os9-test/qemu{-build,-install}   # create build and install directories
$ cd os9-test                               # we use this as the working directory

Get the latest version of the macos9 QEMU branch:

$ git clone -b macos9

Since this is a development branch, there are some unresolved issues. We have to insert a dummy file to make the install complete:

$ touch qemu/pc-bios/vgabios-virtio.bin

Create a build directory and configure QEMU:

$ mkdir build-qemu
$ cd build-qemu
$ ../qemu/configure --target-list=ppc-softmmu --prefix=$HOME/os9/qemu-install

Now you can build and install QEMU. This may take a while.

$ make && make install

Once you have QEMU installed, you'll need to grab our OpenBIOS binary and the OS 9 install ISO (you may be able to use a different ISO, but this is the one we're testing with). Both are compressed with xz because of their large file size; your OS should have a utility for decompressing them.

Leave the build directory.

$ cd ..

Your directory should now look like this:

├ openbios-qemu.elf
├ os9.iso
├ qemu/
├ qemu-build/
└ qemu-install/

Run QEMU with the following command:

$ cd ..
$ qemu-install/bin/qemu-system-ppc \
> -bios openbios-qemu.elf \
> -boot d \
> -cdrom os9.iso \
> -M mac99 \
> -m 512

I'd recommend putting this in a shell script so you don't have to type it in every time.

Contact Me

If you have any trouble with the environment setup, or if I've made an error or omission, please don't hesitate to contact me. My email is my first name @ this domain.