From 4afaebf7390379c1b481c8f225f9457c3e43693f Mon Sep 17 00:00:00 2001 From: Nexoniarz Date: Sat, 24 Oct 2026 12:06:41 +0200 Subject: [PATCH] docs: the desktop is Xorg on the framebuffer xorg.md replaces wayland.md as Gate 3's plan: what is built, and the ports left in order. 1.0.md's foundations row is brought up to date. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01S1giNvrHTrPMPw7V6x1kQ4 --- docs/plan/1.0.md | 6 ++++-- docs/plan/README.md | 3 ++- docs/plan/xorg.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 docs/plan/xorg.md diff --git a/docs/plan/1.0.md b/docs/plan/1.0.md index 0936c68..ccd09b7 100644 --- a/docs/plan/1.0.md +++ b/docs/plan/1.0.md @@ -93,7 +93,7 @@ The galling ones. The work exists, is tested, and nothing uses it. | | Where it stopped | |---|---| -| **`foundations.md`** | Item 1 built. Items 2 (a shareable memory object), 3 (`AF_UNIX` in the filesystem namespace), 4 and 5 open. **Wayland stops at item 2.** | +| **`foundations.md`** | All but item 4 (`setsockopt`) built: descriptor passing, `memfd`, filesystem-named `AF_UNIX`, dynamic linking, and epoll/eventfd/timerfd/signalfd. | | ~~**`hybrid.md`**~~ | **Closed.** All four mechanisms built; H1, H2 and H3 done. H4 — the USB eviction — is *withdrawn* rather than outstanding: USB is the bus peripherals arrive on, not a peripheral, and an eviction that has to leave an identical driver behind has moved nothing. See [hybrid.md](hybrid.md), "Decided: USB stays in the kernel". | | ~~**`ldls.md`**~~ | **Closed.** L0 through L4 built: the loader handles 2,440 stock modules, and both `8139too` and Linux's `e1000` run in a SchOS process through `/dev/pci` with `ping` working over each. The e1000 run is a handover — the kernel was driving that NIC and gave it up. Described in [../architecture/ldls.md](../architecture/ldls.md). Two drivers, one kernel version, one machine. | | **Schcom v0** | 715 lines that composite, over a wire format that is superseded. Frozen: it runs, nothing more is added, and it is kept only because it is the one thing in the tree that has ever put a client's pixels on screen. | @@ -497,7 +497,9 @@ plan document it replaced has been deleted, per ### Gate 3 — The desktop -[wayland.md](wayland.md), W1–W3, and the terminal. +[xorg.md](xorg.md): Xorg on the framebuffer, twm and xterm, then Window +Maker. Wayland ([wayland.md](wayland.md)) is not being worked on -- what it +needs, DRM/KMS above all, is far larger than what X needs. **W4 and W5 are not in 1.0.** Multi-window focus policy and a panel are post-1.0. One terminal window that works is the bar. diff --git a/docs/plan/README.md b/docs/plan/README.md index f82105d..8a4ecd0 100644 --- a/docs/plan/README.md +++ b/docs/plan/README.md @@ -23,7 +23,8 @@ Taken together, because they turn out to need the same foundation. | | | |---|---| -| **[wayland.md](wayland.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. | +| **[xorg.md](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](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](../architecture/init.md). | diff --git a/docs/plan/xorg.md b/docs/plan/xorg.md new file mode 100644 index 0000000..db5d4e5 --- /dev/null +++ b/docs/plan/xorg.md @@ -0,0 +1,44 @@ +# Xorg + +The desktop is X11, on the framebuffer. This replaces [wayland.md](wayland.md) +as the plan for Gate 3 of [1.0.md](1.0.md); Wayland stays on file and is not +being worked on. + +## Why X and not Wayland + +Every Wayland compositor worth running -- labwc, and everything else built on +wlroots -- needs DRM/KMS, libinput, udev and libseat. DRM/KMS is the largest of +them by far: a kernel graphics subsystem, and in practice a great deal taken +from Linux. Xorg runs on a plain framebuffer through its `fbdev` driver and +reads input through `evdev`, both of which are interfaces SchOS already has. +It is the shorter road to a desktop by a long way, and it brings the window +managers with it: twm first, then Window Maker. + +DRM/KMS is not planned. libinput, udev and libseat are worth having for their +own sake and may come later; Xorg does not need them. + +## What is built + +- **The kernel calls** (`b1323e1`, checked by `cmd/xready`): evdev's queries, + fbdev's mode-set to the current mode, `KDSETMODE`, `KDSKBMODE`, the + `VT_PROCESS` switch handshake, and `/sys/bus/pci/devices/*/{boot_vga, + enable,graphics/fb0}` for libpciaccess. +- **Dynamic linking and `dlopen`** (`4330576`): Xorg loads its drivers as + modules. +- **``** in the build sysroot, as `ports/linux-headers`. + +## What is left, in order + +1. **The X client libraries.** xorgproto, xtrans, libXau, libXdmcp, + xcb-proto, libxcb, libX11, libXext, libXrender, libXfixes, libxkbfile, + libfontenc, libXfont2, freetype, zlib, pixman, libpciaccess. +2. **Keyboard and fonts.** xkbcomp and xkeyboard-config, the data X compiles + keymaps from; a misc-fixed font. +3. **The server.** xorg-server built with meson, GLX, glamor and DRI off; + xf86-video-fbdev; xf86-input-evdev with libevdev and mtdev. +4. **The first picture.** `twm` and `xterm`, started by hand from a VT. +5. **Window Maker**, and an `startx` that works. + +The kernel calls were written against what these programs are documented +to do. Each step past it is expected to find a call that was not -- that is +what running the real program is for.