A very quick introduction to QEMU
If you’re developing your own applications for Raspberry Pi:
- Either Linux-based or
- Without the limitations of a traditional operating system
There’s a never-ending question on testing your results.
- New version of your app into Linux on your RPi and running it or
- New disk image to microSD and booting entire device
Doesn’t seems to be a huge problem.
But, when you have to do this dozens of times each day than an emulator-like questions appears.
Here comes QEMU. An open source processor emulator that can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). A nearly perfect solution for testing Raspberry Pi apps during their development.
- Is available for many platforms, including Windows
- Comes with a great documentation, including Wiki and Read the Docs!
Note that QEMU emulates processor only, and only certain of main board’s peripherals, not all of them!
So, for example for Rasberry Pi you will be only able to test:
- core on-board peripherals: DMA, GPIO, RTC, IRQ, FIQ, timers, UARTs and framebuffer
- connected devices: USB, PCI and SCSI
- I/O: mouse, keyboard and audio
- communication: LAN only
- storage: MMC only
So, no WiFi or Bluetooth support for example. These must be tested on RPi, either directly or through SSH.
QEMU is also virtualizer, which can virtualize x86, PowerPC, POWER, S390, ARM, and MIPS processors and run their native code on your PC. But from Raspberry Pi’s perspective this is something a bit less interesting.