Part 0 - Setting up your environment

This page covers two things:

  1. Acquiring the Microkit SDK and the other dependencies needed for the tutorial.
  2. Acquiring the tutorial code, so you can complete the exercises.

If you have any issues, feel free to open an issue on the GitHub repository.

Acquiring the dependencies

We have two options for working on the tutorial:

  1. Install dependencies and do the tutorial natively, however this option is only available if you are doing the tutorial on Linux, macOS or Nix.
  2. If you prefer to use Docker, you can follow the instructions for Docker.

Option 1 - Linux, macOS, Nix

You'll need the following dependencies:

  • Make
  • AAarch64 cross compiler
  • QEMU simulator for running the tutorials
  • The Microkit SDK
sudo apt update && sudo apt install -y make gcc-aarch64-linux-gnu qemu-system-arm

You can get the SDK with:

# First make a directory for the tutorial
mkdir microkit_tutorial
cd microkit_tutorial
# Then download and extract the SDK
curl -L https://github.com/seL4/microkit/releases/download/2.0.1/microkit-sdk-2.0.1-linux-x86-64.tar.gz -o sdk.tar.gz
tar xf sdk.tar.gz

Option 2 - Docker

seL4 provides an official Docker container which has the necessary dependencies for this tutorial. You can find instructions for acquring it here.

After setting up the Docker container, run the following commands outside Docker:

# First make a directory for the tutorial
mkdir microkit_tutorial
cd microkit_tutorial
# Then start the Docker container
container
# Then download and extract the SDK
curl -L https://github.com/seL4/microkit/releases/download/2.0.1/microkit-sdk-2.0.1-linux-x86-64.tar.gz -o sdk.tar.gz
tar xf sdk.tar.gz

This Docker image is mounted on your host file system. What that means is that the microkit_tutorial directory is accessible from both Docker and from your normal environment.

Run all the commands for downloading the tutorial code and building/running the tutorial in the container. You can then open the microkit_tutorial directory in your code editor for viewing/editing the tutorial code.

Getting the tutorial code

# Download and extract the tutorial code (in the microkit_tutorial directory)
curl -L trustworthy.systems/Downloads/microkit_tutorial/tutorial.tar.gz -o tutorial.tar.gz
tar xf tutorial.tar.gz

Now you can move on to part 1 of the tutorial.