Wrong.
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.
P.S.
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).
thank you, thank you, thank you
ReplyDeleteI've spent that last 24 hours trying to get this work and your blog did the trick.
Which qemu version is it that works
ReplyDeletewith this image - testing this
with Fedora 12, but it fails for me.
Best regards
Mikael Höghede
I'm using qemu version 0.11.0.
ReplyDeleteNote that I was using qemu version 0.10.3 (I think) when this post was written, and it had a bug where you had to specify -hdc in order for qemu to boot the disk image as disk hda - it's not needed anymore.
Hope this helps.
What are you using for bios? Qemu barfed on me saying it couldn't find openbios-ppc. I got a copy from http://packages.debian.org/sid/all/openbios-ppc/download and put it in /usr/share/qemu Now when I run qemu-system-ppc debian_lenny_powerpc_small.qcow2 qemu barfs on "returning from prom_init"
ReplyDeleteFrankly, I wasn't even aware that I needed the openbios-ppc package... it's listed as a dependency of the qemu-system package, and was automatically installed on my box when I installed qemu.
ReplyDeleteopenbios-ppc version on my box is 1.0+svn505-1.
I traced qemu running with just the debian installer cdrom image and found that it accesses the following qemu related files:
/usr/share/qemu/openbios-ppc
/usr/share/qemu/video.x
/usr/share/qemu/keymaps/en-us
/usr/share/qemu/keymaps/common
/usr/share/qemu/keymaps/modifiers
Hope this helps.
Thanks! The solution for me (on Ubuntu) ended up being to uninstall qemu (qemu-kvm), add the debian-squeeze-main repo, and then install qemu-system from the latter.
ReplyDeleteIt works with with Ubuntu 9.04 and Lenny image using command syntax, after installing qemu-system-ppc as stated above and adding video.x as above:
ReplyDeleteqemu-system-ppc -hda debian_lenny_powerpc_small.qcow2
Nice to see this working.
I just kicked off an install like this...
ReplyDeleteqemu-system-ppc.exe -m 512 -boot d -hda debian-ppc.qcow2 -L
pc-bios -M mac99 -net nic,model=pcnet -net user -cdrom
debian-6.0.1a-powerpc-netinst.iso -boot d
And away it goes.. Oh it's Qemu 0.14.0
Thanks for the tip.
ReplyDeleteQEMU and Debian have both evolved in the past two years, so I guess I should give it another try soon.