forked from HopeNux/archbox_projet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archbox_5drivers.sh
167 lines (154 loc) · 7.87 KB
/
archbox_5drivers.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#!/bin/bash
###############################################################################################
#----------------------------------------------------------------
# ARCHBOX_5DRIVERS.SH --> DEBUT
#----------------------------------------------------------------
rep=`(cd $(dirname "$0"); pwd)`
#----------------------------------------------------------------
# Script des paramètres par défauts
#----------------------------------------------------------------
export LANG=fr_FR.UTF-8
export blue="\\033[1;34m"
export cyan="\\033[1;36m"
export green="\\033[1;32m"
export nc="\\033[0;39m"
export red="\\033[1;31m"
export white="\\033[1;37m"
export yellow="\\033[1;33m"
export HOME=/home/xbmc
#----------------------------------------------------------------
# Vérification / Creation fichier LOG
#----------------------------------------------------------------
sh $rep/tools/archbox-opt/archbox_error.sh "log" "$rep/archbox_5drivers.log"
echo "" > $rep/archbox_5drivers.log
echo "#----------------------------------------------------------------" >> $rep/archbox_5drivers.log
echo "# ARCHBOX_5DRIVERS.SH --> DEBUT" >> $rep/archbox_5drivers.log
echo "#----------------------------------------------------------------" >> $rep/archbox_5drivers.log
###############################################################################################
echo " "
echo " "
###############################################################################################
echo -e "$green ******************************************************************************"
echo -e "$green * "
echo -e "$green * [$red ARCHBOX$green ]"
echo -e "$green * Votre console multimedia de salon"
echo -e "$green * Installation $yellow [DRIVERS]$cyan [En cour...]"
echo -e "$green * "
echo -e "$green ******************************************************************************"
###############################################################################################
echo " "
echo " "
###############################################################################################
echo -e "$white ******************************************************************************"
echo -e "$white * Mise à jour arch ..."
echo -e " * $cyan"
pacman -Suy --noconfirm
echo -e "$white * Mise à jour$yellow [OK]"
echo -e "$white ******************************************************************************"
###############################################################################################
echo " "
echo " "
###############################################################################################
echo -e "$white ******************************************************************************"
echo -e "$white * Votre carte graphique :"
lspci -k | grep -A 2 -i "VGA"
echo -e "$white * Installation et configuration de vos drivers"
#----------------------------------------------------------------
# Architecture (i386 - i686 - x86_64 - armv6l)
#----------------------------------------------------------------
archi=`uname -m`
echo -e "$green * Votre architecture$yellow $archi"
if [ "$archi" = "armv6l" ] ; then
echo -e " * $red"
read -p " * Votre machine est elle un Raspberry Pi Oui ? Non ? [def:Non] : " rpi
case $rpi in
"o"|"oui"|"O"|"Oui"|"OUI"|"y"|"yes"|"Y"|"Yes"|"YES")
archi="rpi" ;;
*)
echo "$green * " ;;
esac
fi
if [ "$archi" = "rpi" ] ; then
echo -e "$white * Raspberry PI drivers vidéos "
echo -e " * $cyan"
pacman -S --noconfirm xf86-video-fbdev
else
echo -e "$white * Installation des drivers vidéos par défaut"
echo -e " * $cyan"
pacman -S --noconfirm xf86-video-intel xf86-video-nouveau nouveau-dri xf86-video-ati xf86-video-vesa
echo " "
echo " "
# A FAIRE ATI
echo -e "$white ******************************************************************************"
echo -e "$white * AMD drivers vidéos"
echo -e "$white * pacman -S --noconfirm xf86-video-ati"
echo -e "$white * AMD drivers Carte mère"
echo -e "$white * pacman -S --noconfirm amd-ucode"
echo -e "$white ******************************************************************************"
echo " "
echo " "
# A FAIRE NVIDIA
echo -e "$white ******************************************************************************"
echo -e "$white * NVIDIA"
echo -e "$white * touch /etc/X11/xorg.conf.d/10-keyboard-layout.conf"
echo '* Section \"InputClass\"" >> /etc/X11/xorg.conf.d/10-keyboard-layout.conf'
echo '* Identifier \"Keyboard Layout\"" >> /etc/X11/xorg.conf.d/10-keyboard-layout.conf'
echo '* MatchIsKeyboard \"yes\"" >> /etc/X11/xorg.conf.d/10-keyboard-layout.conf'
echo '* MatchDevicePath \"/dev/input/event*\"" >> /etc/X11/xorg.conf.d/10-keyboard-layout.conf'
echo '* Option \"XkbLayout\" \"fr\"" >> /etc/X11/xorg.conf.d/10-keyboard-layout.conf'
echo '* Option \"XkbVariant\" \"latin9\"" >> /etc/X11/xorg.conf.d/10-keyboard-layout.conf'
echo -e "$white * EndSection >> /etc/X11/xorg.conf.d/10-keyboard-layout.conf"
echo -e "$white * pacman -S --noconfirm nvidia nvidia-utils lib32-nvidia-utils"
echo -e "$white * Si conflit libgl avec paquets nvidia utils pacman -Rdd libgl"
echo -e "$white ******************************************************************************"
echo " "
echo " "
echo -e "$white ******************************************************************************"
echo -e "$white * Nouveau"
echo -e "$white * pacman -S --noconfirm xf86-video-nouveau nouveau-dri"
echo -e "$white * Acceleration 3D : pacman -S --noconfirm libva-vdpau-driver"
echo -e "$white * Generation du Xorg.conf dans /root/xorg.conf.new : X -configure"
echo -e "$white * TEST : X -config /root/xorg.conf.new"
echo -e "$white * mv /root/xorg.conf.new /etc/X11/xorg.conf"
echo -e "$white ******************************************************************************"
echo " "
echo " "
# A FAIRE INTEL
echo -e "$white ******************************************************************************"
echo -e "$white * INTEL"
echo -e "$white * INTEL drivers vidéos"
echo -e "$white * pacman -S --noconfirm xf86-video-intel"
echo -e "$white ******************************************************************************"
echo " "
echo " "
# A FAIRE MESA
echo -e "$white ******************************************************************************"
echo -e "$white * MESA"
echo -e "$white * ALL drivers vidéos sans acceleration 3D"
echo -e "$white * pacman -S --noconfirm xf86-video-vesa"
echo -e "$white ******************************************************************************"
fi
echo -e "$white * Drivers $yellow [OK]"
echo -e "$white ******************************************************************************"
#----------------------------------------------------------------
# Ajout LOG
#----------------------------------------------------------------
echo "" >> $rep/archbox_5drivers.log
echo "#----------------------------------------------------------------" >> $rep/archbox_5drivers.log
echo "# LOG INSTALLATION DRIVERS" >> $rep/archbox_5drivers.log
echo "#----------------------------------------------------------------" >> $rep/archbox_5drivers.log
echo "INSTALLATION DRIVERS OK " >> $rep/archbox_5drivers.log
###############################################################################################
echo " "
echo " "
###############################################################################################
#----------------------------------------------------------------
# ARCHBOX_5DRIVERS.SH --> FIN
#----------------------------------------------------------------
echo -e "$green ******************************************************************************"
echo -e "$green * "
echo -e "$green * [$red ARCHBOX$green ]"
echo -e "$green * Installation $yellow [DRIVERS]$red Terminé"
echo -e "$green * "
echo -e "$green ******************************************************************************"
###############################################################################################