Go to file
2025-05-22 22:16:46 +03:00
luma Move to git 2025-05-22 22:16:46 +03:00
src Move to git 2025-05-22 22:16:46 +03:00
.gitignore Move to git 2025-05-22 22:16:46 +03:00
elftoexe.py Move to git 2025-05-22 22:16:46 +03:00
elftomod.py Move to git 2025-05-22 22:16:46 +03:00
exe.ld Move to git 2025-05-22 22:16:46 +03:00
Makefile Move to git 2025-05-22 22:16:46 +03:00
mod.ld Move to git 2025-05-22 22:16:46 +03:00
README.md Move to git 2025-05-22 22:16:46 +03:00

Luma

This is a PC operating system mostly for my own learning and enjoyment, but also I like the idea of giving new life to old hardware that is slowly being abandoned by the masses. It has been in development since around 2022.

In order to work in the absence of virtual memory, all software on Luma, including the Luma kernel itself, is forced to be at least relocatable if not position-independent. Because of this Luma, unlike other kernels, does not require to be higher-half.

Luma as a microkernel enforces only a few things, such as process scheduling or hardware access.

Supported hardware:

  1. Minimum 80386+
  2. VGA graphics, using k-means clustering for maximal color depth
  3. Intel High Definition Audio
  4. Universal Host Controller Interface
  5. USB BBB MSD
  6. PS/2 keyboard
  7. Filesystem driver for MeanFS (based on LeanFS)

Note: though the drivers themselves work, they're limited in functionality API-wise and are mostly useless for user-space. Also, the original 80386 processors have too many bugs for Luma to feasibly work on real hardware.

Incomplete list of planned features:

  1. Fix remaining undefined behavior before continuing
  2. Rewrite the window manager to use k3Menu
  3. Create a user interface for audio output
  4. Kernel-level RNG
  5. Support more than 16MB of RAM
  6. Intel GM45 graphics for 2D
  7. Intel GM45 graphics for 3D :)

Building

Simply run make (GNU Make is required).

Building requires an i386-elf-gcc toolchain. Clang does not work for reasons I have not figured out.

Also required is the meanfuse program, which is a MeanFS user-space driver for Linux.

Boot logic

In the interest of minimal RAM usage, Luma uses a custom bootloader (src/boot{0,1}.asm) which first initializes Luma to a valid state before handing off execution. This includes setting up the segments, the bitmap of physical memory, the initial page tables, loading the first kernel modules among other things. Slightly breaking the microkernel abstraction, this also includes setting up Mode X graphics through the 16-bit BIOS, because changing modes manually is painful. After this is done, the bootloader jumps to the Luma scheduler.