Pistachio is the reference implementation of the L4 API version x.2 (also referred to a v4). It is developed by the System Architecture Group at the University of Karlsruhe, Germany and the DiSy? group at the University of New South Wales, Australia.

Because this kernel has been the experimentation platform for a lot of exciting research experiments at the L4ka group and it is the basis for the commercial version of L4 developed by OK-Labs, Pistachio is a very interesting base platform for the Genode OS Framework.

The port of the Genode OS Framework to Pistachio is the work of Julian Stecklina who wanted to elaborate on the portability of the framework and explore the use of Pistachio's multi-processor capabilities with Genode.

This document provides brief instructions about downloading, building and booting the Pistachio version of Genode.

Downloading and building L4Ka::Pistachio

Follow the instructions provided at the L4Ka::Pistachio download page:

http://l4ka.org/projects/pistachio/download.php
L4Ka::Pistachio download page

Configuring and building the kernel

Go to the l4ka-pistachio/kernel directory and create a build directory via:

make BUILDDIR=build

Go to the new build directory and launch the configuration menu

make menuconfig

Enable the kernel debugger and keep the default serial-port configuration. Furthermore, we have to enable the support for the Pager-Exchange-Registers feature, which is relied on by Genode's cancel-blocking mechanism. Select Kernel -> Enable Experimental Features and then Kernel -> Experimental Features -> Pager ExchangeRegisters?. After completing the configuration, you can build the kernel using your host GCC. The GCC version 4.2 is known to work.

make CC=gcc-4.2

The result of the build process is called x86-kernel.

Build the user land (kickstart and sigma0) and the kernel bindings

To practically use the Pistachio kernel, we need a bootstrapper (kickstart) for preparing Pistachio and the initial boot modules. Furthermore, we require a root memory manager (sigma0). Genode's core will play the role of the classical roottask. Because, Genode will use the kernel API, we need to make the kernel bindings available to Genode. These bindings consist of the API in the form of C header files and a library that translates the API to the kernel's binary interface. Both are included in the Pistachio user land.

Go to the l4ka-pistachio/user directory and create a build directory as described in l4ka-pistachio/user/README.HG.

Building the L4ka::Pistachio version of Genode

The L4ka::Pistachio version of Genode is available at Genode's public subversion repository:

http://genode.org/download/subversion-repository
Information about accessing Genode's public subversion repository

Furthermore, Julian Stecklina maintains a git repository for his developments.

http://cthulhu.c3d2.de/~blitz/git/genode.git
Julian Stecklina's development branch
  • Download and install the tool chain

    http://genode.org/download/tool-chain

    Preconfigured GNU tool chain for building Genode

  • Create a build directory

    cd <genode-base-dir>
    mkdir build.pistachio_x86
    cd build.pistachio_x86
    ln -s ../tool/builddir/build.mk Makefile
    
  • Configure the build directory to use the cross compiler by creating a file <builddir>/etc/tools.conf with the following content:

    CROSS_DEV_PREFIX = /usr/local/genode-gcc/bin/genode-x86-
    
  • Configure the location of the Pistachio user-level build directory where to look for the kernel-interface header files and the system bindings. Create a file <builddir>/etc/pistachio.conf with the following content:

    PISTACHIO_USER_BUILD_DIR = <location of pistachio/user/build>
    
  • Configure the source repositories to incorporate in the build process by creating a file etc/build.conf with the following contents:

    REPOSITORIES = ../base-pistachio ../base \
                   ../libc ../os ../demo
    
  • As an alternative to creating the build directory by hand, you may use Genode's build-directory-creation tool at tool/builddir/create_builddir. It supports the creation of a preconfigured build directory for specific for the Pistachio version.

  • Build Genode

    make
    

Booting the Genode demonstration scenario

The Pistachio-version of Genode can be booted via the GRUB boot loader.

Example config file

For the config file that starts Genode default demonstration scenario, please see os/config/demo.

Example GRUB configuration

A GRUB boot entry in your menu.lst file may look like the following example. Please pay attention to use the right file prefix depending on your boot media such as (hd0) or (nd).

title Genode: example entry
 kernel /kickstart
 module /x86-kernel
 module /sigma0
 module /genode/core
 module /genode/init
 module /config/example/config
 module /genode/timer
 module /genode/ps2_drv
 module /genode/vesa_drv
 module /genode/launchpad
 module /genode/nitpicker
 module /genode/liquid_fb
 module /genode/nitlog
 module /genode/testnit
 module /genode/scout

Current limitations

Note that this version is not stable and not thoroughly tested yet.

Futhermore, there exist several opportunities for Pistachio-specific improvements and optimizations such as:

  • A better lock implementation because the current version uses a simple sleeping spinlock
  • An optimized signalling implementation
  • Using the UTCB for IPC