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>
62 lines
1.8 KiB
Bash
Executable File
62 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# ============================================================================
|
|
# DarkForge Linux — Phase 0, Chapter 6: Ncurses
|
|
# ============================================================================
|
|
# Purpose: Cross-compile the ncurses library (terminal handling). Required
|
|
# by bash, many TUI programs, and the installer.
|
|
# Inputs: ${LFS}/sources/ncurses-6.5.tar.gz
|
|
# Outputs: ncurses libraries and tic utility in ${LFS}/usr/
|
|
# Assumes: Cross-toolchain (Ch.5) complete
|
|
# Ref: LFS 13.0 §6.3
|
|
# ============================================================================
|
|
|
|
set -euo pipefail
|
|
source "${LFS}/sources/darkforge-env.sh"
|
|
|
|
PACKAGE="ncurses"
|
|
VERSION="6.5"
|
|
SRCDIR="${LFS}/sources"
|
|
|
|
echo "=== Building ${PACKAGE}-${VERSION} (Temporary Tool) ==="
|
|
|
|
cd "${SRCDIR}"
|
|
tar -xf "${PACKAGE}-${VERSION}.tar.gz"
|
|
cd "${PACKAGE}-${VERSION}"
|
|
|
|
# First, build the tic program that runs on the host
|
|
# This is needed to create the terminal database during install
|
|
sed -i s/mawk// configure
|
|
mkdir build
|
|
pushd build
|
|
../configure
|
|
make -C include
|
|
make -C progs tic
|
|
popd
|
|
|
|
# Now cross-compile ncurses for the target
|
|
./configure \
|
|
--prefix=/usr \
|
|
--host="${LFS_TGT}" \
|
|
--build="$(./config.guess)" \
|
|
--mandir=/usr/share/man \
|
|
--with-manpage-format=normal \
|
|
--with-shared \
|
|
--without-normal \
|
|
--with-cxx-shared \
|
|
--without-debug \
|
|
--without-ada \
|
|
--disable-stripping
|
|
|
|
make
|
|
make DESTDIR="${LFS}" TIC_PATH="$(pwd)/build/progs/tic" install
|
|
|
|
# Fix library so that it can be found by linker
|
|
ln -sv libncursesw.so "${LFS}/usr/lib/libncurses.so"
|
|
|
|
# Create pkg-config compatibility for programs that look for -lncurses
|
|
sed -e 's/^#if.*XOPEN.*$/#if 1/' -i "${LFS}/usr/include/curses.h"
|
|
|
|
cd "${SRCDIR}"
|
|
rm -rf "${PACKAGE}-${VERSION}"
|
|
echo "=== ${PACKAGE}-${VERSION} complete ==="
|