What Will I Learn?
This tutorial is all about how to emulate R-Pi on Linux.
- You will learn how to emulate Raspberry-Pi on Linux.
- You will learn what is QEMU and how to download it.
Requirements
- Raspberry Pi running in Linux
- Ubuntu Linux knowledge
- Getting the Raspberry-Pi Image
- Installing QEMU emulator
- Compile or download a QEMU-Ready kernel of Raspberry-Pi
Difficulty
- Intermediate
Tutorial Contents
Getting the Raspberry-Pi Image
You can simply download the latest Raspbian Wheezy distribution from RaspberryPi.org.
QEMU
QEMU is short term for Quick Emulator . It is generic and open source machine emulator and it is a free and open-source hosted hypervisor that performs hardware virtualization (not to be confused with hardware-assisted virtualization).
You need to install QEMU on your Linux.
On Ubuntu terminal do:
$sudo apt-get update && sudo apt-get install qemu-system-x86
To check the correct installation, do as follow:
$qemu-system-arm --version
Get things going…
- So first of all create a working directory anywhere you like in your system.
- Copy your newly downloaded Raspberry Pi image to current directory and unzip it.
- Then rename it to rpi.img.
Download the QEMU-Ready R-Pi’s kernel
Download it from here
or you simply clone the git repository in the directory that you just created using the command below.
$git clone https://github.com/dhruvvyas90/qemu-rpi-kernel.git
Set-up Phase
- If you have done everything correctly your working folder should contain these files and folders.
- you need to make a simple script to make it easier to start the emulator. Open up your favorite text editor and save the content below as a new file and name it config
qemu-system-arm -kernel ./qemu-rpi-kernel/kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw init=/bin/bash" -hda rpi.img
- After saving the file, make sure you make it executable by the command below:
$chmod +x config
- Now you are ready to start the raspberry pi in configuration mode. To do so, run the script you just created:
$./config
- If you have done everything correctly you will be greeted by terminal prompt of Raspberry Pi:
Posted on Utopian.io - Rewarding Open Source Contributors
Hi, I am your moderator and I think this tutorial is acceptable but I think the GitHub repository should rather be the one for QEMU than for RaspberryPi as the entire tutorial is all about how to use QEMU (in order to emulate Raspberry Pi). If you change the repo I will accept this tutorial.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@flauwy done changing the repo :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Awesome, this is going to help running classes at the maker space when they forget to bring their pi!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
HAHAHA I bet it will ;)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @athenamae I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit