From 76cd63f5fe33b42d0153c1ebe9a64b73e32495a5 Mon Sep 17 00:00:00 2001 From: KFears Date: Wed, 15 Oct 2025 03:21:49 +0000 Subject: [PATCH] docs: update build instructions and foundation (#38) Reviewed-on: https://git.auxolotl.org/auxolotl/labs/pulls/38 Reviewed-by: vlinkz Co-authored-by: KFears Co-committed-by: KFears --- tidepool/README.md | 22 +++++++++++----------- tidepool/src/packages/README.md | 22 +++++----------------- 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/tidepool/README.md b/tidepool/README.md index ed9831b..a9abdd1 100644 --- a/tidepool/README.md +++ b/tidepool/README.md @@ -35,19 +35,19 @@ in To build a package, you can run the following command inside of the `tidepool` directory: ```console -nix-build -A packages.foundation.bash.latest.packages.x86_64-linux.x86_64-linux.x86_64-linux.package +nix-build -A packages.foundation.bash.latest.packages.x86_64-linux.x86_64-linux.package ``` If you have `nix-command` experimental feature enabled, you can v3 CLI instead: ```console -nix build -f . packages.foundation.bash.latest.packages.x86_64-linux.x86_64-linux.x86_64-linux.package +nix build -f . packages.foundation.bash.latest.packages.x86_64-linux.x86_64-linux.package ``` Using flakes, the difference is only in calling: ```console -nix build .#packages.foundation.bash.latest.packages.x86_64-linux.x86_64-linux.x86_64-linux.package +nix build .#packages.foundation.bash.latest.packages.x86_64-linux.x86_64-linux.package ``` This interface is verbose, but stable. We are still working out the details for @@ -56,44 +56,44 @@ a friendlier interface! The full command syntax looks like this: ```console -nix-build -A packages.${package-set}.${package}.${version}.packages.${build}.${host}.${target}.package +nix-build -A packages.${package-set}.${package}.${version}.packages.${build}.${host}.package ``` Tidepool packages can have multiple versions available. Tidepool also provides aliases for convenience, currently "stable" and "latest". Aliases go directly after `${package}`: ```console -nix-build -A packages.${package-set}.${package}.${alias}.packages.${build}.${host}.${target}.package +nix-build -A packages.${package-set}.${package}.${alias}.packages.${build}.${host}.package ``` The actual available versions live one level deeper, under `versions` namespace: ```console -nix-build -A packages.${package-set}.${package}.versions.${version}.packages.${build}.${host}.${target}.package +nix-build -A packages.${package-set}.${package}.versions.${version}.packages.${build}.${host}.package ``` Here are a few practical examples for Tidepool. We can use a specific Bash version: ```console -nix-build -A packages.foundation.bash.versions."5.2.15-stage1".packages.x86_64-linux.x86_64-linux.x86_64-linux.package +nix-build -A packages.foundation.bash.versions."5.2.15-stage1".packages.x86_64-linux.x86_64-linux.package ``` Get Bash cross-compiled from `i686-linux` to `x86_64-linux`: ```console -nix build .#packages.foundation.bash.latest.packages.i686-linux.x86_64-linux.x86_64-linux.package +nix build .#packages.foundation.bash.latest.packages.i686-linux.x86_64-linux.package ``` Or a native `aarch64-linux` Bash: ```console -nix build .#packages.foundation.bash.latest.packages.aarch64-linux.aarch64-linux.aarch64-linux.package +nix build .#packages.foundation.bash.latest.packages.aarch64-linux.aarch64-linux.package ``` Running this command will: -- Bootstrap `i686-linux` `gcc` as a dependency of `x86_64-linux` `gcc` -- Incrementally bootstrap the actual `x86_64-linux` `gcc` +- Bootstrap `i686-linux` `gcc` using Foundation +- Incrementally bootstrap `x86_64-linux` `gcc` - Incrementally bootstrap `aarch64-linux` `gcc` from `x86_64-linux` `gcc` - Build the native `aarch64-linux` `gcc` - Build the native `aarch64-linux` `bash` diff --git a/tidepool/src/packages/README.md b/tidepool/src/packages/README.md index abf0197..a652ff2 100644 --- a/tidepool/src/packages/README.md +++ b/tidepool/src/packages/README.md @@ -5,8 +5,7 @@ In this folder, the Tidepool package sets are stored. ## Foundation The package set under `foundation` is a minimal set to start building everything -else. It builds upon and uses packages from [Foundation](https://git.auxolotl.org/auxolotl/foundation), -our early bootstrap chain. It provides a comprehensive set of packages that are +else. It provides a comprehensive set of packages that are used to build all other basic Linux utilities, and are often transitive dependencies of higher-level packages. @@ -25,21 +24,10 @@ binaries to point to our dependencies. This "unbreaks" proprietary binaries by making them point to Tidepool-provided dependencies. Neat! -The bootstrap chain is based on [full-source](https://guix.gnu.org/en/blog/2023/the-full-source-bootstrap-building-from-source-all-the-way-down/) -bootstrap, made possible with amazing work by Guix's people, -and Emily Trau's effort on porting it to Nix! -It bootstraps a proper `gcc` for `i686-linux`, which can then -be used to cross-compile a `gcc` for other architectures, such -as `x86_64-linux`. - -To build stage1 (`i686-linux`), run: - -```console -nix build --system i686-linux .#packages.foundation.glibc.versions."2.38-stage1-passthrough".packages.i686-linux.x86_64-linux.x86_64-linux.package -``` - -The full bootstrap chain is available in a confusingly-named -[Foundation repository](https://git.auxolotl.org/auxolotl/foundation). +The `foundation` package set builds upon and uses packages from [Foundation](https://git.auxolotl.org/auxolotl/foundation), +our early bootstrap chain. It augments the packages from Foundation with +Tidepool's cross-compilation capabilities, and adds additional flags +to compilers to better support our use case. ## Aux