Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to run a RaspberryPi system on my MacOSX using QEMU. I tried the following, using this tutorial:

./qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda ArchLinuxARM-2014.06-rpi.img -kernel kernel.img -append "root=/dev/sda" -serial stdio

Where ArchLinuxARM-2014.06-rpi.img is my RPi image and kernel.img precisely comes from ArchLinuxARM-2014.06-rpi.img (I made a copy of it, I am not sure it was a brilliant idea though).

I get two QEMU windows as a result. One has a "Machine" and a "View" menu, and a black screen showing the following message:

Guest has not initialized the display (yet).

The second one is simply a black window.

I had the same problem using a Raspbian image and the same command. What am I doing wrong?

share|improve this question

1 Answer 1

up vote 2 down vote accepted
  • First of all, I had to use another kernel, kernel-qemu that I found here.

  • Then, I could make it work using QEMU 1.7.1:

    With Raspbian:

    ./qemu-system-arm -kernel /path/to/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda /path/to/2013-12-20-wheezy-raspbian.img

    With Arch Linux, I had to:

    1. Start in terminal mode (not sure if necessary, though) using:

      ./qemu-system-arm -kernel /path/to/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda5 panic=1 rootfstype=ext4 rw init=/bin/bash" -hda /path/to/ArchLinuxARM-2014.06-rpi.img

      (Note that init=/bin/bash was added here, and Arch Linux requires root=/dev/sda5 instead of sda2)

    2. Modify /etc/fstab as follows (the partition was wrong):

      # <file system> <dir>   <type>  <options>       <dump>  <pass>
      /dev/sda1       /boot   vfat    defaults        0       0
      
    3. Start normally using:

      ./qemu-system-arm -kernel /path/to/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda5 panic=1 rootfstype=ext4 rw" -hda /path/to/ArchLinuxARM-2014.06-rpi.img

  • I finally realised that I could use the latest version of QEMU (2.1.1), but I had to specify the console output:

    ./qemu-system-arm -kernel path/to/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "console=ttyAMA0 root=/dev/sda5 rootfstype=ext4 rw" -hda /path/to/ArchLinuxARM-2014.06-rpi.img

    (Note that I specified the console using console=ttyAMA0)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.