Previously, we have discussed installation of various Raspberry Pi‘s Operating System. All have been done on the actual board. But what if we are in situation where we can’t afford the board? Emulation sure is the way to experiment and QEMU open the possibility.

Although emulation can make our life easy, you can’t always rely on emulation. Remember that emulation trying to imitate the real hardware, but can’t be the one.

In this article, we will discuss about how to emulate Raspberry Pi board using QEMU. For this purpose I use:

  1. Slackware64 14.0 as host system
  2. QEMU 1.4.0
  3. Soft-Float Debian Wheezy with version 2013-05-29.
  4. OpenVPN

For Windows machine, you can go to this article instead.

Obtain the Material

Make sure you have QEMU installed. For Linux, you can follow this article to compile QEMU (using Slackware64 as example).

Next, download the images. As stated above, we will use Soft Float Debian Wheezy. You can download it from Raspberry Pi’s official download page. The version I use is the 2013-05-29 or latest version per “August 24th 2013” and can be downloaded here.

We also require linux kernel for QEMU. Download it from here.

The Hardware – Overview

Before we go to next section, it is always a good idea to understand what system we want to work with. In this case, raspberry Pi. You can see the Architecture of Raspberry Pi for detail.

For the system we will create in using QEMU:

  1. ARM1176JZF-S, see the datasheet here
  2. Ethernet

Note that QEMU cannot emulate GPIO and GPU.

Also, to encapsulate network we need TAP network for full networking support. See next section.

Preparing the environment

Create a working directory. In this case, qemu-raspberry.

Now open up command prompt and enter the working directory.

Extract the disk image and kernel image we have downloaded on previous section.

Check whether you have /dev/net directory and /dev/net/tun or not. If you don’t have it yet, do following:

Now create the two new files, /etc/qemu-ifup and /etc/qemu-ifdown. Make sure you give them executable permission.


Make sure you already have openvpn installed.

Booting the disc image

Make sure the TAP interface have been activated. You just need activated it once and use it until you had enough. Do following:

To boot the QEMU, invoke following command (make sure all materials have been downloaded and extracted):

When you decide to stop TAP interface, do following:

Here’s the result:


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">