recipes: musl 1.2.5 + busybox 1.36.1 pinned (Lote 4, base C del Stage 1)

Las dos piezas C del userland mínimo (SDD 11 §3), estáticas con zig cc cross
a x86_64-linux-musl, sha256 fijado (descargado y verificado, no inventado):

- musl 1.2.5   a9a118bbe84d...  (libc del target: headers + libc.a)
- busybox 1.36.1 b8cc24c9574d... (coreutils + sh + init provisional vía inittab)

busybox: defconfig + CONFIG_STATIC=y, TC desactivado (gcc-ismos incompatibles
con musl); install por CONFIG_PREFIX crea los symlinks de applets para el rootfs.

hammerd queda fuera por ahora: con el soporte Cargo del lab ya es construible,
pero su sourcing (repo pinned + vendor para --offline) es parte del plan M2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sergio
2026-06-11 00:36:39 +00:00
co-authored by Claude Opus 4.8
parent 989e0d2c7f
commit 4221f84ac7
2 changed files with 53 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# busybox 1.36.1 — coreutils + shell + init del userland mínimo del Stage 1 (SDD 11 §3).
#
# Es la "balsa desechable" (ADR 0008): se sustituye por el userland multi-call nativo en
# Rust/Zig más adelante; mientras tanto da `sh`, las utilidades de manipulación de texto que el
# pipeline asume, y su propio `init` (PID 1 provisional, vía /etc/inittab que ensambla Stage 1).
#
# Estático con `zig cc` cross al target: el binario es autocontenido, sin loader del host. El
# `install` de busybox crea los symlinks de applets (sh, mount, init, …) bajo CONFIG_PREFIX, que
# el ensamblado del rootfs hidrata tal cual.
name = "busybox"
version = "1.36.1"
[source]
tarball = "https://busybox.net/downloads/busybox-1.36.1.tar.bz2"
sha256 = "b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314"
[build]
compiler = "zig-cc"
target = "x86_64-linux-musl"
link = "static"
[build.phases]
# busybox usa Kconfig, no autotools: arrancamos de `defconfig` y forzamos CONFIG_STATIC=y. `tc`
# no compila contra musl (gcc-ismos de red), así que lo desactivamos — es el ajuste mínimo
# conocido para un build estático limpio con musl.
configure = "make defconfig && sed -i -e 's/^# CONFIG_STATIC is not set/CONFIG_STATIC=y/' -e 's/^CONFIG_TC=y/# CONFIG_TC is not set/' -e 's/^CONFIG_FEATURE_TC_INGRESS=y/# CONFIG_FEATURE_TC_INGRESS is not set/' .config"
compile = "make -j\"$(nproc)\""
# busybox instala en CONFIG_PREFIX (no DESTDIR): bin/busybox + symlinks de cada applet.
install = "make CONFIG_PREFIX=/out install"
+23
View File
@@ -0,0 +1,23 @@
# musl libc 1.2.5 — libc del target para el userland mínimo del Stage 1 (SDD 11 §3).
#
# Se compila estática con `zig cc` cross al target. El artefacto aporta headers + libc.a (y el
# loader, para uso dinámico futuro) al rootfs sellado. Tarball release pinned por sha256: igual de
# fuerte que un commit git para reproducibilidad (ADR 0006).
name = "musl"
version = "1.2.5"
[source]
tarball = "https://musl.libc.org/releases/musl-1.2.5.tar.gz"
sha256 = "a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4"
[build]
compiler = "zig-cc"
target = "x86_64-linux-musl"
link = "static"
[build.phases]
# El sandbox exporta CC="zig cc", DESTDIR=/out y PREFIX=/usr. musl trae su propio `configure`.
configure = "./configure --prefix=/usr --disable-shared --enable-static"
compile = "make -j\"$(nproc)\""
install = "make install"