migrate website from KeruOS web to its own repo
Deploy website to GitHub Pages / deploy (push) Failing after 3s
Deploy website to GitHub Pages / deploy (push) Failing after 3s
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Toolchain bootstrap — Keru OS</title>
|
||||
<meta name="description" content="Stage 0 in depth: how Keru bootstraps binutils, gcc, and a C library from nothing, and then builds everything else on top.">
|
||||
<link rel="stylesheet" href="assets/css/style.css">
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>ける</text></svg>">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="top" data-nav></nav>
|
||||
|
||||
<header class="pagehead">
|
||||
<p class="crumbs"><a href="index.html">home</a> / <a href="docs.html">docs</a> / toolchain</p>
|
||||
<h1>Toolchain bootstrap</h1>
|
||||
<p>What "from scratch" actually means.</p>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<div class="wrap">
|
||||
<div class="prose">
|
||||
<p>A source distro that seeds its compiler is a lie wearing a costume. Keru's stage 0 builds the toolchain from nothing — the assembler, the compiler, the C library, then a self-hosted toolchain package — before a single package in your system tree is compiled.</p>
|
||||
|
||||
<h3>Why the order matters</h3>
|
||||
<table>
|
||||
<tr><th>Step</th><th>What runs</th><th>Why first</th></tr>
|
||||
<tr><td>1</td><td><code>binutils</code></td><td>as, ld, ar — you can't compile without an assembler and linker.</td></tr>
|
||||
<tr><td>2</td><td>a bare <code>gcc</code></td><td>The C compiler, built against nothing but binutils.</td></tr>
|
||||
<tr><td>3</td><td>your <code>libc</code></td><td>glibc, musl, or uclibc-ng. Everything userspace depends on it.</td></tr>
|
||||
<tr><td>4</td><td>a full <code>gcc</code></td><td>Re-built now that the target libc exists (self-hosting).</td></tr>
|
||||
<tr><td>5</td><td><code>toolchain</code> package</td><td>Freezes the whole toolchain as a kama package for the rest of the build.</td></tr>
|
||||
</table>
|
||||
|
||||
<h3>A bootstrap run</h3>
|
||||
<div class="terminal">
|
||||
<div class="tbar"><span class="dot r"></span><span class="dot y"></span><span class="dot g"></span><span class="t">$ sh scripts/build-root.sh</span></div>
|
||||
<pre><span class="c">[ keru ]</span> stage 0: bootstrap toolchain
|
||||
<span class="c">[ keru ]</span> binutils 2.42 <span class="p">... ok</span>
|
||||
<span class="c">[ keru ]</span> gcc 13.2 (bare) <span class="p">... ok</span>
|
||||
<span class="c">[ keru ]</span> glibc 2.39 <span class="p">... ok</span>
|
||||
<span class="c">[ keru ]</span> gcc 13.2 (self) <span class="p">... ok</span>
|
||||
<span class="c">[ keru ]</span> toolchain → ROOT <span class="k">... ok</span>
|
||||
<span class="c">[ keru ]</span> stage 1: base system</pre>
|
||||
</div>
|
||||
|
||||
<h3>Where it goes wrong</h3>
|
||||
<ul class="features">
|
||||
<li><strong>libc switch.</strong> Bootstrapping against musl or uclibc-ng rearranges the early stages; the exact package set lives with the <a href="libcs.html">libc page</a>. A combo that isn't proven yet gets a warning — never a silent block.</li>
|
||||
<li><strong>Host leakage.</strong> Everything must link against the freshly built chain, not the build host's. The recipes pass explicit <code>--host/--target</code> and <code>CC</code>/<code>CFLAGS</code> so nothing sneaks in.</li>
|
||||
<li><strong>Double-build cost.</strong> gcc is compiled twice by design. That's the price of honesty; it's also a warm-up for the rest of the arch.</li>
|
||||
</ul>
|
||||
|
||||
<div class="callout">This is the line Keru draws: before your base system, a full self-hosting toolchain exists that didn't exist before. After that, the rest is just — as one long build script — more of the same.</div>
|
||||
|
||||
<p><a href="security.html">← Security</a> · <a href="build-pipeline.html">Build pipeline</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer data-footer></footer>
|
||||
|
||||
<noscript><div style="text-align:center;padding:16px">See the <a href="sitemap.html">sitemap</a> for all pages.</div></noscript>
|
||||
|
||||
<script src="assets/js/include.js" data-base="."></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user