Big script
This commit is contained in:
44
toolchain/scripts/155-kmod.sh
Executable file
44
toolchain/scripts/155-kmod.sh
Executable 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 ==="
|
||||
Reference in New Issue
Block a user