#qemu

Emulate Rapberry Pi 2 in QEMU

Published at December 30, 2015 · Piotr Król ·  4 min read

In the process of planning system testing for one of my clients I found that someone from Microsoft published patches with BCM2836 support to QEMU mailing list. I thought it is very interesting, because if it is possible to setup emulated Raspberry Pi many use cases can be tested faster and in more automatic way. For example checking how application behave when running on more then one device at once, testing massive deployment process, stress testing and finally speed up debug-fix-test process....

Categories: app-dev os-dev


UEFI Application development in OVMF

Published at November 21, 2015 · Piotr Król ·  3 min read

OVMF (Open Virtual Machine Firmware) is a project that aim is to enable UEFI support in various virtual machines. According to whitepaper various projects have interest in supporting OVFM ie. VirtualBox, Xen, BHyVe and of course QEMU. Why someone may be interested in OVMF ? IMHO the most important reason is that OVMF give ability to develop UEFI applications without using real hardware. This speeds up development cycle by giving ability to start before hardware prototype arrive....

Categories: firmware


Coreboot for QEMU armv7 (vexpress-a9) emulated mainboard

Published at August 7, 2014 · Piotr Król ·  8 min read

Recently I came back to look into coreboot. Mainly because low level is fun and skills related to firmware (even coreboot) starting get attention on freelance portals (first odesk job (link removed), second odesk job). I was surprised that under the wings of Google coreboot team start to support ARM (BTW ARM programming is IMHO next great skill to learn). So I cloned latest, code compiled QEMU armv7 mainboard model and tried to kick it in latest qemu-system-arm....

Categories: firmware


0x5: Qemu network configuration and tftp for Virtual Development Board

Published at June 7, 2013 · Piotr Król ·  7 min read

Introduction This was not trivial task to me. As usual google is your friend and RTFM works. First we will set tftp which we use to download modified kernel for U-Boot. Second I will show how to setup bridged network for QEMU needs and finally we will perform some basic test of our setup. Let’s go. Setup tftpd First install: 1 sudo apt-get install tftpd tftp Make sure that /srv/tftp is writable for your user....

Categories: app-dev os-dev


0x4: Linux kernel for embedded system

Published at June 7, 2013 · Piotr Król ·  3 min read

A little history Thinking about embedded linux probably leads to first try of porting linux to different architecture. I did google research (I know I should probably read mailing list archive) and found that there were few attempt to port linux to different platform. There is no clear information about which port of linux was first. This is probably because many hackers didn’t report their effort. Arguably earliest out-of-tree version was probably for Acron A5000 (arm), Motorola 68000 (m68k) around Spring/Summer of 1994....

Categories: os-dev


0x3: Embedded board bootloader

Published at June 7, 2013 · Piotr Król ·  3 min read

What is bootloader ? It is a program written to bring up more complex code (eg. kernel). On very simple system it can even not exist. Bootloader should prepare all required hardware that kernel or different operating software will need at its start point. It is hard to create cross platform bootloader because of variety of system requirements. Why we need bootloader ? The true is that we don’t :) because we can simply pass kernel and initramfs as parameters to QEMU, but it is not common practice for real development environment....

Categories: firmware


0x1: Qemu as an environment for embedded board emulation

Published at June 7, 2013 · Piotr Król ·  2 min read

Table of contents Introduction Compilation Kudos Introduction QEMU is a CPU emulator using dynamic binary translation to convert guest CPU instructions into host CPU instructions[1]. It supports many architectures from x86, through ARM and MIPS, to MicroBlaze. According to compilation configuration target list QEMU targets 26 different softmmu types. Only for ARM it supports 33 machines (like ARM Versatile/PB (ARM926EJ-S) or Samsung NURI board (Exynos4210)) and 28 CPUs (with cortex-a9 and pxa270)....

Categories: app-dev os-dev


0x0: Intro to Virtual Development Board building

Published at June 7, 2013 · Piotr Król ·  2 min read

Preface There are many reasons why ambitious programmers should care about huge rush in embedded market. IMO there is great potential in it. I don’t want to go deep into this but take a look at all tablets, phones, smart TVs and other cool stuff like wireless in you washing machine or refrigerator (ok this two are right now only a gadgets :) ). This is all embedded. Another thing is that wages of experienced embedded developers are really high....

Categories: firmware


Debugging coreboot in qemu environment - part 2

Published at April 18, 2012 · Piotr Król ·  2 min read

In previous post coreboot was configured and installed. Here we try to establish good debugging environment for it. To create a good emulated environment to debug, research and learn coreboot few tricks are required. First of all we need to know how to run our emulated environment (qemu). What I mean by that?...

Categories: firmware


Debugging coreboot in qemu environment - part 1

Published at March 12, 2012 · Piotr Król ·  2 min read

First of all I use testing version of Debian - wheezy. Clone coreboot repository: 1 2 git clone http://review.coreboot.org/p/coreboot cd coreboot; make menuconfig Configure FILO as apayload and use its latest version: 1 Payload -> Add a payload -> FILO Payload -> FILO version -> HEAD Add verbose debugging messages: 1 2 3 Debugging -> Check PIRQ table consistency Debugging -> Output verbose malloc debug messages Debugging -> Output verbose ACPI debug messages Debugging -> Enable debug messages for option ROM execution Debugging -> Built-in low-level shell Debugging -> Trace function calls Try to build:...

Categories: firmware