seL4 Level-1 Tutorials - Exercise #0: TCCoE Repository
Objective
Get familiar with the TCCoE code repository for seL4.
Background
This course is an introduction to seL4 development. There has been a steep learning curve for developers coming into seL4 and the purpose of this course is to make it more accessible. It includes information such as creating a project from scratch, doing proper linking to the seL4 kernel, and supporting projects and toolchain.
The course uses the Trusted-Computing Center of Excellence (TCCoE) code repository structure for seL4. The repository contains controlled versions of the seL4 kernel, projects, and toolchains.
The course focuses on creating a practical example of seL4 by the learner and is expected to last around 4 hours. Of course, the seL4 Whitepaper and seL4 Reference Manual can be studied further for deeper understanding of the concepts.
The tutorials follow the simple-template distro structure in the repository as shown in the Figure below.
The folder structure is designed for organizational purposes. The scripts of importance are:
- version: selects which TCCoE seL4 version to use (e.g. 1.0).
- Settings.cmake: a cache file for cmake build tool which allows all binaries and projects under the distro folder to find and link to seL4 version that was selected.
- CMakeLists.txt: specific to each project. Defines the main entry point after dropping from kernelspace to userspace. Also defines the exact libraries needed for the specific project to work.
Steps
- Download level-1-tutorials-with-kernel.zip into the Ubuntu machine.
- Extract level-1-tutorials-with-kernel.zip into /home/$USER/sel4-files
$ unzip level-1-tutorials-with-kernel.zip -d /home/$USER/sel4-files
$ cd /home/$USER/sel4-files |
Note: Do not extract the archive in a Windows environment at all because it will change some of the configuration done internally.
Common commands that you will use in the exercises:
$ cd /home/$USER/sel4-files
$ container # if you set your environment using our provided guide
$ cd level-1-tutorials
$ ./version 1.0
$ ./init-build exercise-N x86 [--solution] # optionally initialize with solution provided
$ cd application/build/exercise-N
$ ninja
$ simulate [-g '-vga std'] # optional arguments for exercises that need GUI
## To exit Qemu simulation: Ctrl + A ⟶ X |
For clean-up, use the following:
$ ./clean_all # clean any build files and version links
$ ./clean exercise-N # clean specific exercise build files |