3 # Copyright (c) 2018-2019 Intel Corporation
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # This script installs Linux kernel 4.14 required for Intel NEO OpenCL driver on Ubuntu and CentOS
19 if grep -i "rhel" /etc/os-release &>/dev/null; then
21 echo "install kernel build dependencies"
22 sudo -E yum install -y git gcc gcc-c++ ncurses-devel openssl-devel bc xz elfutils-libelf-devel xorg-x11-drv-nouveau rpm-build
24 echo "download 4.14.20 kernel"
25 if [ ! -f ./linux-4.14.20.tar.xz ]; then
26 wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.14.20.tar.xz
29 tar -xJf linux-4.14.20.tar.xz
31 echo "build 4.14.20 kernel"
35 cd ~/rpmbuild/RPMS/x86_64
36 sudo -E yum -y localinstall *.rpm
37 sudo -E grub2-set-default 0
39 elif grep -i "ubuntu" /etc/os-release &>/dev/null; then
41 sudo -E add-apt-repository ppa:teejee2008/ppa
42 sudo -E apt-get update && sudo apt-get install -y ukuu
43 sudo -E ukuu --install v4.14.20