The new stage3 tarball builder.
- Rust 100%
|
|
||
|---|---|---|
| .cargo | pin musl target | |
| src | i just made some bullshittt | |
| .gitignore | cargo gitignore | |
| Cargo.lock | lockfile | |
| Cargo.toml | fix some imports or i forgot | |
| LICENSE | license file | |
| README.md | Add README.md | |
terranova
automated stage3 tarball generator for Static Linux. declarative config, no hand-holding.
what it does
reads a stage3.scheme config and runs a full pipeline:
base layout
→ toolchain (neostrap or clang-dist)
→ rust (rustup)
→ packages (ace, prometheus, promectl, superpose, ...)
output is a rootfs ready to tar up and boot.
usage
cargo build --release
./target/x86_64-unknown-linux-musl/release/terranova
builds default to musl static binaries via .cargo/config.toml.
config
stage3.scheme at the repo root drives everything:
(stage3
(base-layout
(dirs "etc" "proc" "sys" "dev" "tmp" "run" "var"
"usr/bin" "usr/lib" "usr/include"
"var/lib/ace/ports" "var/log"
"root" "home"))
(toolchain
(mode "neostrap") ; or "clang-dist"
(neostrap-repo "https://codeberg.org/StaticLinux/neostrap")
(tcc-seed "./tcc-seed")
(clang-dist-url
"https://codeberg.org/StaticLinux/clang-distribution/releases/download/v1.0.0/clang.tar.xz"))
(rust
(enabled #t)
(targets "x86_64-unknown-linux-musl"))
(packages
(pkg (name "ace") (build "ninja") (static #t))
(pkg (name "prometheus") (build "cargo") (target "x86_64-unknown-linux-musl"))
(pkg (name "promectl") (build "cargo") (target "x86_64-unknown-linux-musl") (depends "prometheus"))
(pkg (name "superpose") (build "cargo") (target "x86_64-unknown-linux-musl") (depends "prometheus"))))
toolchain modes
neostrap- full bootstrap from a 400KB tcc seed. takes 4-8 hours. you know what's in your compiler.clang-dist- grabs the Static Linux prebuilt clang tarball (musl-linked). fast, less auditable.
rust toolchain modes
rustup- just a precompiled rustc binary installer Self-hosting the rust compiler is a WIP.
dependencies
scheme-ffi- s-expression config parsinganyhow- error handlingsha2- checksum verification