Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Installing QEMU on OS X

jeremyckahn edited this page · 6 revisions

To emulate the Raspberry Pi on OS X, you need a version of QEMU that supports the ARM 1176 instruction set (QEMU version 1.1.0 exactly).

  • Install and upgrade Xcode to 4.3 or above.
  • Install the Xcode Command Line Tools (you can do this from within Xcode's "Downloads" preference pane).
  • Install the latest version of Homebrew. Older versions of Homebrew have an old version of QEMU that does not support the RPi's 1176 instruction set.
  • IMPORTANT: At the time of this writing, the latest version of QEMU in Homebrew hangs indefinitely at startup. You need version 1.1.0, NOT version 1.1.0-1. QEMU 1.1.0 was added in 2b7b4b3. Simply make sure you have the latest Homebrew, and do this:
$: cd /usr/local/ # Or wherever you installed Homebrew.
$: git checkout 2b7b4b3 Library/Formula/qemu.rb
  • You need a special compiler for QEMU. Install it like so:
$: brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
  • Install QEMU (Takes about 10 minutes on a MacBook Air)
$: brew install qemu --use-gcc
  • To test QEMU, you need an RPi disk image and Linux kernel image (or roll your own if you are so bold). This can be tested with the binaries here, but here are the links for convenience:
  • Put those files in a directory and boot them with:
$: qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda rootfs.ext2 -kernel zImage -append "root=/dev/sda" -serial stdio
  • Login as "guest" with password "guest".

References:

Something went wrong with that request. Please try again.