-
Notifications
You must be signed in to change notification settings - Fork 2
/
mk-intel-driver.sh
71 lines (63 loc) · 2.25 KB
/
mk-intel-driver.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env bash
# Initialization & Pre-requisites
echo "$(date "+%d.%m.%Y %T") INFO: *** Initializing Script ***"
cd "$HOME/"
echo "$(date "+%d.%m.%Y %T") INFO: *** Installing prerequisites needed to build the iHD driver. ***"
sudo apt-get install -y software-properties-common vainfo autoconf libtool libdrm-dev xorg xorg-dev openbox libx11-dev libgl1-mesa-glx libgl1-mesa-dev xutils-dev build-essential cmake
# Master directory
echo "$(date "+%d.%m.%Y %T") INFO: *** Creating master directory. ***"
mkdir intel-driver
sleep 5
cd "$HOME/intel-driver"
# LibVA
echo "$(date "+%d.%m.%Y %T") INFO: *** Cloning libva git. ***"
git clone "https://github.com/intel/libva.git"
sleep 5
cd "$HOME/intel-driver/libva"
echo "$(date "+%d.%m.%Y %T") INFO: *** Building and installing libva (VAAPI). ***"
./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
sleep 5
make -j8
sleep 5
sudo make install
sleep 5
cd $HOME/intel-driver
# GMMLib
echo "$(date "+%d.%m.%Y %T") INFO: *** Cloning gmmlib git. ***"
git clone https://github.com/intel/gmmlib.git
sleep 5
cd "$HOME/intel-driver/gmmlib"
echo "$(date "+%d.%m.%Y %T") INFO: *** Building and installing gmmlib ***"
mkdir build && cd build
sleep 5
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ../
sleep 5
make -j8
sleep 5
sudo make install
sleep 5
cd $HOME/intel-driver
# Media Driver
echo "$(date "+%d.%m.%Y %T") INFO: *** Cloning media-driver git. ***"
git clone https://github.com/intel/media-driver.git
sleep 5
mkdir build_media
sleep 5
cd "$HOME/intel-driver/build_media"
echo "$(date "+%d.%m.%Y %T") INFO: *** Building media-driver. ***"
cmake -DCMAKE_BUILD_TYPE=release-internal -DCMAKE_INSTALL_PREFIX=/usr ../media-driver
sleep 5
make -j8
sleep 5
sudo make install
cd $HOME/intel-driver
# # Removing and copying new driver.
# echo "$(date "+%d.%m.%Y %T") INFO: *** Removing old iHD driver. ***"
# sudo rm -rf "/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so"
# sudo cp "$HOME/intel-driver/build_media/media_driver/iHD_drv_video.so" "/usr/lib/x86_64-linux-gnu/dri/"
# Testing
export "LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri/"
export "LIBVA_DRIVER_NAME=iHD"
echo "$(date "+%d.%m.%Y %T") INFO: *** Script is now complete. ***"
echo "$(date "+%d.%m.%Y %T") INFO: *** Running vainfo to verify script worked. ***"
vainfo