updated btc-quickstart.md
This commit is contained in:
parent
539c4383de
commit
ab2ee63a00
|
|
@ -1,97 +1,27 @@
|
|||
BTC (Build Tool Chain) v0.1.4 Quickstart
|
||||
# BTC (Build Tool Chain) Quickstart: 0.3.1
|
||||
|
||||
This guide outlines the integration of the BTC 0.1.4 Sovereign Final toolchain into high-performance, source-based, and embedded Linux distributions. By utilizing prebuilt, LTO-optimized binaries, you bypass standard bootstrap phases, significantly accelerating system rebuilds on Xeon-based "swarm" nodes.
|
||||
1. Prerequisites & Environment
|
||||
This guide outlines the integration of the BTC 0.3.1 Sovereign Forge into your swarm environment.
|
||||
|
||||
Before deployment, ensure the following requirements are met:
|
||||
## 1. Prerequisites
|
||||
* **Environment:** A standard Linux host (Debian/Arch/Fedora) capable of running native `gcc`.
|
||||
* **Permissions:** Root (EUID 0) is required for `ramfs` mounting and hardware-level forensic stamping.
|
||||
* **Storage:** Ensure `/opt/BTC` is available as a persistent storage container for logs, release archives, and cached source tarballs.
|
||||
|
||||
Directory Requirements: All BTC artifacts, build caches, and logs must be stored in /opt/BTC. The build engine expects this directory for persistent state and audit trails.
|
||||
## 2. The Forge Pipeline
|
||||
The forge executes in four distinct phases:
|
||||
|
||||
Dependencies: Ensure installwatch, pv, and setfattr are installed on the host system.
|
||||
1. **Probe:** Silicon topology is scanned, and thread counts are optimized for the available RAM (preventing LTO thrashing).
|
||||
2. **Setup:** A volatile cleanroom (`ramfs`) is provisioned.
|
||||
3. **Forge:** Core components (Binutils, Kernel Headers, GCC Pass 1, Glibc, Libxcrypt, GCC Pass 2, Kernel) are built sequentially.
|
||||
4. **Package:** The resulting toolchain is compressed into a "Golden Image" tarball for deployment.
|
||||
|
||||
Privileges: The build script requires root (EUID 0) for filesystem mounting (ramfs) and forensic stamping.
|
||||
### Basic Execution
|
||||
```bash
|
||||
# Standard Build (Baseline Profile)
|
||||
sudo ./BTC-0.3.1.sh base
|
||||
|
||||
2. Toolchain Deployment
|
||||
# Hardened Build (Ghost Profile - No modules, restricted debugging)
|
||||
sudo ./BTC-0.3.1.sh ghost
|
||||
|
||||
The 0.1.4 release automates silicon interrogation to optimize for Haswell-EP/Broadwell-HS architectures.
|
||||
|
||||
Execute the Forge:
|
||||
Bash
|
||||
|
||||
sudo ./BTC-0.1.4.sh
|
||||
|
||||
Verify Artifacts: Upon completion, your sovereign toolchain tarball will be committed to:
|
||||
/opt/BTC/completed/dcosnet-baseline-*.tar.xz
|
||||
|
||||
Global Integration: Extract the artifact to your preferred toolchain path:
|
||||
Bash
|
||||
|
||||
mkdir -p /opt/cross
|
||||
tar -xJf /opt/BTC/completed/dcosnet-baseline-*.tar.xz -C /opt/cross
|
||||
|
||||
3. Distribution Integration Guides
|
||||
SourceMage GNU/Linux
|
||||
|
||||
Configure Sorcery: Update /etc/sorcery/local/config to point to the new toolchain architecture paths.
|
||||
|
||||
Redirect GCC: Ensure system symlinks point to the DCOSNET labeled compiler in /opt/cross/bin/.
|
||||
|
||||
Rebuild:
|
||||
Bash
|
||||
|
||||
cast -c -r system
|
||||
|
||||
(-c: Clean/bypass cache, -r: Rebuild core set)
|
||||
|
||||
Lunar Linux
|
||||
|
||||
Pathing: Prepend the BTC /bin directory to your $PATH in /etc/lunar/local/config.
|
||||
|
||||
Hardening: Use Lunar's tool customization to enforce parameter locks for the sovereign compiler.
|
||||
|
||||
Rebuild:
|
||||
Bash
|
||||
|
||||
linit -f
|
||||
|
||||
Gentoo Linux
|
||||
|
||||
Portage Override: Inject the path into /etc/portage/make.conf:
|
||||
Bash
|
||||
|
||||
PATH="/opt/cross/bin:${PATH}"
|
||||
|
||||
Optimize: Align your profile for AVX2 and LTO optimizations.
|
||||
|
||||
Rebuild:
|
||||
Bash
|
||||
|
||||
emerge -ev @world
|
||||
|
||||
(-e: Empty-tree rebuild, -v: Verbose output)
|
||||
|
||||
OpenWrt (Embedded)
|
||||
|
||||
Run: make menuconfig
|
||||
|
||||
Configuration Path: Navigate to Advanced configuration options -> Toolchain Options.
|
||||
|
||||
Enable Use external toolchain.
|
||||
|
||||
Set path to /opt/cross.
|
||||
|
||||
Set prefix to x86_64-dcosnet-linux-gnu-.
|
||||
|
||||
Deploy:
|
||||
Bash
|
||||
|
||||
make clean && make world
|
||||
|
||||
4. Quick Reference Matrix
|
||||
Distribution Rebuild Command Integration Method
|
||||
SourceMage cast -c -r system Sorcery architecture config
|
||||
Lunar Linux linit -f Global $PATH override
|
||||
Gentoo emerge -ev @world make.conf pathing
|
||||
OpenWrt make world menuconfig External Toolchain
|
||||
|
||||
Note on Forensic Auditing: All binaries produced by this toolchain are stamped with an immutable ELF note (.note.BTC) and extended filesystem attributes. You can verify the integrity of your swarm nodes using readelf -n <binary> or getfattr -d <binary>.
|
||||
# Deployment Build (Targeting a specific disk device)
|
||||
sudo ./BTC-0.3.1.sh ghost /dev/sda3
|
||||
Loading…
Reference in New Issue