Mar 24, 2013

Raspberry Pi emulator on OSX

I've ordered Raspberry Pi computer, but it didn't arrive yet, so I decided to try out the OS image provided from their site: http://www.raspberrypi.org/downloads.

I've found multiple articles on the net on how to do it on OSX, they all boil down to:

Get yourself qemu ARM software (in my case: sudo port install qemu +target_arm)
Get qemu ARM kernel from here.
Get wheezy image from raspberry site.
Launch:
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 rootfstype=ext4 elevator=deadline rootwait panic=1" -hda 2013-02-09-wheezy-raspbian.img -redir tcp:5022::22

On my system with qemu 1.4.0 this image hangs after printing few SCSI timeout erros.
Commenting out /etc/ld.so.preload did not help, instead of SCSI errors i got kernel panic.
But soft-float image: 2012-08-08-wheezy-armel.zip.torrent works as expected.

After booting, you can access shell with ssh localhost -p 5022.

3 comments:

Anonymous said...

Did you still have to comment out /etc/ld.so.preload ? How did you mount the img to do this?

Unknown said...

No, with this image there is no need to change preload.
But in general you'd need linux box/VM to mount the image, mount -loop etc.

penx said...

Thanks for getting back, though it still hangs during boot for me, see here: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=42821&p=343969#p343969

I'll try getting the file commented out under Ubuntu and try the latest image.