Big script

This commit is contained in:
2026-03-20 15:09:30 +01:00
parent dc2ac2f768
commit a2ca02a856
92 changed files with 5842 additions and 0 deletions

44
toolchain/scripts/155-kmod.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
# ============================================================================
# DarkForge Linux — Phase 3, Chapter 8: kmod
# ============================================================================
# Purpose: Build kmod (modprobe, insmod, lsmod, rmmod, etc.).
# Replaces deprecated module-init-tools.
# Inputs: /sources/kmod-34.tar.xz
# Outputs: kmod programs in /usr/bin/, libraries in /usr/lib/
# Assumes: Running inside chroot
# Ref: LFS 13.0 §8.60
# ============================================================================
set -euo pipefail
source /sources/toolchain-scripts/100-chroot-env.sh
PACKAGE="kmod"
VERSION="34"
echo "=== Building ${PACKAGE}-${VERSION} ==="
cd /sources
tar -xf "${PACKAGE}-${VERSION}.tar.xz"
cd "${PACKAGE}-${VERSION}"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-openssl \
--with-xz \
--with-zlib
make
make install
# Create symlinks for module programs that depend on kmod
cd /usr/bin
for tool in depmod insmod modinfo modprobe rmmod; do
ln -sfv kmod ${tool}
done
cd /sources
rm -rf "${PACKAGE}-${VERSION}"
echo "=== ${PACKAGE}-${VERSION} complete ==="