According to https://docs.sel4.systems/projects/buildsystem/incorporating.html, inside the SeL4 build docker the following project base source structure is to deploy.
myos
├── kernel/
│ └── CMakeLists.txt
├── projects/
│ ├── <other projects> /
│ │ └── CMakeLists.txt
│ └── seL4_libs/
│ └── CMakeLists.txt
├── tools/
│ └── cmake-tool/
│ ├── base.cmake
│ ├── all.cmake
│ └── default-CMakeLists.txt
└── CMakeLists.txt -> tools/cmake-tool/default-CMakeLists.txt
Technically this structure is as follows constructed
git clone https://github.com/seL4/seL4.git kernel
git clone https://github.com/seL4/seL4_tools.git tools
mkdir projects
git clone https://github.com/seL4/seL4_libs.git projects/seL4_libs
git clone https://github.com/seL4/sel4runtime.git projects/sel4runtime
git clone https://github.com/seL4/musllibc.git projects/musllibc
git clone https://github.com/seL4/util_libs.git projects/util_libs
ln -s tools/cmake-tool/init-build.sh init-build.sh
The root task is added by adding an additional project below the project folder. An good starting point if the following “Hello World”: https://github.com/mskordal/SeL4-hello-world
The last thing we need to do is to create a symbolic link to “easy-settings.cmake” in the root directory, since “init-build.sh” requires it.
ln -s projects/hello/easy-settings.cmake easy-settings.cmake
Finally build and run the project:
mkdir build && cd build
ninja
./simulate
You can exit QEMU with `Ctrl-a + x`.
According to this paper here, we can see the “Hello World” as the root task. In a more complex operating system the root task is the ini task. So, Init Thread has “full permission” on the capabilities, where “full permission” means the whole scope of operations provided by the capability interface. Remember, this is what makes a microkernel: its responsibility is IPC, virtual memory, threads. Everything else functions in user space.
Note: Also CAmkES creating a CapDL spec representing the entire application (ie. all components and connections) is such as root task.
Attachements: