Restored gtk-3 installation (#3472)
[platform/upstream/dldt.git] / scripts / install_dependencies / install_4_14_kernel.sh
1 #!/bin/bash -x
2
3 # Copyright (c) 2018-2019 Intel Corporation
4 #
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
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
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.
16
17 # This script installs Linux kernel 4.14 required for Intel NEO OpenCL driver on Ubuntu and CentOS
18
19 if grep -i "rhel" /etc/os-release &>/dev/null; then
20         # Cent OS
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
23
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
27         fi
28
29         tar -xJf linux-4.14.20.tar.xz
30         cd linux-4.14.20
31         echo "build 4.14.20 kernel"
32         make olddefconfig
33
34         make -j 8 binrpm-pkg
35         cd ~/rpmbuild/RPMS/x86_64
36         sudo -E yum -y localinstall *.rpm
37         sudo -E grub2-set-default 0
38
39 elif grep -i "ubuntu" /etc/os-release &>/dev/null; then
40         # Ubuntu
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
44 fi