From 42b9c6cb0e4ab764afd08ce3a363835b3e09ae01 Mon Sep 17 00:00:00 2001 From: Birgit Brecknell Date: Mon, 15 Jul 2024 10:49:30 +1000 Subject: [PATCH] address Gerwin's comments on setting-up page Signed-off-by: Birgit Brecknell --- Tutorials/seL4/setting-up.md | 122 ++++++----------------------------- 1 file changed, 21 insertions(+), 101 deletions(-) diff --git a/Tutorials/seL4/setting-up.md b/Tutorials/seL4/setting-up.md index 4a281b7556..41f981f125 100644 --- a/Tutorials/seL4/setting-up.md +++ b/Tutorials/seL4/setting-up.md @@ -6,12 +6,24 @@ SPDX-FileCopyrightText: 2024 seL4 Project a Series of LF Projects, LLC. --- # Setting up your machine -**Overview** -- Set up your machine - install dependencies required to run seL4`` -- Run seL4test on a simulator -- Gain awareness of terminology used for seL4 +## Google's Repo tool + +The primary way of obtaining and managing seL4 project sources is through the use of Google's Repo tool. +To install run: +```sh + sudo apt-get update + sudo apt-get install repo +``` + +
+More on Repo +
+[More details about on installing Repo](https://source.android.com/setup/develop#installing-repo). + +[seL4 Repo cheatsheet](../projects/buildsystem/repo-cheatsheet) +
## Docker To compile and use seL4, it is recommended that you use Docker to isolate the dependencies from your machine. @@ -49,100 +61,8 @@ sudo usermod -aG docker $(whoami) -## Google's Repo tool - -The primary way of obtaining and managing seL4 project sources is through the use of Google's Repo tool. - -To install run: -```sh - sudo apt-get update - sudo apt-get install repo -``` - -
-More on Repo -
-[More details about on installing Repo](https://source.android.com/setup/develop#installing-repo). - -[seL4 Repo cheatsheet](../projects/buildsystem/repo-cheatsheet) -
- - -## Base build dependencies -To establish a usable development environment it is important to install your distributions basic build packages. - -### Base dependencies - -The basic build package on Ubuntu is the `build-essential` package. To install run: - -```sh -sudo apt-get update -sudo apt-get install build-essential -``` - -Additional base dependencies for building seL4 projects on Ubuntu include installing: - -```sh -sudo apt-get install cmake ccache ninja-build cmake-curses-gui -sudo apt-get install libxml2-utils ncurses-dev -sudo apt-get install curl git doxygen device-tree-compiler -sudo apt-get install u-boot-tools -sudo apt-get install python3-dev python3-pip python-is-python3 -sudo apt-get install protobuf-compiler python3-protobuf -``` - -### Simulating with QEMU - -To run seL4 projects on a simulator you will need QEMU. QEMU is a generic and open source machine emulator and virtualizer, and can emulate different architectures on different systems. - - -```sh -sudo apt-get install qemu-system-arm qemu-system-x86 qemu-system-misc -``` - -### Cross-compiling for ARM targets - -To build for ARM targets you will need a cross compiler: - -```sh -sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi -sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -``` - -(you can install the hardware floating point versions as well if you wish) - -```sh -sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -``` - -### Cross-compiling for RISC-V targets - -To build for RISC-V targets you will need a cross compiler: - -{% include risc-v.md %} - - -
-More on host dependencies -
-[A detailed guide on host dependencies](../projects/buildsystem/host-dependencies) -
- - -## Python Dependencies - -Regardless of your Linux distribution, python dependencies are required to build seL4, the manual and its proofs. To install you can run: - -```sh -pip3 install --user setuptools -pip3 install --user sel4-deps -``` - -(Some distributions use `pip` for python3, others use `pip3`. Use the Python 3 version for your distribution.) - - -## Getting a build environment -To get a running build environment for seL4 and Camkes, run: +### Getting a build environment +To get a running build environment for seL4 and CAmkES, run: ```bash git clone https://github.com/seL4/seL4-CAmkES-L4v-dockerfiles.git @@ -160,7 +80,7 @@ The last line will say something like: Hello, welcome to the seL4/CAmkES/L4v docker build environment ``` -## Mapping a container +### Mapping a container To run the container from other directories (e.g. starting a container for the [Hello World](hello-world) tutorial, which we'll do next), you can setup a bash alias such as this: ```bash @@ -173,7 +93,7 @@ Replace `///` to match where you cloned the git repo of the docker fil *Reminder:* Include the absolute path to your `seL4-CAmkES-L4v-dockerfiles` folder, e.g. ```bash -echo $'alias container=\'make -C //home/jblogs/seL4-CAmkES-L4v-dockerfiles user HOST_DIR=$(pwd)\'' >> ~/.bashrc +echo $'alias container=\'make -C /~/seL4-CAmkES-L4v-dockerfiles user HOST_DIR=$(pwd)\'' >> ~/.bashrc # now open a new terminal, or run `source ~/.bashrc` ``` @@ -219,7 +139,7 @@ jblogs@in-container:/host/build-x86$ ./simulate If you need to make any code modifications or commit things to git, use terminal A. If you need to recompile or simulate an image, use terminal B. -`./simulate` will take a few minutes to run. If QEMU works, you'll see something like +`./simulate` is run using [QEMU](https://www.qemu.org/), and will take a few minutes to run. If QEMU works, you'll see something like ``` Test suite passed. 121 tests passed. 57 tests disabled.