This page will shows how to emulate an ARM1176JZF-S system the quick and easy way.
UPDATE (17th of March, 2013): In order to run the latest image (2013-02-09-wheezy-raspbian.img) you need to comment out the contents of /etc/ld.so.preload. - kinsa
Linux users will find the necessary steps here .
I have created a patcher for windows users and it's available here. When asked, give it the directory containing your 2013-02-09-wheezy-raspbian.img file. The patched img file should be properly bootable by qemu.
- QEMU - Linux or Windows. Make sure you have a suitable version (see 'Quick note on QEMU and ARM1176').
- A disk image for your distro of choice
- Raspian and Debian should work out of the box, however Arch Linux requires a few tweaks to work. These will not be explored in this article, as they can only be done in Linux.
- Ability to read and follow instructions carefully
Quick note on QEMU and ARM1176
ARM1176 support is relatively new. If you did not compile QEMU yourself from git, or download fairly recent binaries, replace
-cpu arm1176 with
-cpu arm1136-r2 whenever you see it. Note that you will be missing out on many important bug fixes and a few unimportant CPU features. If you boot with
-cpu arm1176 and see something about unsupported instructions, you've got an older version of QEMU.
Preparing the environment
- Create and enter the work directory.
- Download the linux kernel:
- Download and extract the disk image .img file to the working directory.
- All of the instructions will be carried out in this directory.
Check that you have everything
- Make sure you have kernel-qemu and your disk image files.
qemu-system-arm -cpu ?
If everything looks right, you should be ready to go.
Booting the disc image
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2012-10-28-wheezy-raspbian.img
- Make sure you replace '2012-10-28-wheezy-raspbian.img' with the name of your disc image.
- Do not try to use more than 256 MB of RAM, the value is hard-coded in and QEMU will not work correctly.
Things to keep in mind
- The disc image will only contain about 200MB of free space (if any at all) for you to play with, so don't expect to be able to install a full system. If you want to have a larger image, you will need to create it yourself. Check the full QEMU tutorial for details.
- You may see a few steps failing while the image boots. That's normal, since QEMU cannot emulate ALL of the hardware exactly. Double check that all the important steps are fine, but in general, this isn't something to worry about.