TinyOSis a tutorial series about minimal operating system kernel implementation based on the comprehensive tutorial series mini-risscv-os. This operating system kernel is based on RISC-V. instrucion set architecture. Credits to the original authors. A fully built environment is available as a docker environment. This tutorial will cover several chapters related to implementing a operating system from begining.
In order to complete the tutorial you just need only two things
Beyond the technical requirements, inorder to understand the concepts I highly recommend looking at my firmware tutorial series before starting on this.
Fully bulid docker environemt with all the requirements installed including
- gcc toolchain
- qemu with RISC-V simulator
can be found in the following docker-hub reposiroty.
You can follow the below instructions to get it mount on your docker stack.
docker pull archfx/rvutils:qemu # pull the docker container
git clone https://github.com/Archfx/tinyos #clone this repository
docker run -t -p 6080:6080 -v "${PWD}/:/tinyos" -w /tinyos --name rvutils archfx/rvutils:qemu #Mount the repo to the docker container
# Opern another terminal
docker exec -it rvutils /bin/bash
- HelloWorld
- Enable UART to print trivial greetings
- ContextSwitch
- Basic switch from OS to user task
- MultiTasking
- Two user tasks are interactively switching
- TimerInterrupt
- Enable SysTick for future scheduler implementation
- Preemptive
- Basic preemptive scheduling
- Spinlock
- Lock implementation to protect critical sections
- ExterInterrupt
- Learning PLIC & external interruption
- BlockDeviceDriver
- Learning VirtIO Protocol & Device driver implementation
- MemoryAllocator
- Understanding how to write the linker script & how the heap works
- SystemCall
- Invoking a mini ecall from machine mode.
- Changes the current working directory to the specified one and then
make # Build the OS
make qemu # Simulate the OS
Note: Press Ctrl-A and then X to exit QEMU
This repo adheres to the original repo licenses. mini-riscv-os
is freely redistributable under the two-clause BSD License.
Use of this source code is governed by a BSD-style license that can be found in the LICENSE
file.