RepositoryCGRGreece
MA

malwarepad/cavOS

💾 Amd64 operating system in C. Trying to make a full OS, with a simple and readable codebase!

737stars
52forks
4issues
6views

Featured achievements

The project's latest awards

2
TINIX TRENDING·Topic: osdev

#2 Repository of the week

8
TINIX TRENDING·Topic: x86-64

#8 Repository of the week

9
TINIX TRENDING·Topic: os

#9 Repository of the week

Cave-Like Operating System

cavOS is an x86_64 POSIX-compliant operating system in C. An active effort of making a full OS, with a simple and readable codebase.

GitHub top language GitHub license Codacy Badge GitHub contributors GitHub commit activity

Previews of the OS

Terminal and Xorg utilitiesImage viewer and a mesa demo
preview4preview5
Thunar and MPV playing Bad AppleThe games Quake Doom and ClassiCraft
preview8preview7
Wikipedia on NetSurf BrowserHexChat on Liberta IRC (encrypted w/TLS)
preview6preview9)

Why make your own OS in [insert year]?

because I can.

Having a good time is my drive for this project + I learn a lot of cool low level stuff alongside that!

Kernel status

The cavOS kernel is a monolithic x86_64 one written in relatively simple C with a few bits of Intel assembly here and there. It uses the Limine bootloader and leverages the FAT32 filesystem for booting along with Ext2 for the root partition. I try to keep the code structure clean and fairly easy to understand, while avoiding too much abstraction. Hence, code quality and clarity are sometimes prioritized over performance gains.

  • x86_64 pre-emptive kernel that is Unix-like and POSIX-compliant
  • Architecture features fully supported (GDT, IDT, ISR, (I/O)APIC, SSE, LAPIC timer, RTC clock, syscall instruction)
  • ACPI mode, using I/O APIC redirects for interrupts
  • PCI scanning and various PCI device drivers
  • Full network stack (including TCP and DHCP) with network interface support (Intel E1000, Realtek RTL8139/RTL8169)
  • Two-way pipes, Unix domain sockets (AF_UNIX), eventfds, futexes, and signal support (with some BSD extensions)
  • FAT32, Ext2 and virtual file systems (/proc, /sys, /dev, etc)
  • PS/2 Keyboard/Mouse drivers along with serial port (COM1, COM2, etc) output
  • ELF64 binary loading, dynamic linking and shared libraries
  • Musl libc, Linux system call layer, pre-emptive multitasking
  • Primitive kernel tty with 8-bit color, some basic ANSI codes and psf1 fonts
  • BIOS/UEFI framebuffer utilization and exposure to userland via /dev/fb0

Userspace status

Userspace is my primary focus at the time being, with the kernel being quite stable. I'm trying to make this OS as close to Linux as I can, while adding my own stuff on top of it. This is visible with the system calls that are exactly like Linux's. That isn't random, I want cavOS to be as binary compatible with it as possible!

As far as the actual implementation goes, I'm using the apk package manager from Alpine Linux and their respective repositories for userspace assembly. Alpine's & musl's philosophy align with the cavOS one and I really see no point in recompiling stuff myself if I don't necessarily have to.

Frequently asked questions (FAQ)

  • Where do I download cavOS? You don't. It is by no means mature enough for an actual release yet, so you have to compile it yourself. It's not as difficult as other OSes, there are only a few short commands you have to run.
  • Is this a Linux distribution? No! The cavOS kernel does not share source code or headers with Linux. Some header definitions are obviously present but that is just to support the userspace. Internally the cavOS kernel doesn't have much in common with Linux other than the fact that it's monolithic. This layout may change in the future with cavOS-specific extensions being added as well.
  • How do I get inside the GUI? cavOS utilizes the xorg server (also known as X11 or X.org) to render a graphical UI. In order to start it up from the console, just run a.
  • Why is RAM usage this high? As you might've already guessed, the RAM usage reported by tools like fastfetch or free are a bit misleading. They don't match up to the typical Linux counterpart, as a lot of mmap() operations belong to other categories (like Buffers/Cached or likewise). This issue will eventually be fixed when features like COW are implemented along with others.
  • I found issues on the shell before launching the GUI... Keep in mind that cavOS' TTY equivalent doesn't support that many ASCII codes and is generally badly written. You can open PRs to fix that, but I'm focusing on other stuff at the moment.

Documentation

  • Contributing: Information about contribution guidelines & suggestions docs/contributing.md
  • Compiling: Information about building the OS correctly & cleaning unused binaries install.md

Credits

  • Limine: Modern, advanced, portable, multiprotocol bootloader and boot manager
  • uACPI: A portable and easy-to-integrate implementation of the ACPI
  • Alpine Package Keeper: Alpine Linux's package management solution and official repositories
  • lwIP: A small independent implementation of the TCP/IP protocol suite
  • dlmalloc: Doug Lea's Memory Allocator, a good all purpose memory allocator that is widely used and ported
  • eyalroz/printf: Tiny, fast(ish), self-contained, fully loaded printf, sprinf etc. implementation
  • G-9: Made the ASCII art for the kernel shell's fetch command

License

This project is licensed under GPL v3 (GNU General Public License v3.0). For more information go to the LICENSE file.

Similar Projects

Discover other similar projects and AI models.

RepositoryC
reactos/reactos

A free Windows-compatible Operating System

18.6k
Nov 28, 2026
RepositoryC
unikraft/unikraft

A next-generation cloud native kernel designed to unlock best-in-class performance, security primitives and efficiency savings.

4.0k
Nov 30, 2026
RepositoryRust
maestro-os/maestro

Lightweight, Linux-compatible kernel, written in Rust to leverage the safety of the typesystem. Aiming to remove as much legacy as possible while supporting most usecases

3.3k
Nov 15, 2026
RepositoryC
Awesome-HarmonyOS/HarmonyOS

A curated list of awesome things related to HarmonyOS. 华为鸿蒙操作系统。

20.0k
Jul 19, 2024
RepositoryC
s-matyukevich/raspberry-pi-os

Learning operating system development using Linux kernel and Raspberry Pi

14.0k
Mar 29, 2024
RepositoryC++
SerenityOS/serenity

The Serenity Operating System 🐞

34.0k
Nov 28, 2026
RepositoryHTML
phil-opp/blog_os

Writing an OS in Rust

17.9k
Oct 28, 2026
RepositoryHTML
phil-opp/blog_os

Writing an OS in Rust

17.9k
Oct 28, 2026
RepositoryC++
skift-org/skift

🥑 A modern delightful operating system (mirror)

3.0k
Jul 8, 2026