Hey there! Welcome to our Kernel From Scratch (KFS) project. This started out as part of the 42 Network curriculum, where we’re building an OS kernel from scratch. But here’s the fun part: we’re not just sticking to the basics. We’re adding our own features, customizing it, and going above and beyond the requirements.
Think of it as a fun, experimental project where we’re diving deeper into the world of systems programming and learning along the way. We’re taking the opportunity to add our own spin, explore new ideas, and build something that’s truly ours.
- An ASM bootable base that handles multiboot header
- A linker
- A basic kernel library, with basics functions and types
- GDT
- IDT
- PCI
- PIT
- RTC
- Date
- time
- 24h mode
- 12h mode
- Keyboard
- Querty
- Azerty
- Minimalistic shell
- clear
- reboot
- shutdown
- logout
- peek
- poke
- lspci
- screentime
- datetime
- timer
- history
- help
- Scroll
- Cursor
- History navigation
- Different Screens (3 TTYs for now)
- Signal handling
- SIGINT (Ctrl+C)
- SIGQUIT (Ctrl+D)
- Kernel panic
- Register dumping
- Double-panic guard (prevents recursive panics from hanging the last line of defense)
- Stack tracer (walks and prints call frames on panic)
- Kernel symbol table
- Generated automatically at build time (two-pass build: pass 1 links a placeholder table to get real addresses via
nm, pass 2 links the real table in) - Used to resolve function names in panic/stack-trace output
- Generated automatically at build time (two-pass build: pass 1 links a placeholder table to get real addresses via
- VGA
- Text Mode (16 color)
- 80x25
- 80x50
- Video Mode
- 320x200x256
- 640x480x16
- Text Mode (16 color)
- Fonts
- 8x8
- 8x16
- Print
- Serial print
- VGA print
- Enable paging
- User/Kernel Space Memory
- Physical Memory
- alloc frame
- free frame
- Virtual Memory
- alloc page
- free page
- Memory management
- mmap
- munmap
- malloc
- calloc
- free
- size
- Draw Line
- Draw Shapes (Empty + Filled)
- Rectangle + Square
- Triangle
- Circle
- Rhombus
- Draw Array of pixels (To draw images)
The whole toolchain (i386 cross-compiler, nasm, grub-mkrescue, ...) is containerized, so you don't need to install anything besides Docker/QEMU locally.
make— builds the kernel and ISO inside thebuild-envDocker container (defined indocker-compose.yml)make run— builds, then boots the ISO in QEMUmake dbg— rebuilds from scratch and boots in Bochs with the debugger attachedmake re/make fclean— clean build artifacts (also runs inside the container viaclean-env)