This project is a small kernel and bootloader setup for a custom x86 operating system, built from scratch as part of the kfs (Kernel From Scratch) project at 42. The repository contains the bootloader, the kernel entry point, and the build rules used to generate the final ISO image.
bootloader/- assembly bootloader and multiboot headerincludes/- public header and libc like reimplementationkernel/- kernel entry point, terminal, and drivers (keyboard, VGA, framebuffer)helpers/- low-level utilities (memcpy, memset, kprint, ...)docs/- technical and developer documentation (multiboot, memory layout, etc.)linker.ld,grub.cfg- linking and GRUB boot configuration
- Boots via GRUB using a Multiboot-compliant kernel
- Text output through VGA text mode or linear framebuffer, depending on what the bootloader/GRUB provides
- Basic keyboard driver
- Some shortcuts: f1-f4 for multiscreen and escape key to exit the kernel
- An i386 cross-compiler toolchain see
docs/toolchain.md nasmld(withelf_i386support)grub-mkrescueandgrub-fileqemu-system-i386
make # build the kernel binary (bin/kernel) make up # build the ISO and run it in QEMU make dev # run the raw kernel binary directly in QEMU (no ISO) make debug # build a debug ISO (adds -DDEBUG=1) and run it in QEMU with serial output make clean # remove object files make fclean # remove all build artifacts (binaries, ISOs) make re # fclean + all
Detailed technical explanations (multiboot header, GRUB, memory layout, etc.) live in the docs/ folder. This README only covers the project overview; refer to docs/ for implementation details.
- Fundamental Concepts and Structure of the Linux Kernel (old version v2.4.20) here
- Some real linux kernel docs here
- The OSdev documentations and guide here
- Writing a Tiny x86 Bootloader in assembly here
- Operating Systems: From 0 to 1 by tuhdo here
- The little book about OS development by Erik Helin, Adam Renberg here
- Kernels 101 – Let’s write a Kernel by Arjun Sreedharan here
- Kernels 201 - Let’s write a Kernel with keyboard and screen support here
- Writing My Own OS by Frank Rosner here
- NyanOS repo here