Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This is a modified "LCD35-show" script to replace the one in https://github.com/goodtft/LCD-show. Use this script for Raspbian 9.8 Stretch. Might not work with older or newer versions of Raspbian!
- sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
- sudo mkdir /etc/X11/xorg.conf.d
- sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/
- sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
- # Michel: these two file have to be removed again when you want to switch back to HDMI:
- sudo cp -rf ./usr/99-calibration.conf-35 /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-35.txt /boot/config.txt
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement