mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-21 19:52:52 +00:00
Add 10.3 - Build kernel
This commit is contained in:
parent
4c2c225324
commit
9bda8b4955
2 changed files with 49 additions and 0 deletions
37
scripts/chapter10/10.3-kernel.sh
Normal file
37
scripts/chapter10/10.3-kernel.sh
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /sources
|
||||
tar xf linux-5.19.2.tar.xz
|
||||
cd linux-5.19.2
|
||||
|
||||
make mrproper
|
||||
|
||||
make menuconfig
|
||||
|
||||
make -j5
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
make modules_install
|
||||
|
||||
cp -iv System.map /boot/System.map-5.19.2
|
||||
cp -iv .config /boot/config-5.19.2
|
||||
|
||||
install -d /usr/share/doc/linux-5.19.2
|
||||
cp -r Documentation/* /usr/share/doc/linux-5.19.2
|
||||
|
||||
install -v -m755 -d /etc/modprobe.d
|
||||
cat > /etc/modprobe.d/usb.conf << "EOF"
|
||||
# Begin /etc/modprobe.d/usb.conf
|
||||
|
||||
install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i ohci_hcd ; true
|
||||
install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe -i uhci_hcd ; true
|
||||
|
||||
# End /etc/modprobe.d/usb.conf
|
||||
EOF
|
||||
|
||||
cd /sources
|
||||
rm -rf linux-5.19.2
|
|
@ -1560,3 +1560,15 @@ then
|
|||
stop_script "chapter10/10.2-fstab.sh"
|
||||
fi
|
||||
|
||||
# Chapter 10.3
|
||||
# ============
|
||||
echo "Building kernel"
|
||||
su -c "bash $SCRIPT/chapter10/10.3-kernel.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "chapter10/10.3-kernel.sh"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue