Last active
August 24, 2018 01:59
-
-
Save blukat29/1c7f44ed20d4507d724afa27456188bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -ex | |
# Dependencies | |
sudo apt-get install -y wget unzip xz-utils build-essential openssl bc curl libssl-dev | |
# Install SDKs | |
sudo apt-get install -y ocl-icd-libopencl1 ocl-icd-opencl-dev | |
# Download Intel GPU driver | |
mkdir opencl | |
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB4.1_linux64.zip | |
unzip SRB4.1_linux64.zip | |
# Extract and install config files | |
mkdir confs | |
tar -C confs -Jxf intel-opencl-r4.1-*.x86_64.tar.xz | |
tar -C confs -Jxf intel-opencl-devel-r4.1-*.x86_64.tar.xz | |
tar -C confs -Jxf intel-opencl-cpu-r4.1-*.x86_64.tar.xz | |
sudo cp -R confs/* / | |
sudo ldconfig | |
# Download Linux kernel 4.7 | |
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.7.tar.xz | |
tar -Jxf linux-4.7.tar.xz | |
cd linux-4.7 | |
# Patch kernel | |
patch -N -p1 < /opt/intel/opencl/kernel-4.7.patch | |
# Compile the kernel | |
sudo cat /boot/config-`uname -r` > .config | |
perl -pi -e 's/.*CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=".intel.r4.1"/' .config | |
make olddefconfig | |
make -j4 | |
make -j4 modules | |
sudo make modules_install | |
sudo make install | |
# Reboot | |
# sudo grub-update | |
# sudo reboot | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment