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:
89
toolchain/scripts/000a-download-sources.sh
Executable file
89
toolchain/scripts/000a-download-sources.sh
Executable file
@@ -0,0 +1,89 @@
|
||||
#!/bin/bash
|
||||
# ============================================================================
|
||||
# DarkForge Linux — Phase 0: Download Source Tarballs
|
||||
# ============================================================================
|
||||
# Purpose: Download all source tarballs needed for the toolchain bootstrap.
|
||||
# Inputs: LFS environment variable (path to target partition)
|
||||
# Outputs: Source tarballs in ${LFS}/sources/
|
||||
# Assumes: Internet access, wget or curl available
|
||||
# ============================================================================
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
LFS="${LFS:-/mnt/darkforge}"
|
||||
SRCDIR="${LFS}/sources"
|
||||
|
||||
mkdir -p "${SRCDIR}"
|
||||
cd "${SRCDIR}"
|
||||
|
||||
echo "=== DarkForge: Downloading source tarballs ==="
|
||||
|
||||
# --- Helper function ----------------------------------------------------------
|
||||
download() {
|
||||
local url="$1"
|
||||
local filename
|
||||
filename=$(basename "${url}")
|
||||
|
||||
if [ -f "${filename}" ]; then
|
||||
echo " [SKIP] ${filename} already exists"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo " [GET] ${filename}"
|
||||
wget --no-verbose --continue "${url}" -O "${filename}" || {
|
||||
echo " [FAIL] ${filename} — trying curl fallback"
|
||||
curl -fLo "${filename}" "${url}" || {
|
||||
echo " [ERROR] Failed to download ${filename}"
|
||||
return 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# --- Cross-Toolchain (Chapter 5) ---------------------------------------------
|
||||
echo ">>> Cross-Toolchain packages..."
|
||||
download "https://ftp.gnu.org/gnu/binutils/binutils-2.46.tar.xz"
|
||||
download "https://ftp.gnu.org/pub/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/glibc/glibc-2.43.tar.xz"
|
||||
download "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.19.8.tar.xz"
|
||||
download "https://www.mpfr.org/mpfr-current/mpfr-4.2.2.tar.xz"
|
||||
download "https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz"
|
||||
|
||||
# --- Temporary Tools (Chapter 6) ---------------------------------------------
|
||||
echo ">>> Temporary tools packages..."
|
||||
download "https://ftp.gnu.org/gnu/m4/m4-1.4.20.tar.xz"
|
||||
download "https://invisible-island.net/datafiles/release/ncurses-6.5.tar.gz"
|
||||
download "https://ftp.gnu.org/gnu/bash/bash-5.3.tar.gz"
|
||||
download "https://ftp.gnu.org/gnu/coreutils/coreutils-9.6.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/diffutils/diffutils-3.10.tar.xz"
|
||||
download "https://astron.com/pub/file/file-5.47.tar.gz"
|
||||
download "https://ftp.gnu.org/gnu/findutils/findutils-4.10.0.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/gawk/gawk-5.4.0.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/grep/grep-3.14.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/gzip/gzip-1.14.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz"
|
||||
download "https://ftp.gnu.org/gnu/patch/patch-2.8.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/sed/sed-4.9.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/tar/tar-1.35.tar.xz"
|
||||
download "https://github.com/tukaani-project/xz/releases/download/v5.8.1/xz-5.8.1.tar.gz"
|
||||
download "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
|
||||
|
||||
# --- Chroot Packages (Chapter 7) ---------------------------------------------
|
||||
echo ">>> Chroot packages..."
|
||||
download "https://ftp.gnu.org/gnu/gettext/gettext-0.23.1.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.xz"
|
||||
download "https://www.cpan.org/src/5.0/perl-5.40.2.tar.xz"
|
||||
download "https://www.python.org/ftp/python/3.13.3/Python-3.13.3.tar.xz"
|
||||
download "https://ftp.gnu.org/gnu/texinfo/texinfo-7.3.tar.xz"
|
||||
download "https://zlib.net/zlib-1.3.1.tar.xz"
|
||||
download "https://github.com/util-linux/util-linux/releases/download/v2.40.4/util-linux-2.40.4.tar.xz"
|
||||
|
||||
# --- Patches ------------------------------------------------------------------
|
||||
echo ">>> Patches..."
|
||||
download "https://www.linuxfromscratch.org/patches/lfs/13.0/glibc-2.43-fhs-1.patch"
|
||||
|
||||
echo ""
|
||||
echo "=== All downloads complete ==="
|
||||
echo "Source tarballs are in: ${SRCDIR}/"
|
||||
ls -lh "${SRCDIR}/" | tail -n +2 | wc -l
|
||||
echo "files downloaded."
|
||||
Reference in New Issue
Block a user