Tilck is a “monolithic” kernel designed for educational purposes, aiming for binary compatibility with Linux, capable of running real Linux user programs (such as BusyBox, Vim, TinyCC, etc.) on i686 and riscv64 architectures. In other words, it is not a rewrite of Linux but rather a small, simple kernel that serves as an experimental platform for running real software.
Why was Tilck created? What problems does it solve?
- • The most intuitive issue for learning kernels: Many educational kernels require writing a set of user programs, resulting in a steep learning curve and making it impossible to run existing software directly. Tilck directly supports many Linux programs, making it much easier to learn and validate kernel behavior.
- • Learning real concepts without being overwhelmed by complexity: Linux is powerful but also very complex—making modifications, testing, or validation can be slowed down by numerous details and dependencies. Tilck aims for “less is more”: a smaller codebase, predictable behavior, and low latency, making it more suitable for teaching, experimentation, and embedded scenario exploration.
- • Running on real hardware while remaining lightweight: Tilck can boot under QEMU with very little memory (for example, 3MB) and can also be written to USB for running on real machines, making it suitable for those with hardware experimentation needs.
What can Tilck do? (Highlights Overview)
- • Supports ~100 Linux syscalls, sufficient to run command-line programs like BusyBox, Vim, and Micropython.
- • Support for i686 and riscv64 (riscv is aimed at embedded systems, using device tree).
- • Built-in simple ramfs, devfs, and read-only FAT support (for initrd), with a VFS layer.
- • Can boot on QEMU or real x86 hardware, providing an interactive bootloader for BIOS/UEFI.
- • Comprehensive test coverage and CI (unit/system/integration testing), with GDB scripts for easy debugging.
- • Design goals: smaller binaries, simpler code, predictability, and ultra-low latency.
Installation and Quick Start (The Easiest Method, User-Friendly) Below is a common process, assuming you are on a Linux x86_64 or WSL:
- 1. Clone the repository and enter the directorygit clone https://github.com/vvaltchev/tilckcd tilck
- 2. The first time, you need to build the toolchain (the script will automatically handle common dependencies)./scripts/build_toolchain
- 3. Compile the kernel and generate the imagemake After compilation, you will see tilck.img (or the executable kernel file) in the build/ directory
- 4. Run with QEMU (the most convenient)./build/run_qemu or directly:qemu-system-i386 -kernel ./build/tilck -initrd ./build/fatpart
- 5. Write to USB to run on real hardware (if you want)sudo dd if=build/tilck.img of=/dev/sdX bs=4M && sync Then reboot and select USB to boot (remember to replace /dev/sdX)
- 6. Debugging and testing
- • Debug with GDB: In one terminal, run ./build/run_qemu to stop at the bootloader, then gdb ./build/tilck_unstripped, target remote :1234.
- • Run automated tests: /st/run_all_tests -c
Advantages (Why It’s Worth Noting)
- • Can actually run “real” programs: Unlike many educational kernels that can only run demos, Tilck can run real applications like BusyBox, Vim, and TinyCC.
- • Small size and simple code, suitable for teaching, experimentation, and rapid iteration.
- • Good architecture separation: Most code is architecture-independent, making it easy to port.
- • Good development experience: Comes with toolchain scripts, testing frameworks, and convenient scripts for running QEMU, making it user-friendly.
- • Hardware can be tested: Emphasizes “testing on real hardware”, not just playing in a VM.
Disadvantages / Limitations (Be Aware)
- • Incomplete functionality: Only implements a subset of syscalls, many Linux features are not implemented (graphics, rich networking, block devices, etc.).
- • Not a replacement for Linux: It is not intended to and cannot fully replace Linux; it is more of a tool for experimentation, education, and embedded domains.
- • Limited user-space multithreading support: If you want to run complex multithreaded applications or server loads, Tilck is not yet the best choice.
ConclusionTilck is a “small yet real” kernel: doing real things with smaller code—capable of running many Linux user programs while retaining the lightweight nature suitable for teaching and embedded exploration. If you want to learn about kernels, validate syscalls, or run Vim or BusyBox in a tiny environment, Tilck is definitely worth trying.
Project address: https://github.com/vvaltchev/tilck