blob: d956a1077ee8457af8b5330925f8bc79dde0773a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh
# Basic script to update the kernel on a Void Linux system somewhat automatically
set -e
set -x
version="$(sed 11q Makefile \
| sed -n \
-e's/^VERSION = //p' \
-e's/^PATCHLEVEL = //p' \
-e's/^SUBLEVEL = //p' \
| tr '\n' '.' \
| sed -e's/\.$//')"
localversion="$(sed 25q .config \
| sed -rn \
-e's/^CONFIG_LOCALVERSION=".*"$//p')"
if [ -z "$version" ] ; then
exit 1;
fi
CPUs="$(nproc)"
# git checkout v$version
make -j$CPUs "$@" olddefconfig bzImage modules
sudo make -j$CPUs install modules_install
sudo dracut -f --kver "${version}${localversion}"
sudo grub-mkconfig -o /boot/grub/grub.cfg
# echo "You'll have to update grub by hand there bud"
|