#!/bin/bash basedir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) pushd $PWD mkdir $basedir/linux cd $basedir/linux wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.15.2.tar.xz unxz linux* tar -xvf linux* cd linux-6.15.2 make clean make mrproper zcat /proc/config.gz > .config make olddefconfig make -j12 make modules_install cp arch/x86/boot/bzImage /boot/vmlinuz-generic-6.15.2 dirstr=$(ls /boot | grep vmlinuz-generic-6.15.2) if [[ $dirstr != '' ]]; then initrdcmd=$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 6.15.2 | tail -1) $initrdcmd cp System.map /boot/System.map-6.15.2 cp .config /boot/config-6.15.2.x64 echo "==================== [ kernel update ] ==========================" echo "your kernel has been updated. in order to boot, you will need" echo "to update your bootloader config." echo "if you do not use LILO, or do not boot off of your slackware disk" echo "simply input 'n'" echo "=================================================================" read -p "would you like to update your bootloader? [y/n] (y): " choice if [[ $choice != 'n' ]]; then liloconfig fi rm /boot/vmlinuz ln -s /boot/vmlinuz-generic-6.15.2 /boot/vmlinuz rm /boot/System.map ln -s /boot/System.map-6.15.2 /boot/System.map rm /boot/config ln -s /boot/config-6.15.2.x64 /boot/config fi popd