Initial commit of LFS notes and scripts.

This commit is contained in:
Shaun Setlock
2025-01-20 15:44:57 -05:00
commit 386dc3cec7
78 changed files with 2628 additions and 0 deletions

35
lfs-scripts/kmod.sh Normal file
View File

@@ -0,0 +1,35 @@
# Set the package we're building.
package="kmod-33"
extension=".tar.xz"
# Decompress the source.
echo "Unpacking ${package}${extension} ..."
tar xvf ${package}${extension}
# Enter the unpacked sources.
echo "Entering ${package} directory ..."
cd ${package}
# LFS commands.
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-openssl \
--with-xz \
--with-zstd \
--with-zlib \
--disable-manpages
make
make install
for target in depmod insmod modinfo modprobe rmmod; do
ln -sfv ../bin/kmod /usr/sbin/$target
rm -fv /usr/bin/$target
done
# Exit sources directory.
echo "Exiting ${package} directory ..."
cd ..
# Remove the directory of source files.
echo "Removing ${package} directory ..."
rm -rf ${package}