SchOS/.claude/memory/schunix-licensing.md
Nexoniarz 57aff40228 docs: four directories, and a rule for when a thing leaves the roadmap
docs/ was ten files where a plan, a description, a guide and a bug report all
sat next to each other. It is now architecture/ (what SchOS is), plan/ (what it
will be), guides/ (how to work on it) and history/ (why it is like this), with
an index that states the one rule holding it together: when something is
finished it moves from plan/ to architecture/ and is rewritten as a description
of the thing rather than a record of building it.

A ticked checkbox says the work happened. It does not say what the work
*produced*, and six months later the checkbox is all that is left. The network
stack proved the point: finished, verified end to end, and for a month the only
description of it anywhere was a checkbox four levels of indentation deep.

So roadmap.md went from 534 lines to 181 -- nothing deleted, the done work
graduated. Seven subsystems that were finished and undescribed now have
descriptions: boot, kernel, syscalls, filesystem, networking, graphics, usb,
init. Every one ends with "What it does not do", which is the section that pays;
a document listing only strengths is marketing, and the reader who needs it most
is the one about to trip over a limitation nobody wrote down.

schfs.md still opened with "phases 1 through 3 1/2 are done, phase 4 is next"
long after all five had landed. It is a description now, with the phase record
and the hard-won bugs moved to history/.

Three corrections found on the way, all load-bearing:

  * projects/schcom/README.md claimed SCM_RIGHTS was done. There is no
    sendmsg/recvmsg in the kernel at all, and an entire GUI plan rested on it.
  * The root README said "No TCP/IP" months after the stack landed.
  * history/kernel.md sec.7 was marked "in progress" on a problem that process
    groups solved.

Also adds plan/1.0.md, which draws a finish line so the open list stops being
infinite, and marks schwm/ and schde/ superseded: in Wayland the compositor is
the window manager, so that split dissolves rather than being abandoned.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VQ7Qx8E1q1M1bbCq8QLHS2
2026-09-12 17:13:35 +02:00

68 lines
3.6 KiB
Markdown

---
name: schunix-licensing
description: "Schunix is Apache-2.0, copyright Nexoniarz; BSD drivers yes, Linux no, and ports/ licences bind regardless"
metadata:
node_type: memory
type: project
originSessionId: a665e14b-86bd-4b41-a228-51377f3e9225
modified: 2026-08-08T16:18:39.569Z
---
**`LICENSE` is Apache-2.0**, copyright *Nexoniarz* (not "Schunix Contributors" —
one author, and a fictional collective makes future re-licensing harder).
Chosen over MIT/BSD for the express patent grant.
**Settled, do not reopen:** the "Apache-2.0 but shared-source" question was
discussed at length in 2026-08 and **on 2026-08-08 Nexoniarz asked for it to be
dropped from the docs entirely** — `docs/licensing.md` is about licensing, not
about that debate. All references are gone from `docs/`, `LICENSE` and `NOTICE`;
don't reintroduce them. The substance that survives, in one line inside §1:
Apache-2.0 §2 is an irrevocable grant, so a restriction stated anywhere else
does not narrow it, and restricting distribution would be a licence change
(bespoke proprietary, or BUSL-1.1) rather than a wording change.
The decision that actually mattered to them is **when to publish**, not the
licence; the standing rule is still never ([[nexoniarz-sharing-preference]]).
**Binding regardless of what they pick:**
- The kernel derives from xv6 (MIT). `LICENSE.MIT` was *missing* — it was
referenced as `bk/LICENSE.MIT` and lost in the `bk/` → `kernel/` migration.
Recreated; must not be deleted.
- `ports/` is other people's code, redistributed in every image: musl (MIT),
toybox (0BSD), mksh (MirOS). `NOTICE` carries the attribution musl and mksh
require. Patches under `ports/*/patches/` inherit *their* licences.
New first-party files carry `// SPDX-License-Identifier: Apache-2.0`.
**Drivers: BSD yes, Linux no** (asked 2026-08-04, "for drivers we can try get
it from like Linux?"). Linux is GPL-2.0-**only**, and Apache-2.0's patent and
indemnity clauses are "further restrictions" under GPLv2 §6 — the two cannot
be combined and redistributed. Using a Linux driver means relicensing all of
Schunix to GPLv2 and dropping Apache-2.0; you cannot keep both. FreeBSD /
NetBSD / OpenBSD are BSD-2/3-clause and **are** compatible: keep the notice,
add to `NOTICE`, done. Reading Linux to understand hardware is fine;
translating a driver function-by-function produces a derivative work whatever
the identifiers say. Best source of all is the public specification — xHCI,
virtio, AHCI, NVMe, e1000 — which carries no licence on what you write from
it. Recorded in `docs/plan/roadmap.md` §1. See [[schunix-roadmap-and-projects]].
## fs.c is third-party, and was unattributed until 2026-08-09
`kernel/fs/fs.c` (and parts of `tools/mkfs.c`) derive from **"New File System
For XV6"** by Qi Ma, Leyi Pan, Ao Sun and Peiran Xu -- **MIT License**. Nexoniarz
mentioned the provenance in passing; the tree had **no attribution at all**,
only a comment crediting xv6. That was a live compliance gap, since MIT requires
the notice be retained in substantial portions.
Their work is what the HTree directory index (`BKDRHash`, `HASHRANGE`,
`OVERFLOW_DIR_START`), the Ext4-style extents (`T_EXTENT`), the inode bitmap and
`divesymlink` all are. Now credited in `NOTICE` and in fs.c's header.
**The obligation does not go away when fs.c does.** It attaches to every copy
already made, so the NOTICE entry stays even after the SchFS migration deletes
the file.
**The general lesson:** ask where code came from before assuming it is
first-party. "It is in our tree and looks like xv6" was wrong here, and the only
reason it surfaced was an offhand remark.