include: one folder per subsystem, and includes that name it

Sixty-five headers sat side by side in include/, so `#include "irq.h"`
said nothing about where irq.h was or what it belonged to, and errno.h,
stat.h and fcntl.h at the top shadowed the system's for any host tool
built with -I./include. They are in folders now -- arch/ core/ fs/
dev/ gfx/ net/ uapi/ (and ldls/ for the Linux driver layer) -- and
every include names the folder, as Linux's do: "core/proc.h".

Done mechanically and checked the hard way: the kernel built from this
tree disassembles identically to the one built from the tree before
it. The full image boots, and userland is the same set of programs.
Paths in docs and comments follow; docs/guides/layout.md has a table
of what is where, and tools/fix-includes.py rewrites old-style
includes from the folders in the tree, for code written before this.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4
This commit is contained in:
Nexoniarz 2026-10-23 15:05:12 +02:00
commit a1c965da1e
267 changed files with 1560 additions and 1440 deletions

View file

@ -30,8 +30,8 @@ a brief for one is not worth carrying until somebody is going to draw it.
## The one constraint everything answers to
**The kernel draws its mark as a 128×128 single-channel coverage mask.**
`include/logo.h` holds no colour at all — two pixels per byte, sixteen levels of
ink — and the kernel composites it in whatever `include/theme.h` says.
`include/gfx/logo.h` holds no colour at all — two pixels per byte, sixteen levels of
ink — and the kernel composites it in whatever `include/gfx/theme.h` says.
So any mark that will end up there has to survive as **a solid shape in one
colour at 128 px, and be recognisable at 24**. That rules out hairlines, thin
@ -64,7 +64,7 @@ the kernel's name (**SchIFT**) as a shape.
## Colour
From `include/theme.h`, which is the source of truth. Nothing here restates a
From `include/gfx/theme.h`, which is the source of truth. Nothing here restates a
value it does not already define.
| | | |
@ -128,7 +128,7 @@ superseded-*.png the old wordmark, kept for reference only
The pipeline is three stages:
```
shift-mask.svg --(inkscape)--> shift-mask.png --(make logo)--> include/logo.h
shift-mask.svg --(inkscape)--> shift-mask.png --(make logo)--> include/gfx/logo.h
```
**Both intermediates are committed, and that is deliberate.** `inkscape` is not
@ -154,7 +154,7 @@ If either is edited, edit both.
| | |
|---|---|
| Loader splash | Shift, from `include/logo.h`, shaded per row by `metal()` in `boot/common/ui.c` — silver, not accent. |
| Loader splash | Shift, from `include/gfx/logo.h`, shaded per row by `metal()` in `boot/common/ui.c` — silver, not accent. |
| Kernel console / early boot | Shift, same mask, composited flat in a theme colour by `gfx_draw_logo`. |
| A display with no compositor | Shift again, drawn by `vgpud` on `SCH_BG`. It replaced a test card — colour bands, gradients, a checkerboard and the driver's pid in binary — which was scaffolding for [../plan/hybrid.md](../plan/hybrid.md)'s H2 and H3 and outlived them. The mark answers the same question a black screen cannot, *something is driving this device*, and answers it as the system rather than as a test rig. |
| PSOGM | Shift, the same mask again, by `gfx_draw_logo()` from `kernel/core/panic.c`. At its native 128 px — there is no resampler in the crash path, and the mark was only ever drawn at one size there anyway. |