Building and Using the Fiasco µ-Kernel

Jump to:

System Requirements

To compile Fiasco, you need:

To run Fiasco, you need:

Installation

The steps nessecary to build a Fiasco kernel are as follows:

  1. Get Fiasco and needed modules from our remote CVS.

    How to get all the needed modules from our remote CVS is described on the Get DROPS page.

    a) Checkout the hello module to get everything (Recommended):

    The hello module contains more than what is actually needed, so don't be scared!

    b) If you're only interested in Fiasco itself (i.e. compile without RMGR, Sigma0, etc.), the following suffices:

    Don't call make in the l4/tool/preprocess directory, it won't work because of the missing l4 checkout and it's NOT necessary to build Fiasco!

  2. Check configuration. (Only needed when choosing 1a))
    You should especially verify that Make variables YACC and LEX in l4/mk/Makeconf refer to tools that are actually installed on your system.
    Configure the L4 system libraries and support servers:
    make -C l4 config
    Check the settings. Most probably you do not have to change things, just exit saving the configuration.

  3. Compile the L4 system libraries and support servers.

    a) Compilation when you've checked out the whole L4 tree:

    cd l4
    make hello
    The "hello" target builds only those system components that are needed to run the ``Hello World'' server. These components are all independent from the new OSKit in our CVS module "oskit10". This might not be true for other components available from our remote-CVS server.

    This also configures and compiles the OSKit--which is the only thing important now. However, to make use of Fiasco, you also need the other stuff, so there's no point in not building it now.

    b) When building Fiasco only:
    Nothing needs to be done here, proceed with the next point.

  4. Compile Fiasco.

    First, create a build directory using:
    cd l4/kernel/fiasco
    make BUILDDIR=/my/build/dir
    The path given to make BUILDDIR= can either be absolute or relative to l4/kernel/fiasco.

    Now change to your build directory to configure the kernel.

    cd /my/build/dir
    make menuconfig
    With make menuconfig the kernel configurator will be started. You can now configure your kernel. Use the 'h' key to get help, use the arrow keys to navigate through the menus and space to switch the options, use 'x' to save and exit.

    At this stage, your kernel should be properly configured, so you can proceed to building it:
    make

    This should create a binary named `main' and symbolic link fiasco pointing to main.

    An even faster way to build a preconfigured fiasco kernel is to go to l4/kernel/fiasco and call make fiasco:

    cd l4/kernel/fiasco
    make fiasco
    This will build a fiasco kernel with the ia32-short template in the l4/kernel/fiasco/build directory.

    Note:
    If you're looking for Fiasco-UX (the Fiasco port to Linux User space), you probably want to take a look at its own page.

Booting Fiasco

To boot Fiasco, you need: For the following discussion, I will assume you have access to a floppy device and can mount an ext2fs file system on it to /floppy. If you don't know what that means, ask your system administrator for assistance.

To create a bootable Fiasco system, do the following:

  1. (Skip this step if you have already installed GRUB and mounted the boot medium.)

    Create a GRUB boot floppy and mount it.

    gunzip grub-ext2fs-floppy.gz
    dd if=grub-ext2fs-floppy of=/dev/fd0 bs=4k
    mount /dev/fd0 /floppy

  2. Copy the Fiasco kernel and the servers to the boot medium.
    cp kernel/fiasco/build/main /floppy/
    cd l4/bin/$(ARCH)/$(L4API)
    cp sigma0 rmgr hello /floppy/

  3. Create a GRUB config file /floppy/boot/grub/menu.lst containing:
    # this is /floppy/boot/grub/menu.lst
    title hello world
    kernel (fd0)/rmgr -sigma0
    module (fd0)/main -nokdb
    module (fd0)/sigma0
    module (fd0)/hello

  4. `umount' the boot medium and boot it.
    umount /floppy

When booted, you should see the hello word server repeatedly printing its thread id.

Some notes:

Debugging Fiasco

Fiasco can be source-level-debugged using a remote debugger running on a second machine via a serial connection: Just connect one of your test machine's serial ports (default: COM2) to your development host using a null-modem cable. Edit fiasco/src/.gdbinit to match your host's serial port, remove the "-nowait" boot option from your GRUB config file, reboot Fiasco, and start your GDB (or your favorite GDB-based debugger) when the "KDB: init" message appears. You can then set breakpoints, continue the execution, and even interrupt Fiasco by typing Control-C in the debugger.

Another way to debug Fiasco is using Fiasco's built-in low-level debugger. This debugger has its own manual, which you can find on the documentation page.

Developing for Fiasco

To develop applications for Fiasco, you can use the L4 development environment, including some libraries in l4/lib. The most important library is Libl4sys which provides C bindings for L4 system calls.

For more information, please visit the L4/x86 Developer's Resources page, and have a look at the Libl4sys manual pages.

If you are developing for L4, we also suggest that you subscribe to the L4-Hackers mailing list.

Reporting a bug in Fiasco

To report a bug in the Fiasco µ-kernel, please use the l4-hackers mailing list.

This document

If you have corrections or additions to this document, please send them to its current maintainer Adam. Thanks.


Last modified: