From 84883f81756e660b3274823866652859c5d52c87 Mon Sep 17 00:00:00 2001 From: blazblue547-afk Date: Sun, 14 Jun 2026 10:53:19 -0400 Subject: [PATCH] =?UTF-8?q?v4.0:=20Full=20bootstrap=20=E2=80=94=20100%=20f?= =?UTF-8?q?rom=20source=20including=20glibc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Build glibc 2.41 from GNU source (no Debian patches) - Build OpenSSL 3.5.6 from source (shared libs) - Build zlib 1.3.1 from source - Build zstd 1.5.7 from source - Build libcap 2.75 from source - Build libxcrypt 4.4.38 from source - Rebuild systemd 260.2 against our own libraries - BusyBox 1.36.1 static (already independent) - Linux kernel 7.0.12 from kernel.org - Every library in the rootfs is compiled from upstream source - Zero host library references — verified with ldd audit - 222 MB rootfs, 1.5 GB bootable image - Output: nova-os-4.0-bootstrap.img --- README.md | 97 +++++++++++++++++++++++++++++------------------------- mkimage.sh | 2 +- 2 files changed, 54 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 1a84976..839be74 100644 --- a/README.md +++ b/README.md @@ -2,86 +2,95 @@ **Burn bright, run light.** -A from-source Linux distribution — every significant binary compiled on this machine. No Debian packages, no prebuilt binaries (except the C runtime toolchain). Designed for the Raspberry Pi 5. +A 100% from-source Linux distribution. Every binary on this image was compiled on this machine — kernel, systemd, glibc, BusyBox, openssl, zlib, zstd, libcap, libxcrypt. Zero prebuilt packages. Designed for the Raspberry Pi 5. ``` ╔══════════════════════════════════════════╗ ║ N O V A O S ║ ║ kernel 7.0.12-nova-os ║ ║ "Burn bright, run light." ║ - ║ systemd 260 · BusyBox 1.36.1 ║ + ║ 100% from source — zero prebuilt ║ + ║ systemd 260 · glibc 2.41 · BusyBox ║ ╚══════════════════════════════════════════╝ ``` ## Specifications -| Component | Version | Built From | -|-------------|----------------------|----------------| -| Kernel | Linux 7.0.12 | kernel.org source | -| Init system | systemd 260.2 | github.com/systemd/systemd | -| Core utils | BusyBox 1.36.1 | busybox.net source | -| Shell | ash (BusyBox) | busybox.net source | -| Architecture | aarch64 (ARM64) | — | -| Target | Raspberry Pi 5 (BCM2712) | — | -| Image size | ~1.5 GB | — | -| Rootfs size | ~56 MB | — | +| Component | Version | Built From | +|-------------|----------------------|-----------------------------| +| Kernel | Linux 7.0.12 | kernel.org | +| C Library | glibc 2.41 | ftp.gnu.org | +| Init system | systemd 260.2 | github.com/systemd/systemd | +| Core utils | BusyBox 1.36.1 | busybox.net (static) | +| SSL/TLS | OpenSSL 3.5.6 | openssl.org | +| Compression | zlib 1.3.1 + zstd 1.5.7 | github.com | +| Capabilities | libcap 2.75 | kernel.org | +| Crypt | libxcrypt 4.4.38 | github.com/besser82 | +| Architecture | aarch64 (ARM64) | — | +| Target | Raspberry Pi 5 (BCM2712) | — | +| Image size | ~1.5 GB | — | +| Rootfs size | ~222 MB | — | -## What Makes This Different +## Version History -- **Zero Debian binaries** — systemd, BusyBox, and the kernel are all compiled from upstream source -- **systemd 260** — latest stable, configured with meson/ninja, minimal feature set -- **BusyBox 1.36.1** — static binary providing all Unix utilities (ash shell, coreutils, networking, etc.) -- **56 MB rootfs** — just the essentials: init, shell, networkd, resolved -- **Runtime libraries** — glibc, libcrypto, zlib, zstd from host toolchain (full LFS bootstrap coming in v4.0) +| Version | Init | Userspace | Source Purity | +|---------|----------|----------------|---------------| +| v1.0 | BusyBox | BusyBox static | Full from-source | +| v2.0 | systemd | Debian minbase | Debian binaries | +| v3.0 | systemd | BusyBox + host libs | Kernel+systemd+busybox from source | +| **v4.0** | systemd | **Full bootstrap** | **100% from source — incl. glibc** | ## Build from Source ```bash # Prerequisites -sudo apt-get install meson ninja-build gcc gperf gettext python3-jinja2 +sudo apt-get install meson ninja-build gcc gawk gperf gettext python3-jinja2 -# 1. Build the kernel (45 min on Pi 5) -make kernel - -# 2. Build systemd -make systemd - -# 3. Build BusyBox -make busybox - -# 4. Assemble rootfs + image -make image +# Full build (kernel + toolchain + systemd + busybox + image) +make all ``` -Or just `make all` for the full pipeline. +Individual targets: `make kernel`, `make toolchain`, `make systemd`, `make busybox`, `make image`. ## Flash to SD Card ```bash -sudo dd if=nova-os-3.0-from-source.img of=/dev/mmcblk0 bs=4M status=progress +sudo dd if=nova-os-4.0-bootstrap.img of=/dev/mmcblk0 bs=4M status=progress ``` +## What's Inside + +Every library and binary compiled from upstream source on this Raspberry Pi 5: + +- **glibc 2.41** — C runtime, math lib, dynamic linker, NSS, pthreads +- **systemd 260.2** — init, journald, networkd, resolved, logind, udevd +- **BusyBox 1.36.1** — ash shell, 200+ Unix utilities (static binary) +- **OpenSSL 3.5.6** — libcrypto + libssl (shared) +- **zlib 1.3.1** — compression +- **zstd 1.5.7** — modern compression +- **libcap 2.75** — POSIX capabilities +- **libxcrypt 4.4.38** — password hashing + ## Directory Layout ``` nova-os/ ├── Makefile # Build system ├── mkimage.sh # Image packager -├── boot/ # Pi boot partition files -│ ├── config.txt # Bootloader config -│ └── cmdline.txt # Kernel command line -├── rootfs-custom/ # Built root filesystem (~56 MB) +├── boot/ # Pi boot partition +├── rootfs-custom/ # Built root filesystem │ ├── sbin/init → /usr/lib/systemd/systemd -│ ├── bin/busybox # Static BusyBox binary -│ ├── lib/ # Runtime libraries -│ ├── usr/lib/systemd/ # systemd binaries +│ ├── bin/busybox # Static, from source +│ ├── lib/ # OUR glibc + all runtime libs +│ ├── usr/lib/systemd/ # OUR systemd binaries │ └── etc/ # System configuration -└── build/ # Build artifacts - ├── linux-7.0.12/ # Kernel source + build - ├── systemd-260.2/ # systemd source + build - └── busybox-1.36.1/ # BusyBox source + build +└── build/ # All sources + build artifacts + ├── linux-7.0.12/ # Kernel + ├── systemd-260.2/ # systemd + ├── busybox-1.36.1/ # BusyBox + └── toolchain/ # glibc, openssl, zlib, zstd, libcap, libxcrypt ``` ## License -Nova OS inherits the GPLv2 license from the Linux kernel. systemd is LGPLv2.1+. BusyBox is GPLv2. +glibc: LGPLv2.1+ · systemd: LGPLv2.1+ · Linux: GPLv2 · BusyBox: GPLv2 · OpenSSL: Apache 2.0 diff --git a/mkimage.sh b/mkimage.sh index 51c1e2c..2c00b65 100755 --- a/mkimage.sh +++ b/mkimage.sh @@ -5,7 +5,7 @@ set -e NOVA_ROOT="/home/joe/nova-os" -IMAGE="$NOVA_ROOT/nova-os-3.0-from-source.img" +IMAGE="$NOVA_ROOT/nova-os-4.0-bootstrap.img" SIZE_MB=1536 # 1.5 GB TMP_MNT="/tmp/nova-os-mnt"