[back to L4 home page]

The L4 µ-Kernel Family

Back to L4/x86 main page

Navigate L4/x86 Section:

Site Navigation:

(* = offsite link)

Quick links:

L4/x86 FAQ

Questions answered in this FAQ

Questions and Answers

Why have you switched to Linux on L4 when Lites on L3 was underway already?
We dropped the Lites on L3 project in favor of the Linux on L4 project for a couple of reasons. These are my favorites:

  • Porting a Mach server to a different microkernel turned out to be a unnecessarily complex task: We never got quite beyond resolving the Mach dependencies by emulating Mach facilities. We wrote a report on this (in English).

  • In the future, we want to base our designs on the L4 microkernel. That's why, we need a decent operating and development environment running on L4. Also, this project is a good way to debug the L4 microkernel as it is still pretty green.

  • We switched from a BSD-based system to a Linux-based one because more people in our group have experience with Linux than with BSD, and because the port of Linux to OSF Mach provided a good model on how to do it.

So far, the switch seems to work out well, and it generally looks like it was a good idea. :-) (96/07/26)

I am puzzled by the build environment for the L4 microkernel: Phar Lap in DOS-emul under Linux? Please explain the logic, it escapes me.
The L4 kernel has been written for an assembler which is only available under DOS, but we don't want to switch to a DOS machine every time we need to build the kernel.

We're still looking for a good, free, well-documented, Intel-syntax-capable assembler running under Unix which supports at least some of the more advanced/ obscure features of usual DOS assemblers, like symbolic structures and bit fields, a macro and conditional compilation facility which groks some assembler semantics (e.g. structure sizes), support of both real-addressing and protected mode, and linking code into user-defined executable segments (ala ELF).

(I already went searching for one, so you might want to save yourself the time looking for one yourself and just go ahead and write one. ;-) (96/07/26)

I want to build the L4 kernel. Do I need a DOS assembler? Should I purchase the Phar Lap assembler?
Do you really need to rebuild the L4 kernel? If you just want to play with it, you don't have to - see the answers to the next two questions.

Otherwise you will need a DOS assembler. The current (and older) source snapshots want the Phar Lap assembler, but future snapshots will use the Microsoft assembler MASM, so you probably shouldn't buy the Phar Lap assembler. (96/10/18)

How do I boot the ``hello world'' server provided with the L4 development environment package?
Here's a roadmap for building a boot floppy on a Linux machine:

  • Get the L4 development environment package, the OSKit package, and the L4 kernel package (see the L4 Developer's Resources page on how to fetch them).

    Unpack one on top of the other. Copy l4.exe into the development environment:

    tar -xzf l4-960909-kernel.tar.gz
    tar -xzf l4-980309.tar.gz
    tar -xzf oskit-l4-980309.tar.gz
    cp l4-960909/l4/kernel/src/l4.exe l4-980309/l4/kernel/src/

  • Build the bootable L4 kernel and hello server images:
    cd l4-960909/l4/
  • `dd' the GRUB boot filesystem (available from our ftp server) to a floppy and mount it at /floppy:
    dd if=grub-ext2fs-floppy of=/dev/fd0 bs=4k
    mount /dev/fd0 /floppy

  • cp server/hello/hello kernel/grubboot.img /floppy/
    cp server/rmgr/src/rmgr /floppy/

  • Create a GRUB config file /floppy/boot/grub/menu.lst containing:
    title = hello world
    module=(fd0)/grubboot.img boothack nowait

  • `umount' the floppy and boot it.


I want to play with L4. Do I need a DOS assembler?
No, you don't need a DOS assembler for playing: The source/binary L4 microkernel package we distribute contains all the binaries which need to be built using DOS tools.

See also the answer to the previous question. (96/10/18)

Where can I get an a.out compiler toolset for Debian Linux?
You don't need them any longer for L4 -- the L4 development environment now supports ELF. (98/03/09)

Original answer: Debian already contains the a.out tools (see stable/binary-i386/devel/aout-*), but they are somewhat broken and nobody works on fixing them.

Instead you should use even older a.out development tools packaged for Debian. They are available from os.inf.tu-dresden.de:/pub/l4/debian-a.out-tools/.

(Remember: Debian packages can be installed using the following command:
dpkg --install package.deb) (sr1 97/04/10)

Do I really need to boot with GRUB? I already have [insert your favourite boot loader here].
The nice thing about GRUB is that it can load several images into memory before launching one of them. This way, we can load L4 kernel + a boot server into the memory before running L4; so L4 doesn't need any device drivers to load its boot server (and we don't have to piggyback the boot server on the L4 kernel).

There are a few other benefits as well, as its capability to interpret file systems.

If you don't want to use GRUB, you'll end up writing your own boot mechanism, which is what we wanted to avoid.

GRUB can emulate many things other bootloaders normally do. It should be possible to replace e.g. LILO with GRUB and use a config file to selectively boot either Linux or L4. (GRUB has a nice boot-selector-like user interface.) (96/08/12)

Can I boot L4 + servers from harddisk?
Yes, that's possible: GRUB can boot from hard disk partitions as well provided they have some supported filesystem (BSD FFS or Linux Ext2fs) and they're accessible using the BIOS (i.e. within the BIOS translation for sector/head/cylinder). Just modify the GRUB config file to use files from the hard disk, e.g.
kernel= (hd0,2)/foo/bar/grubboot.img
(hd0,2) means Linux' /dev/hda3 or /dev/sda3.

You can boot GRUB from a floppy and have its config file point to files on hard disk, or (if you're brave) you can even install GRUB on hard disk; follow the GRUB instructions on how to do this. (96/08/12)

Does L4 run on the i386, i486, Pentium and Pentium Pro processors?
There are two versions of the L4 microkernel: an i486 version and a Pentium version.

The i486 version (the one we distribute) doesn't run on the i386, but it does run on Pentium and Pentium Pro CPUs.

There is also Pentium-optimized version of the kernel (but that one currently isn't freely available). (98/03/09)

The kernel seems to be really tiny. Is it small enough to reside in the CPU's 8k internal instruction cache?
No, the whole kernel won't fit into the first-level cache, but those critical parts of it used most often (mainly IPC) do. The kernel is linked together in a special manner so that those critical parts end up in adjacent memory regions to make them more cacheable. (96/08/23)

Is the Linux single server running on L4 binary compatible to Linux/i386?
The Linux server is mostly binary compatible with Linux/i386 at the application level (you can run it on any standard Linux distribution's base system; we use Debian 1.1). Things which don't (and probably never will) work are V86 mode (affecting DOSEmu and WINE) and kernel modules compiled for a standard i386 kernel. (96/08/23)

Can Linux applications running under the Linux/L4 single server invoke L4 system calls (like the IPC primitives) directly, or are they run in some protected environment?
Linux applications can use all L4 system calls directly, including the IPC primitives. (96/08/23)

How do I access the serial ports under L4?
You can do it the simple or the hard way. The simple way is to renounce interrupts and to receive and send data via polling. The hard way incorporates the usage of interrupts.

I. Access to serial ports without interrupts:

You must:

  1. Initialize and configure the SIO (usually a 16550 chip):
    Write the divisor value (= 115200/bps) to DLLO/DLHI registers.
    Configure number of start and stop bits as well as parity in LCR (Line Control Registers).
    Reset the SIO by reading IIR, LSR, IIR, RBR, IIR, MSR, IIR registers subsequently.
    Disable the SIO interrupts by configuring IER (Interrupt Enable Register).
    Maybe you have to set DTR and RTS in MCR (Modem Control Register). This step can usually be omitted.
    All registers lie in the port address space of the PC. COM1 usually uses 8 subsequent addresses starting at 0x03f8, COM2 starting at 0x02f8.

  2. Send and/or receive data via polling.
    You have to test a bit in the LSR (line status register). The bit and its desired state differ for the transmit and receive case. Remember, to have a timeout mechanism is always a good idea!
    If the bit has the desired state you are allowed to transmit your data byte to THR (transmitter holding register) in the transmit case or to read a data byte from RBR (Receiver Buffer Register) in the receive case.

II. Access to serial ports with interrupts:

You must:

  1. Create a thread which attaches to the wanted interrupt. The thread eventually suspends itself with an receive syscall and is activated everytime the desired interrupt occurs.

  2. Initialize and configure the SIO as under I.1. Step d) is different from I.1, because (Surprise!) the appropriate interrupts (Receive and/or Transmit) have to be enabled.

  3. Enable the necessary IRQ (in most cases, COM1 uses IRQ4 and COM2 uses IRQ3) by programming the PIC (port address 0x21).

You should find a detailed description of SIO and PIC in most good PC hardware books.

Example code for most of the functionality mentioned above is stored under lib/libl4dbg/src within the L4 source tree. (rb 97/01/07)

How do I boot L4 + servers over the network using a bootp/tftp server?
  1. Ask your Administrator to create a directory /boot/$LOGNAME on your bootp/tftp server.

  2. Create a /boot/$LOGNAME/menu.lst. It should contain references to the images you want to boot. You can either copy the images to /boot/$LOGNAME or create links under /boot/$LOGNAME pointing to your images. A simple menu.lst could look like follows:

    title = hello world
    module=(nd)/boot/jw5/grubboot.img boothack nowait

    But remember: In order to be able to boot files using tftp all files have to be readable by 'other'. If you are using links to some files in your home directory all directories in the path have to be executable by 'other'.

  3. Take an empty floppy disk and insert it into your Linux workstation. If your machine is a local node at the Institute of Operating Systems simply invoke ~jw5/outgoing/grubinst <user name> [<config file name>]. The script will install a precompiled grub with support for ne2000 and adjust the boot configuration using the supplied parameters. Otherwise download the precompiled grub, adjust the script and invoke it locally.

  4. Insert the disk into your test machine and boot it.

Last modified: Thu Jun 21 19:11:15 2001

Operating Systems Group