jeremyckahn
Posts: 4
Joined: Sat Jul 21, 2012 4:11 pm

Patching QEMU for ARM 1176 support on OS X

Sat Jul 21, 2012 4:41 pm

Hi, I'm just getting started with the Raspberry Pi. I'm very new to RPi and Linux development, so forgive me if my questions are newbie-ish.

I'm developing on OS X because it makes for a much easier workflow than developing on the actual hardware (also, I am waiting for the hardware to ship). I'd like to use QEMU to emulate the hardware rather than Virtualbox, because it's (theoretically) a more accurate recreation of the environment my software will be running in.

So far, I have managed to emulate the Debian distro with QEMU, thanks to this guide. I had to take a few guesses because that guide is for MacPorts, and my machine has Homebrew (the two package managers cannot exist side by side without creating problems). To boot the Linux VM, I did this:

Code: Select all

qemu-system-arm -M versatilepb -cpu arm1136 -m 256 -hda rootfs_debian6_rpi.ext4 -kernel zImage_3.1.9 -append "root=/dev/sda" -serial stdio -redir tcp:2222::22 -net none
This is slightly different from what's in the guide I followed. You'll notice that I used "arm1136" for the "cpu" option, even though RPi uses ARM 1176 architecture. This is because the QEMU I got from Homebrew doesn't support the 1176 architecture, so I just guessed from the list of options that were available. It booted just fine, but I don't feel confident that using a slightly different chip architecture is a good way to develop.

My question is, how can I patch the ARM 1176 architecture into my QEMU? Or does it even matter that I am using 1136 instead of 1176?

Thanks for any help!

jeremyckahn
Posts: 4
Joined: Sat Jul 21, 2012 4:11 pm

Re: Patching QEMU for ARM 1176 support on OS X

Sun Jul 22, 2012 12:23 am

Looks like I solved my own problem: My version of Homebrew was out of date. QEMU 1.0.1 was added here, which includes support for the 1176 architecture. I'm working on a guide for doing RPi development on the Mac that will cover this.

Return to “General programming discussion”