Hobby kernel + userspace, built mostly from scratch. Composited GUI, dynamically linked ELF binaries, networking, Python applications, and more. https://toaruos.org/

K. Lange fc1837958c Missed some fill-in-the-blanks 3 years ago
apps a69da36fe3 About dialog 3 years ago
base a69da36fe3 About dialog 3 years ago
boot 51121d00fb When debug is enabled at boot, enable logtoserial=3 3 years ago
kernel abafa47204 Remove erroneously added kernel/symbols.S 3 years ago
lib 3552b72cdc Remove guassian blur (third-party code) 3 years ago
libc 3b69421dfe fix implicity def for memcpy in qsort 3 years ago
linker 1355502e6c Reorganize headers 3 years ago
modules 528360486a Detect obscure GeForce as a bochs (this is v86) 3 years ago
util 003dbca449 When auto-dep changes, rebuild everything that uses it 3 years ago
.gitignore a8e1820be7 Integrate auto-dep into build system through make file generation 3 years ago
LICENSE fc1837958c Missed some fill-in-the-blanks 3 years ago
Makefile 168308cead Enable plan9 extensions (anonymous struct members...) 3 years ago
README.md fe71cc89f8 README updates 3 years ago

README.md

ToaruOS-NIH

screenshot

ToaruOS-NIH is a distribution of ToaruOS which contains no third-party components. Its bootloader, kernel, modules, C library, and userspace applications are all written by the ToaruOS development team and direct contributors.

This distribution aims to eventually replace the core of the mainline ToaruOS, with the various third-party components building against our own C library. This is a long-term project.

The bootloader is a simple El Torito "no-emulation" CD bootloader. It is not guaranteed to work on real hardware, but has been tested in QEMU, Bochs, and VirtualBox.

The userspace includes a work-in-progress C standard library, the ToaruOS native libraries, the compositor (using only in-house graphics routines), and various other first-party utilities and applications.

Building

First, ensure you have the necessary build tools, which are mostly the same as mainline ToaruOS: yasm, xorriso, genext2fs (with Debian patches), python.

Run make and you will be prompted to build a toolchain. Reply y and allow the toolchain to build.

Rationale

ToaruOS's kernel is entirely in-house. Its userspace, however, is built on several third-party libraries and tools, such as the Newlib C library, Freetype, Cairo, libpng, and most notably Python. While the decision to build ToaruOS on these technologies is not at all considered a mistake, the possibility remains to build a userspace entirely from scratch.

Goals

  • Write a basic C library.

To support building the native ToaruOS libraries and port some basic software, a rudimentary C library is required.

  • Remove Cairo as a dependency for the compositor.

Cairo is a major component of the modern ToaruOS compositor, but is the only significant third-party dependency. This makes the compositor, which is a key part of what makes ToaruOS "ToaruOS", an important inclusion in this project. Very basic work has been done to allow the compositor to build and run without Cairo, but it is a naïve approach and remains very slow. Implementing Cairo's clipping and SSE-accelerated blitting operations is a must.

  • Write a vector font library.

Support for TrueType/OpenType TBD, but vector fonts are critical to the visual presentation of ToaruOS.

  • Support a compressed image format.

ToaruOS used a lot of PNGs, but maybe writing our own format would be fun.

Roadmap

  1. Enough C to port the dynamic loader. (Done)

  2. Get the VGA terminal building. (Done)

  3. Get the shell running. (Done)

  4. De-Cairo-tize the compositor. (Done, but more work planned)

  5. Enough C to port Python. (In progress)

  6. Enough C to port GCC. (In progress)

Project Layout

  • apps - Userspace applications, all first-party.
  • base - Ramdisk root filesystem staging directory. Includes C headers in base/usr/include, as well as graphical resources for the compositor and window decorator.
  • boot - Bootloader.
  • kernel - The ToaruOS kernel.
  • lib - Userspace libraries.
  • libc - C standard library implementation.
  • linker - Userspace dynamic linker/loader, implements shared library support.
  • modules - Kernel modules/drivers.
  • util - Utility scripts, staging directory for the toolchain (binutils/gcc).