Name Last Update
audio Loading commit data...
backends Loading commit data...
block Loading commit data...
bsd-user Loading commit data...
default-configs Loading commit data...
disas Loading commit data...
docs Loading commit data...
fpu Loading commit data...
fsdev Loading commit data...
gdb-xml Loading commit data...
hw Loading commit data...
include Loading commit data...
libcacard Loading commit data...
libdecnumber Loading commit data...
linux-headers Loading commit data...
linux-user Loading commit data...
migration Loading commit data...
net Loading commit data...
pc-bios Loading commit data...
po Loading commit data...
qapi Loading commit data...
qbox Loading commit data...
qga Loading commit data...
qobject Loading commit data...
qom Loading commit data...
roms Loading commit data...
scripts Loading commit data...
slirp Loading commit data...
stubs Loading commit data...
sysconfigs/target Loading commit data...
target-alpha Loading commit data...
target-arm Loading commit data...
target-cris Loading commit data...
target-i386 Loading commit data...
target-lm32 Loading commit data...
target-m68k Loading commit data...
target-microblaze Loading commit data...
target-mips Loading commit data...
target-moxie Loading commit data...
target-openrisc Loading commit data...
target-ppc Loading commit data...
target-s390x Loading commit data...
target-sh4 Loading commit data...
target-sparc Loading commit data...
target-tricore Loading commit data...
target-unicore32 Loading commit data...
target-xtensa Loading commit data...
tcg Loading commit data...
tests Loading commit data...
trace Loading commit data...
ui Loading commit data...
util Loading commit data...
.exrc Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
CODING_STYLE Loading commit data...
COPYING Loading commit data...
COPYING.LIB Loading commit data...
Changelog Loading commit data...
HACKING Loading commit data...
LICENSE Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
Makefile.objs Loading commit data...
Makefile.target Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
accel.c Loading commit data...
aio-posix.c Loading commit data...
aio-win32.c Loading commit data...
arch_init.c Loading commit data...
async.c Loading commit data...
balloon.c Loading commit data...
block.c Loading commit data...
blockdev-nbd.c Loading commit data...
blockdev.c Loading commit data...
blockjob.c Loading commit data...
bootdevice.c Loading commit data...
bt-host.c Loading commit data...
bt-vhci.c Loading commit data...
configure Loading commit data...
coroutine-gthread.c Loading commit data...
coroutine-sigaltstack.c Loading commit data...
coroutine-ucontext.c Loading commit data...
coroutine-win32.c Loading commit data...
cpu-exec.c Loading commit data...
cpus.c Loading commit data...
cputlb.c Loading commit data...
device-hotplug.c Loading commit data...
device_tree.c Loading commit data...
disas.c Loading commit data...
dma-helpers.c Loading commit data...
dump.c Loading commit data...
exec.c Loading commit data...
gdbstub.c Loading commit data...
hmp-commands.hx Loading commit data...
hmp.c Loading commit data...
hmp.h Loading commit data...
iohandler.c Loading commit data...
ioport.c Loading commit data...
iothread.c Loading commit data...
kvm-all.c Loading commit data...
kvm-stub.c Loading commit data...
main-loop.c Loading commit data...
memory.c Loading commit data...
memory_mapping.c Loading commit data...
module-common.c Loading commit data...
monitor.c Loading commit data...
nbd.c Loading commit data...
numa.c Loading commit data...
os-posix.c Loading commit data...
os-win32.c Loading commit data...
page_cache.c Loading commit data...
qapi-schema.json Loading commit data...
qdev-monitor.c Loading commit data...
qdict-test-data.txt Loading commit data...
qemu-bridge-helper.c Loading commit data...
qemu-char.c Loading commit data...
qemu-coroutine-io.c Loading commit data...
qemu-coroutine-lock.c Loading commit data...
qemu-coroutine-sleep.c Loading commit data...
qemu-coroutine.c Loading commit data...
qemu-doc.texi Loading commit data...
qemu-img-cmds.hx Loading commit data...
qemu-img.c Loading commit data...
qemu-img.texi Loading commit data...
qemu-io-cmds.c Loading commit data...
qemu-io.c Loading commit data...
qemu-log.c Loading commit data...
qemu-nbd.c Loading commit data...
qemu-nbd.texi Loading commit data...
qemu-options-wrapper.h Loading commit data...
qemu-options.h Loading commit data...
qemu-options.hx Loading commit data...
qemu-seccomp.c Loading commit data...
qemu-tech.texi Loading commit data...
qemu-timer.c Loading commit data...
qemu.nsi Loading commit data...
qemu.sasl Loading commit data...
qjson.c Loading commit data...
qmp-commands.hx Loading commit data...
qmp.c Loading commit data...
qtest.c Loading commit data...
rules.mak Loading commit data...
savevm.c Loading commit data...
softmmu_template.h Loading commit data...
spice-qemu-char.c Loading commit data...
tcg-runtime.c Loading commit data...
tci.c Loading commit data...
thread-pool.c Loading commit data...
thunk.c Loading commit data...
tpm.c Loading commit data...
trace-events Loading commit data...
translate-all.c Loading commit data...
translate-all.h Loading commit data...
user-exec.c Loading commit data...
version.rc Loading commit data...
vl.c Loading commit data...
xen-common-stub.c Loading commit data...
xen-common.c Loading commit data...
xen-hvm-stub.c Loading commit data...
xen-hvm.c Loading commit data...
xen-mapcache.c Loading commit data...
dtc @ 65cc4d27
pixman @ 87eea99e

QBox

qbox-logo

Overview

QBox or "QEMU in a box" is QEMU with a TLM-2.0 like interface. QEMU is a system platform emulator based on JIT technology which is an industry benchmark in terms of execution speed. It can be used to simulate a wide variety of platforms, based on an equally wide variety of CPU architectures. QBox allows the powerful JIT based CPU simulations to be exploited within a TLM-2.0 context, such that it can, for instance be instanciated without TLM models in a SystemC simulation environment.

QBox is sufficiently flexible that some of the basic system components can be included within QBox, so only the device models of interest need to be modelled in SystemC.

The result is that QBox is a flexible platform simulation environment perfect for either adding new components and designing device drivers, or it can be used within the context of a much wider system as mearly one of many components.

QBox's are shared libraries that contain QEMU based CPU models. Each QBox contains a specific CPU core. QBox's are C objects that export a TLM-2.0 like interface. The GreenSocs Library contains TLM2C bridges to connect C TLM-2 style models to SystemC TLM-2.0. This can be used with QBox in order to allow a QBox to execute with your existing systems SystemC simulation library.

For more information about QBox's and training on how to use QBox's and the GreenSocs SystemC library please contact us.

QBox also supports the use of:

  • Eclipse connection (Use Eclipse for the full debug environment)
  • Guest O/S debug (Connect to the running O/S via QEMU's GDB server port)

QBox CPU models

  • ARM ARM926
  • ARM Cortex-M3
  • ARM Cortex-A9

Code status

build status

Requirements

QBox requires:

  • git > 1.7
  • TLM2C > 1.0
  • glib2 and glib2-dev > 2.20 on Windows, 2.12 otherwise
  • pixman dev > 0.21.8
  • gettext runtime > 0.18
  • pkg-config > 0.23
  • flex > 2.5.35
  • bison > 2.4.1

Official OS support:

  • Linux :
    • Ubuntu 12.04 and 14.04
    • CentOS 6 and 7
  • Windows with MinGW
  • OS X : soon

Linux

Ubuntu / Debian :

$ sudo apt-get install libglib2.0-dev libpixman-1-dev flex bison pkg-config

CentOS / Fedora :

$ sudo yum install glib2-devel pixman-devel flex bison pkgconfig

Windows

Please try to install packages in paths without spaces.

With MinGW Installer, install these following packages:

MinGW

  • mingw32-base
  • mingw32-gcc-g++
  • mingw-developer-toolkit
  • msys-base

MSYS

  • msys-flex
  • msys-bison

You also need glib2, glib2-dev, pixman-dev, gettext-runtime and pkg-config. You can compile these packages from source or you can download binaries (which is faster).

Then, install packages (copy / paste files) in your MinGW installation.

Download

Be sure to clone the repository and include dtc submodule. After cloning the repository, you should run:

$ git submodule update --init dtc

Configure

Be sure you have TLM2C compiled before configuring. All instructions are available in the TLM2C README.

$ ./configure --target-list=arm-softmmu --library --qbox --with-tlm2c=[TLM2C_PATH] --prefix=[PREFIX_PATH] --disable-pie --extra-cflags=-fPIC\ -fpic\ -ftls-model=initial-exec

Please fill options:

  • [TLM2C_PATH] : Specify TLM2C build path
  • [PREFIX_PATH] : Specify build path * This will result in generating the Makefile to build QBox.

Example

./configure --target-list=arm-softmmu --library --qbox --with-tlm2c=`pwd`/tlm2c/build --prefix=`pwd`/build --disable-pie --extra-cflags=-ftls-model=initial-exec

Build

make

or (fastest)

make -j[NUMBER_OF_PARALLELS_JOBS]

This action will result in the compilation of QBox.

Installation

$ make install

Configure

Some options are available to configure QBox through GSParam (a part of GreenLib):

Name Description Default value
CPU.gdb_port GDB server port. Must be > 0 to enable GDB server 0 (= disable)
CPU.extra_arguments Pass extra arguments to QEMU None
CPU.kernel_cmd Kernel command (equivalent to --append on QEMU) None
CPU.rootfs Rootfs path (equivalent to --initrd on QEMU) None
CPU.quantum Quantum None
CPU.kernel Kernel path (equivalent to --kernel on QEMU) None
CPU.dtb DTB path (equivalent to --dtb on QEMU) None

TODO

  • Coming Soon... Multi-host thread support (multi-core platforms simulated on multi-host threads for efficacy and speed)
  • Mac OS X support

Contributing

QBox is an open source, community-driven project. If you'd like to contribute, please feel free to fork project and open merge request or to send us patch.