High-level Build Overview

For detailed build and setup instructions, you want to go here.

Linux Kernel

This is just a standard kernel build:

         make menuconfig
         (sudo) make modules_install install

The kernel should be built and installed before you try to use anything else.

Patched insmod

This is built and installed using the autoconf/Makefile setup in lcd-domains/module_init_tools.

Everything Else

The top-level Makefile in lcd-domains will build everything else - LCD microkernel, test modules, etc. It does so by creating a build output directory and building and linking things in the right sequence (e.g., liblcd needs to be built before the test modules, so we can't just do a blind recursive make - this is another reason why our build is separated from the kernel's blind recursive make build).

In this step, everything is built out of source, meaning that the build output crap is put into a separate directory from the source. This is done by carefully tricking the kernel build system to think it is building in source. The reason why it is done is so we can build the same files multiple times with different build configurations. It's also kind of nice to have all of the build crap separate, as a bonus.

A top-level make:

         cd lcd-domains

will build everything. You can build individual components, e.g.

         make libcap.microkernel

will build the version of libcap that is used in the microkernel.

Note: There is minimal dependency tracking across components. For example,

         make microkernel

only checks for the existence of libcap.a, libasync.a, and so on. It will not check to see if those need to be rebuilt first. You need to keep track of that yourself. (Why? Because we're linking together various independent builds, and we use phony targets to trigger them. It's hard to do dependency management.)

It is also worth noting that none of the "everything else" is installed. This makes our life easier (no extra install step, depmod, etc.). There are helper scripts in lcd-domains/scripts for loading the microkernel and running examples that use the right paths for loading the modules.

LCD Microkernel and kliblcd

This is all packaged up into one kernel module (.ko). The top-level Makefile:

  • Creates the build/microkernel_build build output directory
  • Builds libcap, libfipc, and libasync for the non-isolated environment
  • Builds the microkernel source files (arch-dependent/independent, kliblcd) using the kernel build system, and links the whole thing into one .ko


This is all packaged into one static library (.a). The top-level Makefile:

  • Creates the build/liblcd_build build output directory
  • Builds libcap, libfipc, and libasync for the isolated environment
  • Builds the liblcd source files (in lcd-domains/liblcd) using the kernel build system, and links the whole thing into one .a using a GNU AR script

Test Modules

These are built as .ko's. The top-level Makefile:

  • Reproduces the directory structure in the lcd-domains/test_mods directory into build/test_mods
  • Copies over the Kbuilds with some preprocessing (see Makefile)
  • Invokes a regular external kernel build