LCD-show/MHS40-show

46 lines
1.4 KiB
Plaintext
Raw Normal View History

2018-12-04 04:49:10 +01:00
#!/bin/bash
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp ./usr/mhs395-overlay.dtb /boot/overlays/
sudo cp ./usr/mhs395-overlay.dtb /boot/overlays/mhs395.dtbo
sudo cp -rf ./usr/99-calibration.conf-mhs395 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/
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-mhs395.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