S3K is a capability-based separation kernel targetting embedded RISC-V systems.
Page | Description |
---|---|
Home | Documentation Index |
S3K Design | High-level design of S3K |
S3K Implementation | Description of S3K implementation |
S3K API | User-level Kernel API |
More documenation will be added.
Set your compiler toolchain in tools.mk
. By default we have the following:
CC =riscv64-unknown-elf-gcc
AR =riscv64-unknown-elf-ar
LD =riscv64-unknown-elf-ld
SIZE =riscv64-unknown-elf-size
OBJDUMP =riscv64-unknown-elf-objdump
OBJCOPY =riscv64-unknown-elf-objcopy
For building and running the hello
project
# Build common libraries kernel and hello project
cd projects/hello
# Build the project
make
# Run the program using QEMU
make qemu
- RISC-V GNU Toolchain
- We recommend that you clone the repository and build the toolchains as follows:
This puts
./configure --prefix=/opt/riscv --enable-multilib sudo make
riscv64-unknown-elf-*
tools in/opt/riscv/bin
. - You should then add
/opt/riscv/bin
to thePATH
variable, e.g.,PATH=/opt/riscv/bin:$PATH
. - You can make the toolchain user only by setting
--prefix=$HOME/.opt/riscv
andPATH=$HOME/.opt/riscv/bin:$PATH
. Then you do not need to build the toolchain withsudo
.
- We recommend that you clone the repository and build the toolchains as follows:
- QEMU System RISC-V - Build or install QEMU with RISC-V.
- You should have something like
qemu-system-riscv64
installed. It allows us to use our custom kernel. - You should not use
qemu-riscv64
, this only runs/simulates a Linux kernel.
- You should have something like
- kernel - The kernel source code.
- src - C and assembly files
- inc - Header files
- linker.ld - Linker script
- Makefile - Kernel's makefile
- s3k_conf.h - Default kernel configuration
- common - Libraries for the kernel
- inc - header files
- drivers - UART and timer driver
- s3k - Kernel API library
- altc - Minimal library needed by the kernel
- plat - Platform configurations
- src - Source files for libraries in inc
- start - startup files for applications
- plat/.mk - Compiler flag and more for a platform.
- inc - header files
- projects - Example projects using the kernel
- demonstrator - bigger example project
- hello - Hello, world example with two processes
- ping-ping - IPC example
- trapped - Trap handling example
- LICENSE - MIT License file
- tools.mk - Set the compiler tools here