SchOS/docs/plan
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz 655c7d8d01 docs: Finch's main is the Finch-written compiler
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015f73FesGZGYPkmDvUcj6QX
2026-10-26 00:38:48 +01:00
..
1.0.md docs: the desktop is Xorg on the framebuffer 2026-10-24 12:06:41 +02:00
alpine.md SCFF: the live root ships compressed, with Xorg and Window Maker 2026-10-24 21:17:31 +02:00
finch.md docs: Finch's main is the Finch-written compiler 2026-10-26 00:38:48 +01:00
foundations.md epoll, eventfd, timerfd, signalfd 2026-10-24 10:59:52 +02:00
gpu.md Linux's own r8169 through LDLS, deep idle, and the GPU plan 2026-10-25 14:26:16 +01:00
hybrid.md include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
README.md docs: Finch, the author's language, for SchOS's own programs 2026-10-25 18:26:05 +01:00
roadmap.md storage: NVMe, so a laptop's SSD is a disk SchOS can boot from 2026-10-22 15:48:11 +02:00
schapi.md freeze: one register for everything half-built, and the corners cleared 2026-09-13 20:28:05 +02:00
wayland.md epoll, eventfd, timerfd, signalfd 2026-10-24 10:59:52 +02:00
xorg.md docs: the desktop is Xorg on the framebuffer 2026-10-24 12:06:41 +02:00

What happens next

Everything in this directory is unbuilt. When a piece of it is finished it leaves — deleted from here, rewritten as a description in ../architecture/. See the rule.

Read 1.0.md first.

It draws a finish line and puts most of the work below on the far side of it. Anything not named there is not being worked on, and the documents in this directory describe more than 1.0 contains.

It also holds the register of unfinished work, which is the one place anything half-built is listed. No new capability starts until that register is empty, and a row leaves it only by being finished or by being deleted from the tree.


The three current decisions

Taken together, because they turn out to need the same foundation.

alpine.md Packages. The root is managed by Alpine's apk: Alpine's binaries run unmodified, and SchOS itself is the apk package schos-base.
xorg.md The desktop. Xorg on the framebuffer with the fbdev and evdev drivers; twm, then Window Maker. Replaces wayland.md for Gate 3.
wayland.md Not being worked on; see xorg.md. The GUI stack becomes Wayland. SchWM and SchDE are deleted — actually gone from the tree, not marked; Schcom survives and changes its wire format.
hybrid.md Built. All four mechanisms exist, the GPU driver runs outside the kernel, it survives being killed, and the display mode can be changed from a process. H4 (USB) was withdrawn rather than left open — USB is the bus peripherals arrive on, not a peripheral.
init.md Built. PID 1 is now a role the kernel refills; the description moved to ../architecture/init.md.

And the one they all wait on:

foundations.md Descriptor passing, shared memory, sockets in the filesystem. The critical path. Item 1 is built — sendmsg/recvmsg with SCM_RIGHTS.

And the one that says which parts of the above are actually being worked on:

1.0.md The finish line. Four gates, and everything else explicitly deferred.

And the one the hybrid mechanisms were built for:

ldls.md Built. The Linux Driver Layer for SchOS: someone else's drivers, in a process, reached through /dev/pci. ping works over 8139too and over e1000. The description moved to ../architecture/ldls.md.
debugger.md Built, all of it, including the network transport. A debugger that observes rather than halts and answers in this kernel's own vocabulary: symbols, a log that outlives the kernel, /dev/dbg, whose, hardware watchpoints, and schdbgd. The description moved to ../architecture/debugging.md.

And one for after 1.0, recorded so the decision is not lost:

finch.md Later. The author's own LLVM language, Finch, for SchOS's applications and tools in place of C. Already self-hosting; the plan is a target, bindings generated from include/uapi/, and the compiler in the image.

Two longer-horizon documents sit behind these: schapi.md, the API layering and the compatibility promise, and roadmap.md, which holds everything still open that is not one of the three above.


The order

Set by 1.0.md, which is the authority. In short:

0. Fix what is already wrong — first

Not a document of its own; it is Gate 0 of 1.0.md, assembled from the What it does not do sections in ../architecture/.

Before any new capability, and the reason is the one that put netdev_selftest() before the TCP/IP stack: a compositor built on a kernel with an unexplained hang and a socket layer that reports success for things it did not do will fail in ways indistinguishable from its own bugs.

1. foundations.md — the critical path

Both the Wayland work and the hybrid work stop here. Descriptor passing and shared memory are the substrate for handing a buffer to a compositor and for handing a device to a driver process. Doing it once for both is the entire reason these are one plan rather than three.

2. init.md — before the desktop, not after — done

A compositor being brought up for the first time crashes constantly, and something that restarts it and says why is worth far more during that work than at the end of it. Built; see ../architecture/init.md.

3. hybrid.md — moved up, and the reason is worth recording

This document used to put the hybrid work after 1.0, deliberately last, on this argument:

designing a userspace driver interface with no driver consuming it produces an interface that is wrong in ways nobody can see

The argument was sound and the conclusion drawn from it was wrong. What forced the change was the driver situation: SchOS cannot write a driver for every device that exists, no project can, and the only route to the hardware support an established OS has is a compatibility layer with the foreign drivers kept outside the kernel. That layer is this plan's mechanisms. It is not optional and it is not late work.

The original argument still holds, and it is answered rather than ignored: SchOS's own drivers are the consumers. vgpud is a real driver, with real requirements, and building the interface against it is what keeps it a general mechanism rather than a hole shaped like something foreign. The compositor is still a demanding consumer — it is no longer the only one available.

Four mechanisms, all built. One eviction done, the second withdrawn with its reasons recorded, and the foreign driver host they were for is ../architecture/ldls.md — built, and carrying packets.

4. wayland.md — with the GPU driver either side of the seam

W1–W3 and a terminal. W4 and W5 are post-1.0. Item 1 of foundations.md — descriptor passing — was the thing it could not start without, and it now exists.


In one sentence

Fix what is broken, build the descriptor-passing and shared-memory substrate, make init survivable, move the drivers out through an interface SchOS's own drivers have to live with first — and put a terminal on the screen.


What this plan does not address

Stated here so it is not mistaken for covered:

  • No IOMMU, so the hybrid work isolates against bugs and not against a hostile driver.
  • No page cache, so foundations.md delivers a memfd and not a general answer to shared file mappings. The general answer is still owed.
  • No garbage collector for descriptors in flight, so an AF_UNIX socket passed over itself and never received leaks. Bounded at thirty-two sockets, and nothing on this plan does it.
  • No dynamic linking, so no Mesa, no accelerated clients, and no third party shipping a .so for anything.
  • A new compatibility surface between PID 1 and PID 2, created by a plan whose own schapi.md §3 spends a section warning about those.
  • The three open networking items — getsockname, routing, and interrupt-driven receive — are untouched by any of this and still open. They are in roadmap.md.