mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-21 11:52:52 +00:00
Add 8.47 - Build kmod
This commit is contained in:
parent
7d93e1bd2d
commit
d3ec0c7ff1
2 changed files with 48 additions and 0 deletions
36
scripts/chapter8/8.47-kmod.sh
Normal file
36
scripts/chapter8/8.47-kmod.sh
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /sources
|
||||
tar xf kmod-30.tar.xz
|
||||
cd kmod-30
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--with-openssl \
|
||||
--with-xz \
|
||||
--with-zstd \
|
||||
--with-zlib
|
||||
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make -j5
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make install
|
||||
|
||||
for target in depmod insmod modinfo modprobe rmmod; do
|
||||
ln -sfv ../bin/kmod /usr/sbin/$target
|
||||
done
|
||||
|
||||
ln -sfv kmod /usr/bin/lsmod
|
||||
|
||||
cd /sources
|
||||
rm -rf kmod-30
|
|
@ -1103,3 +1103,15 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Chapter 8.47
|
||||
# ============
|
||||
echo "Building kmod"
|
||||
su -c "bash $SCRIPT/chapter8/8.47-kmod.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "chapter8/8.47-kmod.sh"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue