Building and Using the L4Re Microkernel
System Requirements
To compile the L4Re Microkernel, you need a recent version of:- GNU C & C++ compiler
- GNU Binutils
- GNU Make
- Perl
Building
The steps nessecary to build the L4Re microkernel are as follows:
-
Get L4Re (you can select the base package variants).
-
Create build directory
somedir$ cd src/kernel/fiasco
somedir/src/kernel/fiasco$ make BUILDDIR=mybuildThe
make
step will generate a build directory calledmybuild
. -
Got the build directory
somedir/src/kernel/fiasco$ cd mybuild
-
Configure kernel build
somedir/src/kernel/fiasco/mybuild$ make config
Will launch the configuration menu. This is the time to configure your kernel. The default config will build a uniprocessor IA32 kernel with debugging features enabled. If you're happy with this step you may skip it.
-
Build it
somedir/src/kernel/fiasco/mybuild$ make
The
make
call will build the kernel. Add-jX
as you like. After a successful build the kernel binary will be calledfiasco
.
Building on FreeBSD
For building on FreeBSD, install from ports collection:gmake
instead of simply make. More recent
binutils
from the ports collection are required for building.
Running
To boot and run the L4Re Microkernel you also need other programs, at least
bootstrap
,
sigma0
,
moe
, and minimum one application.
Those programs are available in the L4Re repository and are built there. They already have been downloaded in the download step before.
To test your build we recommend to use QEMU. There are several options for booting, one is to generate a bootable ISO image. For that, build L4Re and launch in the build directory of your L4Re tree:
You will then find a file hello.iso in the images directory. Alternatively you can also use 'make grub1iso E=hello MODULE_SEARCH_PATH=/path/to/fiasco-build-dir' provided you have a stage2_eltorito file available on your system.
When booted, you should see the hello word server repeatedly printing "Hello World!".
Debugging
The L4Re Microkernel comes with a feature rich built-in low-level debugger that it both suitable for analyzing in-kernel situations as well as mastering complicated user-level issues.
The kernel debugger is entered with ESC
on the serial console.
Press 'g
' to exit the kernel debugger and continue.