diff options
author | pks <pks@pks.rocks> | 2020-11-10 12:21:13 +0100 |
---|---|---|
committer | pks <pks@pks.rocks> | 2020-11-10 12:21:13 +0100 |
commit | 8ad35ab4adb95cb7236513da6f671f271797b6b3 (patch) | |
tree | 118d8d306fc6573e8ea87661f7636f002630d5f2 /upgrade-kernel | |
parent | c86d4d52c9fe0cd877a6fee27284ce8f635789c8 (diff) |
upgrade-kernel: overhaul, PHC-Intel
Diffstat (limited to 'upgrade-kernel')
-rwxr-xr-x | upgrade-kernel | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/upgrade-kernel b/upgrade-kernel index 93afdb5..819ae76 100755 --- a/upgrade-kernel +++ b/upgrade-kernel @@ -1,26 +1,45 @@ #!/bin/sh -if [ ! -f .config ]; then echo "Call from kernel source dir!"; exit; fi +if [ ! -f .config ]; then + echo "Call from kernel source dir!"; exit +fi + V=`pwd | ruby -e "puts STDIN.gets.split('/').last.split('-')[1..-1].join '-'"`; +echo "Building Kernel @$V" + make mrproper cp -v ../config .config make + +# modules +# FIXME: This will fail when there already exists a directory for version $V sudo make modules_install +sudo ln -s /lib/modules/$V-* /lib/modules/$V + +# cp to /boot + lilo sudo cp -v arch/x86/boot/bzImage /boot/kernel sudo md5sum /boot/kernel > /tmp/kernel.md5 sudo mv /tmp/kernel.md5 /boot/kernel.md5 sudo /sbin/lilo + +# /usr/src/linux symlink sudo rm /usr/src/linux find . -type d | xargs chmod a+rx find . -type f | xargs chmod a+r find . -executable | xargs chmod a+x sudo ln -s $(pwd) /usr/src/linux + +# tp smapi cd ~/.local/src/kernel/tp_smapi/ -sudo make HDAPS=1 install KVER=$V KSRC=/home/pks/.local/src/kernel/linux-$V KBUILD=/home/pks/.local/src/kernel/linux-$V +sudo make HDAPS=0 install KVER=$V KSRC=/home/pks/.local/src/kernel/linux-$V KBUILD=/home/pks/.local/src/kernel/linux-$V sudo make clean -sudo chown -R pks:pks * .* /home/pks/.local/src/kernel/tp_smapi/ /home/pks/.local/src/kernel/linux-* -echo "=================" -cd /lib/modules/ -pwd -ls -lah +# phc intel +cd ~/.local/src/kernel/phc_intel/phc-intel-pack-rev32 +export KERNELSRC=/home/pks/.local/src/kernel/linux-$V +make +sudo mv phc-intel.ko /lib/modules/$V/extra/phc_intel.ko +make clean +sudo depmod + +sudo chown -R pks:pks * .* ~/.local/src/kernel/tp_smapi/ ~/.local/src/kernel/linux-* |