summaryrefslogtreecommitdiff
path: root/slackware-bootstrap/kernel
blob: 7c8cc350836e16b7658e48ed78d65983fa543339 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/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-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.x64
  cp .config /boot/config-6.15.2

  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.x64 /boot/System.map

  rm /boot/config
  ln -s /boot/config-6.15.2.x64 /boot/config
fi

popd