Initial commit: DarkForge Linux — Phases 0-12
Complete from-scratch Linux distribution targeting AMD Ryzen 9 9950X3D + NVIDIA RTX 5090 on ASUS ROG CROSSHAIR X870E HERO. Deliverables: - dpack: custom package manager in Rust (3,800 lines) - TOML package parser, dependency resolver, build sandbox - CRUX Pkgfile and Gentoo ebuild converters - Shared library conflict detection - 124 package definitions across 4 repos (core/extra/desktop/gaming) - 34 toolchain bootstrap scripts (LFS 13.0 adapted for Zen 5) - Linux 6.19.8 kernel config (hardware-specific, fully commented) - SysVinit init system with rc.d service scripts - Live ISO builder (UEFI-only, squashfs+xorriso) - Interactive installer (GPT partitioning, EFISTUB boot) - Integration test checklist (docs/TESTING.md) No systemd. No bootloader. No display manager. Kernel boots via EFISTUB → auto-login → dwl Wayland compositor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
56
toolchain/scripts/001-binutils-pass1.sh
Executable file
56
toolchain/scripts/001-binutils-pass1.sh
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
# ============================================================================
|
||||
# DarkForge Linux — Phase 0, Chapter 5: Binutils Pass 1
|
||||
# ============================================================================
|
||||
# Purpose: Build the cross-assembler and cross-linker (binutils) as the
|
||||
# first component of the cross-toolchain. This must be built first
|
||||
# because both GCC and Glibc configure tests depend on it.
|
||||
# Inputs: ${LFS}/sources/binutils-2.46.tar.xz
|
||||
# Outputs: Cross-binutils installed to ${LFS}/tools/
|
||||
# Assumes: Running as 'lfs' user, environment sourced from 000-env-setup.sh
|
||||
# Ref: LFS 13.0 §5.2
|
||||
# ============================================================================
|
||||
|
||||
set -euo pipefail
|
||||
source "${LFS}/sources/darkforge-env.sh"
|
||||
|
||||
PACKAGE="binutils"
|
||||
VERSION="2.46"
|
||||
SRCDIR="${LFS}/sources"
|
||||
|
||||
echo "=== Building ${PACKAGE}-${VERSION} (Cross-Toolchain Pass 1) ==="
|
||||
|
||||
cd "${SRCDIR}"
|
||||
tar -xf "${PACKAGE}-${VERSION}.tar.xz"
|
||||
cd "${PACKAGE}-${VERSION}"
|
||||
|
||||
mkdir -v build
|
||||
cd build
|
||||
|
||||
# Configure for cross-compilation
|
||||
# --target=$LFS_TGT: produce binaries for our target triplet
|
||||
# --prefix=$LFS/tools: install into the temporary toolchain directory
|
||||
# --with-sysroot=$LFS: use $LFS as the sysroot for target libraries
|
||||
# --disable-nls: no internationalization needed for build tools
|
||||
# --enable-gprofng=no: don't build the profiling tool
|
||||
# --disable-werror: don't fail on compiler warnings
|
||||
# --enable-new-dtags: use RUNPATH (modern) instead of RPATH
|
||||
# --enable-default-hash-style=gnu: GNU hash for faster symbol lookup
|
||||
../configure \
|
||||
--prefix="${LFS}/tools" \
|
||||
--with-sysroot="${LFS}" \
|
||||
--target="${LFS_TGT}" \
|
||||
--disable-nls \
|
||||
--enable-gprofng=no \
|
||||
--disable-werror \
|
||||
--enable-new-dtags \
|
||||
--enable-default-hash-style=gnu
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
# Cleanup
|
||||
cd "${SRCDIR}"
|
||||
rm -rf "${PACKAGE}-${VERSION}"
|
||||
|
||||
echo "=== ${PACKAGE}-${VERSION} Pass 1 complete ==="
|
||||
Reference in New Issue
Block a user