[Top][All Lists]

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

[Qemu-devel] QEMU under FreeBSD

From: Brion Vibber
Subject: [Qemu-devel] QEMU under FreeBSD
Date: Fri, 6 Feb 2004 04:23:43 -0800

Since my fast x86 box is running FreeBSD 5.2, I thought I'd give QEMU a whirl under it. It doesn't compile natively yet, but the 0.5.2 i386 Linux binary is pretty much willing to run. I had to manually brand the executables as Linux:
  brandelf -t Linux /usr/local/bin/qemu*

System emulation works; I loaded up the FreeDOS and Linux images for a few minutes, and successfully ran nbench in the Linux image (about 15x slower than optimized native code). qemu-fast fails mysteriously, though; when run with X11 forwarded over SSH it dies with "_X11TransSocketINETConnect: Can't get address for localhost". With a direct TCP connection or -nographics it initializes the display, then hangs using full CPU. It doesn't load the BIOS or the Linux kernel.

A few spot checks on user-mode emulation: qemu-i386 and qemu-arm will run the basic commands I tried (even nano-tiny for ARM!), but qemu-sparc segfaults and qemu-ppc just hangs at 99% CPU on any commands I try.

Attached is a quick and dirty patch to get compilation to go a little further on FreeBSD; it ought to do some actual tests in the configure script, though, rather than special-casing for `uname` = 'FreeBSD'. The makefile requires gmake rather than BSD make, and the documentation needs texi2html installed (available in ports). Detection for SDL seems to fail also, I haven't looked into that.

Naturally it all falls down when it gets to syscall.c... probably simpler to run the Linux binary, as the FreeBSD kernel already does Linux syscall translation for us. ;)

The patched source compiles to the same binaries as the unpatched version on my Linux box.

-- brion vibber (brion @ pobox.com)

Attachment: bsd-fix.diff
Description: Binary data

reply via email to

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