lfs-buildscripts/CH8Build/CH08.47-kmod.sh

46 lines
775 B
Bash
Raw Permalink Normal View History

2024-10-06 13:16:25 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
2024-10-09 09:50:04 +08:00
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
2024-10-06 13:16:25 +08:00
[ -d kmod-${kmod_version} ] && rm -rf kmod-${kmod_version}
tar -Jxf ${kmod_tarball}
2024-10-06 15:23:34 +08:00
cd kmod-${kmod_version}
2024-10-06 13:16:25 +08:00
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-openssl \
--with-xz \
--with-zstd \
--with-zlib \
--disable-manpages
make
if [ $? -ne 0 ]; then
myfail "Failed building kmod"
fi
make install
if [ $? -ne 0 ]; then
myfail "Failed installing kmod"
fi
for target in depmod insmod modinfo modprobe rmmod; do
ln -sfv ../bin/kmod /usr/sbin/$target
rm -fv /usr/bin/$target
done
2024-10-08 14:25:15 +08:00
popd
# cleanup
pushd $GLSOURCES
rm -rf kmod-${kmod_version}
popd