qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Black screen when emulating Raspberry Pi with qemu 2.


From: Jakob Bohm
Subject: Re: [Qemu-discuss] Black screen when emulating Raspberry Pi with qemu 2.5
Date: Tue, 8 Mar 2016 13:29:17 +0100
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 08/03/2016 13:01, Per Olofsson wrote:
Hello,
   after some minor tweaks to pixman I got qemu 2.5.0 to compile and run
   on OS X 10.11. I'm trying to set it up to emulate a Raspberry Pi for
   development, but I can't get it to boot from the raspbian linux image.
   I'm using:

   2016-02-26-raspbian-jessie.img      downloaded from
   https://www.raspberrypi.org/downloads/raspbian/
   kernel-qemu-4.1.13-jessie           downloaded from
   https://github.com/dhruvvyas90/qemu-rpi-kernel

If I start with:

   /usr/local/qemu/bin/qemu-system-arm -M versatilepb -m 512 -cpu arm1176
   -no-reboot -kernel kernel-qemu-4.1.13-jessie -hda
   2016-02-26-raspbian-jessie.img -serial stdio
Are you sure -hda filename.img causes filename.img to be used
as a virtual *SDCard* (which is what Raspberry Pi has)?
it prints "Uncompressing Linux... done, booting the kernel." and then
the kernel hangs since it can't find a root fs:

   
https://www.dropbox.com/s/ogmhcyser53ko32/Sk%C3%A4rmklipp%202016-03-08%2012.53.21.png

The problem is that if I try to add any kernel boot options with
-append, even if it's just "panic=1", all I get is a black screen for a
few seconds and then it exits:

   /usr/local/qemu/bin/qemu-system-arm -M versatilepb -m 512 -cpu arm1176
   -no-reboot -kernel kernel-qemu-4.1.13-jessie -hda
   2016-02-26-raspbian-jessie.img -serial stdio -append "panic=1"

   
https://www.dropbox.com/s/e11mzvdjcpcfylf/Sk%C3%A4rmklipp%202016-03-08%2012.57.22.png
Don't know about that.
If i use "root=/dev/sda" I still only get a black screen, but it doesn't
exit after a few seconds so maybe it's booting?
On the Raspberry Pi, root is not the whole SDcard, but a
partition on it.

root may even be a subitem within the first partition on
the SDcard, I don't remember right now, it depends on the
instructions for putting that .img file on a physical SDcard
for booting a real Raspberry.
I also tried compiling the latest git version, and the results are the
same. I tried the experimental raspi2 machine too, but that just gives
me a debugger prompt. I'm completely new to qemu so any pointers are
welcome.


In general, a real Raspberry Pi 1 boots like this:

1. ROM (not EPROM/Flash) code inside the Broadcom chip
  connects to the SDcard.

2. ROM looks on the first (FAT) partition for a magical
  file with a proprietary boot blob and copies the
  beginning of that to RAM.

3. The proprietary boot blob bootstraps the on-chip
  proprietary GPU and other global CPU features, then
  chains to the Linux kernel, using a config file on
  the FAT partition to specify part of the Linux
  command line).

4. The Linux kernel loads on the pre-initialized CPU
  and accesses the pre-initialized GPU for display
  output.

5. At some point in the boot process (maybe the kernel
  phase, maybe a script on an initrd) mounts the "ext2,
  ext3 or ext4" partition or file as Linux root, then
  proceeds with a mostly ordinary Debian boot process.

Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded




reply via email to

[Prev in Thread] Current Thread [Next in Thread]