7

Complete beginner question: why do I have to pass an extra kernel binary when running e.g. a Debian image on an emulated Raspberry Pi? So far all the documentations state that the image files are the equivalent of a mass storage device, so if not the bootloader but at least a kernel should be present in them, no? If Qemu simulates a CPU, shouldn't this somehow even require a start from the very beginning, i.e. from the Reset Vector?

8
  • 1
    I don't use QEMU but I think the reason here is that QEMU can't actually use the normal kernel, i.e., one that would be contained in a pi distro image for use on a real pi, so you need to use a different one instead, and that is probably what you are specifying. Presumably this is because QEMU is not really emulating a BCM2835/6, it's emulating some generic ARMv6/7 device, and there are some discrepancies to do with the role of the GPU in the SoC? Or something along these lines...
    – goldilocks
    Commented May 10, 2016 at 11:58
  • @goldilocks : does that mean, that the peripherals of e.g. the Raspberry Pi are not really emulated? How does the X server or any other program that accesses the framebuffer do its job then? The framebuffer memory surely is specific (different) for every GPU out there? Or is this really encapsulated cleanly in the kernel? Commented May 10, 2016 at 13:19
  • Are you running Qemu on the RPi, or on an x86 device?
    – Jacobm001
    Commented May 10, 2016 at 14:51
  • @Jacobm001 I want to emulate the Pi (and also other ARM boards like the RIoTboard) on my x86-64 Ubuntu. Commented May 11, 2016 at 10:10
  • Note that QEMU is supposed to emulate the BCM2835 and BCM2836 in newer releases "correctly" and should not need custom kernels , build from source.
    – flakeshake
    Commented May 11, 2016 at 15:09

1 Answer 1

2

Older versions of QEMU did not emulate the Raspberry Pi but a "Versatile PB" board.

Therefore a custom "Versatile" kernel is running inside QEMU , the userland of Raspberry Pi images works somewhat fine on top of it (YMMV) - as the whole point of the Linux kernel is to provide this very abstraction.

See here on how to really emulate the Raspberry Pi 2 with QEMU built from source.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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