forked from thestr4ng3r/chiaki
-
Notifications
You must be signed in to change notification settings - Fork 11
/
install_mesa.sh
executable file
·48 lines (43 loc) · 1.48 KB
/
install_mesa.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
#!/bin/sh
echo ""
echo "This script will install Mesa 21.3.1 from the Official github release onto your system."
echo "NOTE, only run this if you are sure this is what you want."
echo "Read this script for more details."
echo ""
read -r -p "Go ahead? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
echo "Installing from https://github.com/mesa3d/mesa/archive/refs/tags/mesa-21.3.1.zip"
echo ""
cd third-party/
wget https://github.com/mesa3d/mesa/archive/refs/tags/mesa-21.3.1.zip
unzip mesa-21.3.1.zip
cd mesa-mesa-21.3.1
# Mesa dependencies
sudo apt install libgbm-dev
sudo apt install meson
sudo pip3 install mako
sudo apt install bison byacc flex
sudo apt install libxcb-glx0-dev libxcb-shm0-dev libxcb-dri2-0-dev libxcb-present-dev
sudo apt install libxshmfence-dev
sudo apt install libx11-xcb-dev
sudo apt install libxcb-dri3-dev
meson --prefix /usr --libdir lib -Dplatforms=x11 -Dvulkan-drivers=broadcom -Ddri-drivers= -Dgallium-drivers=v3d,kmsro,vc4 -Dbuildtype=release build
echo ""
echo "Compiling about to start. This will take a while"
echo ""
ninja -C build -j3
sudo ninja -C build install
echo ""
echo "Mesa 21.3.1 install finished"
echo ""
;;
[nN][oO]|[nN])
echo "Exiting script"
exit 1
;;
*)
echo "Invalid input"
exit 1
;;
esac