Znu is a modular, SMP-capable kernel and operating-system project, primarily targeting x86_64. It is written mainly in C with architecture-specific assembly and a small amount of supporting tooling.
The project started in April 2026 from a simple question:
What if I read the OSDev Wiki and tried to make an operating system?
Znu has since grown into a kernel with its own memory management, scheduler, process model, VFS, TTY layer, syscall ABI, userspace C libraries, loadable kernel modules, device files, and networking system.
- x86_64 architecture support
- Limine boot integration
- BIOS and UEFI ISO generation
- GDT and IDT setup
- x86 exception/interrupt entry stubs
- legacy PIC support
- local APIC support
- APIC timer
- SMP/AP startup and per-CPU state
- CPUID support
- TSC calibration
- RTC and PIT support
- x86 syscall entry
- ring-3/user-mode entry
- PCI enumeration
- ACPI through uACPI
- Limine memory-map based physical memory discovery
- HHDM-based physical/virtual address conversion
- buddy-based physical page allocation
- zeroed physical-page allocation
- page freeing
- 4 KiB page mapping
- 2 MiB huge-page mapping
- virtual-memory address translation
- kernel address-space construction
- user address-space cloning
- user page-table teardown
- slab allocation
- kernel heap allocation interfaces
- process table
- PID allocation
- process states
- priorities
- round-robin selection within the highest runnable priority
- sleeping and wake-up
- wait channels
- child waiting
- process exit/zombie state
- kernel threads
- context saving
- per-CPU kernel stacks
forkexecvespawnbrk- process address spaces
- basic signal state and signal delivery machinery
- in-memory VFS node/file abstractions
- regular files and directories
- file descriptors
- path lookup
- directory enumeration
stat/fstat- device nodes
- generated devfs nodes
- generated procfs nodes
- FAT32 support
- disk/block I/O plumbing
- AHCI driver support
The tree currently contains devfs nodes for /dev/null, /dev/zero, /dev/fb0, and an evdev input node, plus procfs nodes including configuration data and kallsyms.
- multiple TTY objects
- canonical input buffering
- echo
- signal-enabled line discipline flags
- CR-to-NL input handling
- output post-processing
ioctlhandling for termios and window size- blocking TTY reads
- TTY wait/wake integration with the scheduler
/dev/ttyNdevice nodes- PS/2 input path
- Flanterm-backed terminal output
Znu is therefore beyond a framebuffer-only console: the kernel has a real TTY layer and userspace programs can use the corresponding file descriptors. PTYs are not currently part of the documented implemented interface.
The current x86 syscall implementation contains handlers for:
readwriteopenclosegetdentssysinfostatfstatspawnbrkforkexecveioctlmountgetrandomsigreturnarch_prctlzfilt(Custom zfilter syscall)
The userspace libc/ulibc tree also provides POSIX-like wrappers and C runtime support. Some libc functions are still stubs or compatibility shims; see Documentation/userspace.md.
Znu contains:
- ELF structures and loading interfaces
- creation of processes from ELF images
- user address-space construction
- an initramfs loaded as a Limine module
- optional LZ4-framed initramfs decompression
- CPIO
newcparsing /bin/initexecution in ring 3- a small userspace shell based on zline
- userspace test programs
The kernel also supports loading a kernel module named init.ko from the initramfs when present.
Current driver/source areas include:
- PCI
- AHCI
- Bochs/BGA framebuffer
- Intel E1000
- PS/2
- RTC
- PIT
- serial output
- input/evdev
The networking tree implements Ethernet framing plus ARP, IPv4 handling, TCP, UDP/DNS-related code, and a small TCP socket-like connection API used by the kernel test suite. As of now, Networking should be regarded as experimental.
The module subsystem has structures and APIs for:
- module loading/unloading
- module lookup
- aliases
- dependencies
- exported symbols
- module parameters
- module metadata
- module reference counting
Kernel symbol support also feeds the procfs kallsyms node.
Znu has a Linux-kernel-inspired build organization:
- top-level
Kconfig - top-level
Kbuild ZNUmakefile- per-subsystem Makefiles
- generated configuration headers
menuconfig/configuration targets through the in-tree Kconfig machinery- a bootstrap
build.sh - an in-tree host-tool build system
- Limine ISO generation
- compressed CPIO initramfs generation
- optional UEFI/BIOS/multi-boot images
- QEMU run target
- FAT32 image generation
See Documentation/build.md and the existing Documentation/kbuild/ documentation.
.
βββ arch/ Architecture-specific code
β βββ x86/ x86/x86_64 implementation
βββ drivers/ Device drivers and networking
βββ include/ Kernel and ABI headers
βββ init/ Initial userspace program
βββ kernel/ Core kernel subsystems
β βββ vfs/ devfs and procfs generators/nodes
βββ mm/ Physical/virtual memory management
βββ lib/ Kernel libc and userspace libc support
βββ user/ Userspace test/utilities
βββ configs/ Build, ISO and sysroot configuration
βββ scripts/ Build and code-generation helpers
βββ tools/ Host tools used by the build
βββ yuki/ UEFI/Yuki-related experimental tooling
βββ Documentation/ Project documentation
βββ Kconfig Top-level kernel configuration
βββ Kbuild Top-level build object lists
βββ ZNUmakefile Main Kbuild-style build logic
βββ build.sh Build/bootstrap entry point
The repository provides build.sh as the normal entry point.
./build.sh tools
./build.sh kernelor:
./build.sh buildThe build script bootstraps the repository's host tools when required and then invokes the in-tree zngmake toolchain.
The top-level make system also provides configuration and run targets. When ISO generation is enabled, it can produce BIOS, UEFI, or combined Limine images.
Please refer to Documentation/build.md for more information on building Znu.
For the current QEMU target, the build system can also create a FAT32 disk image and launch QEMU with an E1000 NIC and AHCI-backed disk.
See:
Documentation/build.mdDocumentation/kbuild/kbuild.txtDocumentation/kbuild/kconfig.txtDocumentation/kbuild/kconfig-language.txtDocumentation/kbuild/makefiles.txt
Documentation/README.md- documentation indexDocumentation/architecture.md- x86_64 architecture and boot pathDocumentation/memory.md- PMM, VMM, HHDM and kernel allocationDocumentation/processes.md- processes, scheduler, threads and signalsDocumentation/vfs.md- VFS, devfs, procfs and filesDocumentation/tty.md- TTY, input and terminal architectureDocumentation/userspace.md- init, ELF, syscalls and libcDocumentation/drivers.md- drivers and networkingDocumentation/build.md- building, configuration and QEMUDocumentation/status.md- source-tree implementation checklistDocumentation/roadmap.md- kernel development roadmapDocumentation/kbuild/- Kbuild/Kconfig documentationDocumentation/cpuid.txt- cpuid.h DocumentationDocumentation/images/- project logosDocumentation/stats/- language statistics
This Project is licensed under the Nicense 1.1. See LICENSE and NOTICE.
Znu's mascot, Nori, was initially designed by NekoMimiOfficial

