Unix like toy operating system.
License | x86 Clang | x86 GCC |
---|---|---|
The build-system (Makefile) expects a C compiler (gcc
or clang
) and a C++ compiler (g++
or clang++
) to be present in $PATH
. Additionally nasm
is currently still required to build the x86 bootloader binary.
# Debian/Ubuntu
sudo apt install nasm clang build-essential
# FreeBSD
sudo pkg install gmake nasm
# Replace make with gmake when compiling on BSD systems
make kernel # Build kernal & image
make clean # Clean all build artifacts
make info # Print env & config variables
make run # Run image in qemu
DEBUG=1 make kernel # Enable `-g` and `-Og`
CC=clang CXX=clang++ make kernel # Select compiler
. # Project root
├── mk # Makefile config
└── sys # Source code root
├── arch # Platform specific boot & init
│ ├── template # Example for new platforms
│ └── x86 # x86 implementation
├── driver # Drivers
├── kernel # Kernel source
└── sys # System headers
See sys/arch/template for details on platforms specific code.
commit: 37302bf
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C++ 11 201 480 1374
Assembly 9 142 270 461
C/C++ Header 19 146 661 344
make 9 36 3 112
Markdown 2 28 0 80
-------------------------------------------------------------------------------
SUM: 50 553 1414 2371
-------------------------------------------------------------------------------
- The little book about OS development (x86)
- github.com/cfenollosa/os-tutorial (x86)
- How to Make a Computer Operating System
- Writing a Simple Operating System from Scratch
- Harvard: OS161 Kernel (good Makefile build-system)
- GNU Assembler: Examples
- GNU Assembler: Syntax
- YouTube: FreeBSD Kernel Internals, Dr. Marshall Kirk McKusick
- YouTube: Fast IPC: L4 and Fast Interprocess Communication
- YouTube: Preemptive Scheduling: How to Share a Processor
- YouTube: Virtual Memory in the x86
- YouTube: Modern Page Tables: Multi-Level Paging
- YouTube: Virtual Memory (Playlist)
- YouTube: MIT OpenCourseWare (Playlist)