Sunday, 8 January 2017

LINUX How to Emulate a Raspberry Pi on Your PC

Fancy a $30 computer but not sure you want to take the risk? You’re not a cheapskate, you’re just being wise. And getting a good preview look at what you’re going to buy is pretty simple. Rather than buy a Raspberry Pi and be disappointed, why not try the QEMU emulator to get a feel for it first?

What Is QEMU?

You’ve probably heard of emulation. It essentially enables us to run software on systems where it would otherwise be incompatible. Windows itself has emulation built in, in the form of compatibility mode.

Virtual machines are the default option these days for anyone wanting to try out a new operating system without upsetting their delicate digital life. VMware and VirtualBox are often recommended to anyone wanting to try Linux for the first time (our VirtualBox guide is particularly useful), for instance, or with a desire to access an older version of Windows. It’s even possible to run some older verlBox: User's Guidesions of Mac OS X in a virtual machine.

What virtual machines like VMware Player and VirtualBox have in common is that they create a virtualized hardware environment based on the 32-bit and 64-bit architecture. While this makes them ideal for other forms of OS emulation/virtualization, it means that any operating system that runs on ARM chipsets cannot be installed and tested.
This is where QEMU comes in. Because Quick EMUlator emulates ARM chipsets – such as that found in the Raspberry Pi – we can use it to create a virtualized Pi on our PC

Manual Setup vs Packaged

We have a couple of options open to us if we want to use QEMU. The first is by far away the easiest, and requires us to download this single QEMU package, which features everything we need to launch Raspbian in Windows.
If you fancy getting your fingers dirty, however, and have no qualms about digging out older versions of Raspbian (as you probably know, the latest version of Raspbian is Jessie), you might take a look at this guide, which shows you how to configure QEMU manually for emulation of Raspbian Wheezy (this solution also requires the ARM build of the Linux kernel). Note that this is a long, drawn out, error-prone method, and features several changes to configuration files. If this is your cup of tea, carry on!

Using the QEMU Raspbian Package

For simplicity’s sake, we’re going to use the QEMU Raspbian package from Sourceforge, which you will find at Once downloaded, unzip to your HDD – perhaps to C:/QEMU – and open. Inside the qemu subfolder, you’ll find three files.
Double-click run.bat to get started. A virtualized Raspberry Pi will appear, with Raspbian Wheezy booting up. This may take a while to complete, but should go pretty much as illustrated in this video


No comments:

Post a Comment