-
Notifications
You must be signed in to change notification settings - Fork 42
/
MHS24-show
executable file
·45 lines (45 loc) · 1.38 KB
/
MHS24-show
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
#!/bin/bash
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp ./usr/mhs24-overlay.dtb /boot/overlays/
sudo cp ./usr/mhs24-overlay.dtb /boot/overlays/mhs24.dtbo
sudo cp -rf ./usr/99-calibration.conf-mhs24 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if [ -b /dev/mmcblk0p7 ]; then
sudo cp ./usr/cmdline.txt-noobs /boot/cmdline.txt
else
sudo cp ./usr/cmdline.txt /boot/
fi
sudo cp ./usr/inittab /etc/
sudo cp ./boot/config-mhs24.txt /boot/config.txt
#FBCP install
sudo cp -rf ./etc/rc.local /etc/rc.local
sudo apt-get install git cmake -y
sudo rm -rf rpi-fbcp
sudo git clone https://github.com/tasanakorn/rpi-fbcp
sudo mkdir ./rpi-fbcp/build
cd ./rpi-fbcp/build/
sudo cmake ..
sudo make
sudo install fbcp /usr/local/bin/fbcp
#evdev install
nodeplatform=`uname -n`
kernel=`uname -r`
version=`uname -v`
if test "$nodeplatform" = "raspberrypi";then
echo "this is raspberrypi kernel"
version=${version%% *}
version=${version#*#}
echo $version
if test $version -lt 970;then
echo "reboot"
else
echo "need to update touch configuration"
sudo apt-get install xserver-xorg-input-evdev
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
echo "reboot"
fi
else
echo "this is not raspberrypi kernel, no need to update touch configure, reboot"
fi
sudo reboot