qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Qemu/PPC and OpenBSD


From: Daniel Jacobowitz
Subject: [Qemu-devel] Qemu/PPC and OpenBSD
Date: Sun, 11 Mar 2007 18:04:31 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

This is as far as I was able to get to booting OpenBSD/macppc under
qemu.  Posting in the hopes that it will be useful to someone, or
motivate someone who understands PCI better than I do to give me a
nudge in the right direction.

- Take the OpenHack'Ware 0.4.1 tarball.
- Apply the patch from qemu/pc-bios/ohw.diff.
- Apply the patch attached to this message.
- Unpack a zlib 1.2.3 tarball and rename it to src/libz in OHW.
- Get a powerpc-linux cross compiler.
- Build OHW by 'make CROSS_COMPILE=powerpc-linux-'.
- Point qemu at the build copy with an appropriate -L option.
- Boot qemu like this:

./obj/ppc-softmmu/qemu-system-ppc -hda openbsd.img -cdrom cd40.iso \
  -L OpenHackWare-release-0.4 -boot d -M mac99

You can get cd40.iso off of ftp.openbsd.org.

I added zlib support, because the OpenBSD boot image is compressed
ELF.  It's not pretty, but that part works fine.  I also made it work
with my 4.1-based compiler, fixed a cosmetic bug in printf, and
provided /memory/available since OpenBSD relies on it.

Right now it hangs initializing ADB.  The Cuda starts starts out at
0x80896000, then moves to 0x80816000 at some point during PCI
initialization.  OpenBSD stalls trying to get a response from it at
the first address when qemu thinks it's at the second address.  I
don't know where it's supposed to be, but I would guess this is a
problem in the emulation of the PCI controller.

The console is a bit messed up too.

-M g3bw: Seems to be the same.  The console doesn't stop updating
earlier in the boot, so something is a tiny bit happier, but cuda
still gets stuck.

-M prep: doesn't check for ADB, so doesn't hang there.  Crashes later.
Not sure where, GDB couldn't backtrace far enough.

-- 
Daniel Jacobowitz
CodeSourcery

Attachment: ohw-bsd.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]