QemuMachineDevelopment

From ArmadeusWiki
Revision as of 17:52, 22 June 2008 by JulienPeeters (Talk | contribs)

Jump to: navigation, search

Introduction

Page under construction... Construction.png Informations on this page are not guaranteed !!

The aim of this project is to provide a fully functional and user-friendly way for developers and people interested in the Armadeus Project to test software like if it is running on a real board.

In a far-off time, the aim is to provide a small framework to build dynamic software tests and run them automatically (after a static analysis of code for instance in order to build a fully featured report).

Armadeus boards devices

Device Implemented ?
Network interface not implemented
SD/MMC card reader not implemented
GPIO not implemented
Led's not implemented
CAN bus not implemented
I2C bus not implemented
ADC/DAC not implemented
SPI not implemented
SSI not implemented
UART not implemented
USB (slave/host) not implemented
LCD not implemented
FPGA not implemented
SRAM not implemented
CSI not implemented
Touchscreen not implemented

Source trees

Firstly, you have to install Subversion and Git packages

On Debian/Ubuntu (any version) :

[myhome] # apt-get install subversion git-core

On Gentoo

[myhome] # emerge dev-util/subversion dev-util/git

You can download the official QEMU svn tree here :

[my-repos] $ svn co svn://svn.savannah.nongnu.org/qemu/trunk

And my git repository where to find Armadeus DevFull board hardware emulation (Coming soon and depends on the interest people have in this project) :

[my-repos] $ git clone git://dedilabs.com/~jpeeters/qemu-jpeeters

Qemu mechanisms : Qemu separated in three parts

Qemu is a wide software in which it could be difficult to land up. So a little explanation have to be done.

The code translation and the emulation system core

Qemu integrates a dynamic code translation "machine" which translates target instructions in host ones on the fly. They all are already implemented in Qemu, so we have not them to remake. But this part of code is heavy compact and need knowledge in both host and target instructions set in order to understand it.

All the code of the TCG (Tiny Code Generator) is placed in the tcg directory of the source tree and contains implementations independently of targets.

The entry point of Qemu is placed in the vl.c file. After reading it, you could see that the major part of Qemu is contained in it. Every functions you should need to talk with the emulated environment are defined there. In consequences, the first point of our work is to understand the behavior of Qemu through these lines.

The Target specific code

It's not already clear to me where are placed the Qemu target specific code. So, at this time, it looks like there is mainly situated in the target-X directory (X have to be replaced by the target name, like "arm").

The hardware emulation layer

Despite of the hardware emulation layer is implemented both in the common emulation system and in an independent directory (named "hw"). It interacts with the emulation core through Qemu common functions each time. (see vl.c file)

Links