Here’s how:
- 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 Homebrew, using the instructions here – http://brew.sh/
- Force Homebrew to install version 1.1.0 of QEMU
git checkout 2b7b4b3 Library/Formula/qemu.rb
- Install GCC compiler, needed for compiling QEMU
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
- Install QEMU
brew install qemu --env=std --use-gcc
- Download and extract the zip of your Raspbian image – I used http://downloads.raspberrypi.org/images/raspbian/2012-12-16-wheezy-raspbian/2012-12-16-wheezy-raspbian.zip
- Download a linux kernel, I found this one to work – http://xecdesign.com/downloads/linux-qemu/kernel-qemu
- Put the above in a directory and boot the image like this (replace image names if you downloaded something different):
qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda 2012-12-16-wheezy-raspbian.img -kernel zImage -append "root=/dev/sda" -serial stdio
Sources: