A reading series that traces the history of computing back through chickens and eggs
The Linux kernel is compiled by gcc / clang running on Linux. So what compiled the first Linux? To answer that chicken-and-egg riddle, we trace the history of C and UNIX backwards, down to the very first Unix and finally to the "first byte." Every piece of software was made by software that came before it ── so what lies at the very bottom of that chain?
Watchword: which came first, the chicken or the egg? ── The first egg was carved by hand.
Today's compilers were compiled by their own past selves (self-hosting). So when did the loop begin? The first Linux (1991) was born from gcc running on MINIX. From here, the big picture of the staircase we are about to descend.gcc ← gcc ← gcc ← ?
"Lineage (inheriting code)" and "reimplementation (inheriting ideas)" are different trees. Linux is not MINIX's child; it merely borrowed MINIX's delivery room to grow up. The Tanenbaum–Torvalds debate.genes ≠ ideas
v0.01 couldn't be compiled without MINIX. Torvalds ported gcc and bash to MINIX. With v0.11, Linux compiled Linux for the first time and stood on its own.v0.01 → v0.11 (self-standing)
A C compiler is written in C. At first it's lifted just once by the machine's existing cc; after that it builds itself. The three-stage bootstrap: stage1→stage2→stage3.verify with stage2 == stage3
The native compiler of MINIX (1987) was Tanenbaum's ACK. It gains portability by inserting an intermediate bytecode called EM. In later years, MINIX 3 drifted toward the NetBSD side.front end → EM → back end
Ritchie went from B to C, rewriting the compiler in C bit by bit, until he had "grown" the C compiler to the point where it could compile itself. The origin of self-hosting.B → NB → C
B is a child of BCPL. BCPL has O-code, ACK has EM ── insert "intermediate code" and, when the machine changes, you only need to rewrite the back end. The invention of portability and bootstrapping.BCPL → O-code → machine
In 1969, Thompson wrote the first Unix in PDP-7 assembly. C did not yet exist. Kernel, shell, and editor alike, all in a language close to machine code.PDP-7 assembly
At first they assembled it with a cross-assembler on a different machine (GE-635/GECOS), punched the result as holes into paper tape, and physically carried it to the PDP-7. Eventually it became self-hosting.another machine → paper tape → PDP-7
The very, very beginning, before there was even an assembler. A human reads the instruction table, works out the machine-code numbers by hand (hand assembly), and enters them one word at a time with toggle switches. That is the bootstrap loader.hand → switches → memory
What turns machine code into "meaning" is the instruction decoder, wired out of logic gates. That too was designed by a human. At the very bottom of the software chain lies wired-up physics.instruction → logic gates → physics
Thompson's 1984 Turing Award lecture. A Trojan that survives hidden in the compiler binary even after you erase the source. The ultimate question of whether we can trust the "hand-carved seed" at all.source ≠ trust
The modern answer to Trusting Trust. GNU Mes / stage0 are attempts to shrink the "first seed" you must trust down to a few hundred bytes of human-readable binary. A handshake with ①.seed → entire toolchain
On a brand-new CPU, nothing runs yet (there is no chicken). Baking an egg for that CPU on a different machine is cross-compilation. The modern version of Episode 8's paper-tape carrying.host ≠ target
The courtroom battle over code lineage (AT&T vs BSD), System V, and POSIX, which pinned down "Unix-ness" in a specification. A deep dive into Episode 1's "two trees."ownership of genes
Stallman's motivation for writing gcc and bash. If the toolchain isn't free, you can't sow your own seed. Linux could start up with gcc precisely because this reimplementation existed.free toolchain
The uppermost source of the lineage. Thompson and Ritchie, having stepped away from the huge and ambitious Multics, built the small and simple Unix. The wellspring of the design philosophy that "small is right."big → small