Pi emulator running on a PC - a virtual Pi

Aug 20, 2013 2 Replies

Looking for a virtual Raspberry Pi...!



I am looking for a way to test some OS boot code on a Pi which will mean continually updating a file on the SD card and rebooting. Naturally, doing that on a physical medium would be a pain because of having to swap the card so often. So I am looking for a Pi emulator. I wondered if any of you guys had ever tried similar.



Best option I have found without trying it out seems to be to run under Qemu in some way. As well as emulating the Pi, Qemu - at least on Linux - can be managed from the gdb debugger. That should allow control over the OS booter such as allowing single stepping, setting breakpoints etc!



However, even under Qemu there seems to be more than one downloadable solution. So I wondered if anyone here had tried so do similar or had heard of others having success.



James


There are 'Pi emulators' which were written before the Pi was released. These aren't Pi emulators at all, they're just emulators for the ARM1176 CPU core in the Pi, with all the wrong peripherals. Normal Pi OS images won't run on them.

If you're doing OS boot testing I think you're out of luck for a software solution, because you'd have to emulate the exact architecture of the Broadcom SoC - where of course the GPU side isn't published. Broadcom will be able to do a full simulation of the hardware Verilog, but that could take hours to even boot.

You could try that on the Pi hardware using JTAG - I think there has been some progress here. For the swapping SD card side it might be feasible to electrically switch a card between the Pi and a USB card reader so you can do write/boot cycles without physically pulling cards. The problem then is getting the feedback as to whether the test was succesful.

Theo

Hi.

Is it possible create a SD image file to use with QEMU? I have tried overwriting raspbian img file from QEMU but boot do not work well (stop in login console). Did I miss something?

Sorry for my poor English.

Thank you,

Ericson Benjamim.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required