From eefbd029b55b2782b0d7b11b4989ce0ca9b256cd Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Tue, 15 Oct 2019 20:56:41 -0400 Subject: Massive organization of my dotfiles --- linux/kernel/upgrade.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 linux/kernel/upgrade.sh (limited to 'linux/kernel/upgrade.sh') diff --git a/linux/kernel/upgrade.sh b/linux/kernel/upgrade.sh new file mode 100755 index 0000000..dab1518 --- /dev/null +++ b/linux/kernel/upgrade.sh @@ -0,0 +1,26 @@ +#!/bin/sh +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="(.*)"$/\1/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 +cd / +sudo sh -c 'umask 002; sh /etc/kernel.d/post-install/10-dkms linux '"${version}${localversion}" +cd - +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" -- cgit v1.2.3