5.24 KB




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


QBox requires:

  • git > 1.7
  • tlm2c > 1.0
  • glib2 dev
  • pixman dev

Official OS support:

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


Ubuntu / Debian :

$ sudo apt-get install libglib2.0-dev libpixman-1-dev 

CentOS / Fedora :

$ sudo yum install glib2-devel pixman-devel 


Please try to install packages in paths without spaces.

With MinGW Installer, install these following packages:


  • gcc
  • gcc-g++
  • libz-dev
  • pthreads-w32-dev


  • flex
  • bison

You also need:

  • pkg-config
  • glib
  • libpixman

You can compile these packages using sources and Google or you can download binaries (fastest).

pkg-config, glib and libpixman can be found here : GTK Download.

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


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

$ git submodule update --init dtc


$ ./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.


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



or (fastest)


This action will result in the compilation of QBox.


$ make install


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


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

Known Issues

  • An problem has been reported with gcc 4.8.5 which causes an TLS error with more than 4 instances of qbox.


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.