Awkernel is a safe and realtime operating system. It can execute async/await applications in kernel space safely.
$ sudo apt install clang qemu-system-arm qemu-system-x86 qemu-system-misc python3-pyelftools
$ rustup toolchain install nightly-2025-05-22
$ rustup default nightly-2025-05-22
$ rustup component add rust-src llvm-tools-preview
$ rustup target add x86_64-unknown-none aarch64-unknown-none riscv64gc-unknown-none-elf riscv32imac-unknown-none-elf
$ cargo install cargo-binutils
$ curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
$ cargo binstall mdbook
$ cargo binstall mdbook-mermaid
- kernel
- boot code
- initialization
- virtual memory
- heap memory
- stack memory
- devices (UART, etc)
- awkernel_lib
- library used by both kernel and awkernel_async_lib
- awkernel_async_lib
- asynchronous library for no_std
- awkernel_async_lib_verified
- verified library for awkernel_async_lib
- pure Rust (no dependencies on external functions and no inline assembly)
- awkernel_futures_macro
- awkernel_drivers
- awkernel_aarch64
- userland
- applications
graph TD;
awkernel_async_lib-->awkernel_async_lib_verified;
awkernel_async_lib-->awkernel_futures_macro;
awkernel_lib-->awkernel_aarch64;
awkernel_async_lib-->awkernel_lib;
awkernel_lib-->awkernel_sync;
userland-->awkernel_async_lib;
kernel-->awkernel_lib;
kernel-->awkernel_async_lib;
kernel-->awkernel_aarch64;
kernel-->awkernel_drivers;
awkernel_drivers-->awkernel_lib;
kernel-->userland;
Applications can use awkernel_async_lib
, awkernel_lib
, and awkernel_drivers
.
$ make docs
$ ls docs/index.html
$ cargo doc_raspi
$ ls target/aarch64-kernel/doc/awkernel/index.html
$ ls target/aarch64-kernel/doc/awkernel_lib/index.html
etc
$ cargo doc_aarch64_virt
$ ls target/aarch64-kernel/doc/awkernel/index.html
$ ls target/aarch64-kernel/doc/awkernel_lib/index.html
etc
$ make kernel/asm/x86
$ cargo doc_x86
$ ls target/x86_64-kernel/doc/awkernel/index.html
$ ls target/aarch64-kernel/doc/awkernel_lib/index.html
etc
Release build (recommended).
$ make x86_64 RELEASE=1
Debug build.
$ make x86_64
Qemu 8.x or later is required. Qemu 6.x is not supported.
$ make qemu-x86_64
$ make debug-x86_64
$ make gdb-x86_64
Release build (recommended).
$ make aarch64 BSP=aarch64_virt RELEASE=1
Debug build.
$ make aarch64 BSP=aarch64_virt
$ make qemu-aarch64-virt
$ make debug-aarch64_virt
$ make gdb-aarch64_virt
Release build (recommended).
RELEASE=1
must be used for actual devices.
$ make aarch64 BSP=raspi3 RELEASE=1
Debug build.
$ make aarch64 BSP=raspi3
$ make qemu-raspi3
$ make debug-raspi3
$ make gdb-raspi3
Specify Release=1
.
$ make aarch64 BSP=raspi4 RELEASE=1
- Serial
- port: GPIO 14 (Tx) and 15 (Rx)
- 8N1: eight data bits, no parity, one stop bit
- Speed: 115200
Specify Release=1
.
$ make aarch64 BSP=raspi5 RELEASE=1
- Serial
- port: GPIO 14 (Tx) and 15 (Rx)
- 8N1: eight data bits, no parity, one stop bit
- Speed: 115200
Release build (recommended).
$ make riscv64 RELEASE=1
Debug build.
$ make riscv64
$ make qemu-riscv64
Release build (recommended).
$ make riscv32 RELEASE=1
Debug build.
$ make riscv32
$ make qemu-riscv32
Debug build.
$ make std
Release build.
$ make std RELEASE=1
Debug build.
$ make run-std
Release build.
$ make run-std RELEASE=1
$ make qemu-raspi3
$ telnet localhost 5556
Unit tests by using Rust's mechanism can be executed as follows.
$ make test
Some mechanisms which use atomic instructions are verified by using loom, and these verifications are executed as follows. It will takes several minutes.
$ make loom