This commit is contained in:
2026-03-20 11:21:20 +01:00
parent 0d041913be
commit ad3819c9c9
4 changed files with 150 additions and 21 deletions

View File

@@ -9,17 +9,20 @@
# Outputs: Source tarballs in ${LFS}/sources/
# Assumes: Internet access, wget or curl available
# Updated: 2026-03-20 — synced all versions with build scripts
# Mirror: Uses ftp.klid.dk (Denmark) for GNU packages — fast in EU
# ============================================================================
set -euo pipefail
LFS="${LFS:-/mnt/darkforge}"
SRCDIR="${LFS}/sources"
GNU_MIRROR="http://ftp.klid.dk/ftp/gnu"
mkdir -p "${SRCDIR}"
cd "${SRCDIR}"
echo "=== DarkForge: Downloading source tarballs ==="
echo "GNU mirror: ${GNU_MIRROR}"
# --- Helper function ----------------------------------------------------------
download() {
@@ -45,32 +48,32 @@ download() {
# 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/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 "${GNU_MIRROR}/binutils/binutils-2.46.tar.xz"
download "${GNU_MIRROR}/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz"
download "${GNU_MIRROR}/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-4.2.2/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"
download "${GNU_MIRROR}/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.21.tar.xz"
download "${GNU_MIRROR}/m4/m4-1.4.21.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 "${GNU_MIRROR}/bash/bash-5.3.tar.gz"
download "${GNU_MIRROR}/coreutils/coreutils-9.6.tar.xz"
download "${GNU_MIRROR}/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 "${GNU_MIRROR}/findutils/findutils-4.10.0.tar.xz"
download "${GNU_MIRROR}/gawk/gawk-5.4.0.tar.xz"
download "${GNU_MIRROR}/grep/grep-3.14.tar.xz"
download "${GNU_MIRROR}/gzip/gzip-1.14.tar.xz"
download "${GNU_MIRROR}/make/make-4.4.1.tar.gz"
download "${GNU_MIRROR}/patch/patch-2.8.tar.xz"
download "${GNU_MIRROR}/sed/sed-4.9.tar.xz"
download "${GNU_MIRROR}/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"
@@ -78,11 +81,11 @@ download "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.t
# 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 "${GNU_MIRROR}/gettext/gettext-0.23.1.tar.xz"
download "${GNU_MIRROR}/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 "${GNU_MIRROR}/texinfo/texinfo-7.3.tar.xz"
download "https://zlib.net/zlib-1.3.1.tar.xz"
download "https://www.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-2.40.4.tar.xz"
@@ -90,7 +93,6 @@ download "https://www.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-2.4
# Patches
# ==============================================================================
echo ">>> Patches..."
# LFS 13.0 patch: glibc-2.43-fhs-1.patch (matches glibc version)
download "https://www.linuxfromscratch.org/patches/lfs/13.0/glibc-2.43-fhs-1.patch"
echo ""