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:
45
toolchain/scripts/003-linux-headers.sh
Executable file
45
toolchain/scripts/003-linux-headers.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
# ============================================================================
|
||||
# DarkForge Linux — Phase 0, Chapter 5: Linux API Headers
|
||||
# ============================================================================
|
||||
# Purpose: Install the Linux kernel API headers into the target sysroot.
|
||||
# These headers define the kernel-userspace interface that glibc
|
||||
# needs to compile against. We use kernel 6.19.8 to match our
|
||||
# target kernel version.
|
||||
# Inputs: ${LFS}/sources/linux-6.19.8.tar.xz
|
||||
# Outputs: Kernel headers in ${LFS}/usr/include/
|
||||
# Assumes: Running as 'lfs' user
|
||||
# Ref: LFS 13.0 §5.4
|
||||
# ============================================================================
|
||||
|
||||
set -euo pipefail
|
||||
source "${LFS}/sources/darkforge-env.sh"
|
||||
|
||||
PACKAGE="linux"
|
||||
VERSION="6.19.8"
|
||||
SRCDIR="${LFS}/sources"
|
||||
|
||||
echo "=== Installing ${PACKAGE}-${VERSION} API Headers ==="
|
||||
|
||||
cd "${SRCDIR}"
|
||||
tar -xf "${PACKAGE}-${VERSION}.tar.xz"
|
||||
cd "${PACKAGE}-${VERSION}"
|
||||
|
||||
# Clean any stale files or configurations
|
||||
make mrproper
|
||||
|
||||
# Generate the sanitized kernel headers
|
||||
# The 'headers' target produces userspace-safe versions of kernel headers
|
||||
make headers
|
||||
|
||||
# Remove non-header files from the generated output
|
||||
find usr/include -type f ! -name '*.h' -delete
|
||||
|
||||
# Install headers to target sysroot
|
||||
cp -rv usr/include "${LFS}/usr"
|
||||
|
||||
# Cleanup
|
||||
cd "${SRCDIR}"
|
||||
rm -rf "${PACKAGE}-${VERSION}"
|
||||
|
||||
echo "=== ${PACKAGE}-${VERSION} API Headers installed ==="
|
||||
Reference in New Issue
Block a user