Skip to content

Atlas-Software-Org/Terrakernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

860e1c2 · Jan 5, 2026

History

34 Commits
Nov 23, 2025
Jan 5, 2026
Jan 5, 2026
Dec 8, 2025
Jan 5, 2026
Jan 5, 2026
Jan 5, 2026
Jan 5, 2026
Jan 5, 2026
Jan 5, 2026
Jan 5, 2026
Jan 5, 2026
Jan 5, 2026
Jan 5, 2026
Jan 5, 2026
Nov 14, 2025

Repository files navigation

The Terrakernel Project

Made for Terra

Terrakernel is a hybrid x86_64 kernel.

During the development of TK the kernel will always be on version v1.0-rc1. Terra is the operating system I'm planning to use terrakernel for.

TODO

*: WIP

Initial stuff

  • Port printf implementation
  • Support for some COM1 serial output using port 0x3F8
  • End of initial stuff

x86_64 Specific

  • Write a GDT
  • Write an IDT
  • Write a physical memory manager
  • Write a virtual memory manager
  • Write a heap
  • Write a PIT timer
  • Switch to fully graphical (flanterm) messages and logs
  • Port uACPI
  • (Other) Write a VFS and TMPFS and parse a USTAR Initrd archive
  • Scheduling and multithreading (delayed)
  • Switching to userspace
  • Write some basic syscalls
  • Load x86_64 ELF binaries, static and relocatable (copy from old version of TK) (delayed)
  • End of x86_64 stuff (almost) (delayed)

Other

  • Write a VFS and TMPFS and parse a USTAR Initrd archive
  • Add support for /dev/XYZ files (use O_BUILTIN_DEVICE_FILE in kernel, also requires an additional parameter which is devpath, the path to the device directory, usually for disks, e.g., initrd creates two nodes, /dev/initrd (initrd disk image) and /initrd the directory itself)
  • Write a PCI driver (PCIe as well)
  • Write a PS2 keyboard driver
  • Line discipline
  • Try to write an XHCI driver for USB device support
  • Write some disk drivers, probably AHCI only for now*
  • Some filesystem drivers, probably FAT32 and maybe, maybe, maybe EXT3 or EXT4
  • End of other

Porting software

  • Port binutils and coreutils
  • Port DOOM
  • Port a window manager (window server) (probably Xorg)
  • Port anything else
  • End of porting software
  • End of project... or at least this version...

Building the kernel

Check BUILD_INSTRUCTIONS.md

How many LoC?

     240 text files.
     218 unique files.
       6 files ignored.

github.com/AlDanial/cloc v 1.98  T=0.88 s (246.9 files/s, 93383.6 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                               54           6535           4142          36356
C/C++ Header                   134           3347          11638          15073
C++                             25            973              3           4137
Assembly                         4             24              0            190
CMake                            1              0              0             21
-------------------------------------------------------------------------------
SUM:                           218          10879          15783          55777 (32592 old)
-------------------------------------------------------------------------------