It's supposed to be just a matter of installing QEMU:
aptitude install qemu # as root
and then create a disk image, boot a PowerPC emulation system from a Debian PowerPC netinst CD image, and follow the installer instructions...
qemu-img create -f qcow2 debian-ppc.qcow2 10G
qemu-system-ppc -boot d -cdrom debian-testing-powerpc-netinst.iso debian-ppc.qcow2
This will only reward you with the following message
qemu: warning: could not load VGA bios '/usr/share/qemu/video.x'
and nothing else.
So much for theory.
It turns out that the Debian package is missing a binary file, on purpose (no source code). It's mentioned in /usr/share/doc/qemu/README.Debian - the file video.x can be found at the Mac On Linux (MOL) project site:
- download the current MOL source package
- extract it to some temporary directory
- as root copy video.x to /usr/share/qemu:
cp mol-0.9.72.1/mollib/drivers/video.x /usr/share/qemu/video.x
Well, that's unless you know your way around PowerPC, Debian installer, quik and QEMU, like Aurélien Jarno. He maintains pre-installed QEMU disk images of Debian for several architectures, PowerPC included.
I downloaded the PowerPC disk image for Debian/Lenny, and started the PowerPC emulated system like this:
qemu-system-ppc -hdc debian_lenny_powerpc_small.qcowworks like a charm.
Now back to testing my code.
I found out that if I use the QEMU -vnc command line option, in order to setup QEMU as a VNC server, then QEMU (version 0.10.2) crashes if I try to connect to it with a VNC client using low color levels (I used the RealVNC viewer command line option -LowColourLevel 2). It works fine, with some hiccups when changing display modes, if I don't specify any VNC viewer connection options.
[15 Dec. 2009] UPDATE: with QEMU version 0.11.0 the command line has changed (read: has been fixed) and should be:
qemu-system-ppc debian_lenny_powerpc_small.qcow(no need for the -hdc command line option - the disk image comes up as disk hda).