KDOS from Scratch
This book gives the commands. It shows how KDOS is built from source, phase by phase and package by package, and how a running KDOS machine is looked after, one task at a time. It is the second of KDOS’s two books. The KDOS book explains what each part of the system is and why it was chosen. Where the two books cover the same ground, this one links to the other rather than repeating it.
Where to start depends on what you are doing:
- Running or administering a KDOS machine. Go straight to Part XVI, System administration. Its chapters are self-contained tasks: services, boot, storage, security, networking, hardware, packages, the desktop and troubleshooting.
- Building KDOS yourself. Read the front matter first, then Parts I to XV in order. Each part is one stage of the build, from preparing the host to writing the ISO.
- Looking up one package. From Part V to Part XIV, each phase’s part has a chapter for each shelf, the subject directory a package is filed under. The bootstrap packages of Part III, such as musl libc, Bash, GCC and kpkg, each have a chapter of their own. A package’s page or card gives its version, sources, dependencies, patches, how it is built and installed, and what it installs. Reading a package page explains the layout.
- Looking something up. Part XVII, Appendices holds the reference material: the canonical build shapes, a glossary of build flags, build times, licences and a glossary of terms.
Edition. The book always matches the source tree it was rendered from. The edition line on its title page names the KDOS version, the edition, the commit and that commit’s date:
- a commit carrying a
v*release tag renders as the release edition of that tag; - any other commit renders as the development edition;
- setting
KDOS_EDITIONwhen rendering names the edition outright.
The book published on kdos.dev is rendered from main, so it is the development edition. Every KDOS release carries the PDF and HTML of its own commit, the edition that matches the system it ships.
How it is made. The narrative chapters are written by hand under docs/kfs/. The package pages are not: make book generates each one from its recipe every time the book is rendered, so a package page cannot describe a recipe other than the one in the tree. Sizes, build times and installed contents come from a snapshot of a built tree kept under docs/kfs/data/, which make book-data refreshes after a build.
Contents
Every part, chapter and package page is linked from the Contents page.
See also
- The KDOS book: the authority on how KDOS works
- How KDOS is built: the build told once, end to end
- Writing ports: the recipe format every package page is generated from