add all files

This commit is contained in:
lcdwiki 2019-07-04 03:49:08 +01:00
parent 55eb559940
commit 7789af7e3b
99 changed files with 2463 additions and 0 deletions

20
LCD-hdmi Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
dev=`grep -rn "Option" /usr/share/X11/xorg.conf.d/99-fbturbo.conf | grep "fbdev" |awk -F\" '{printf $4}'`
if test "$dev" = "/dev/fb0";then
echo "The system is already output for HDMI and does not need to be set up any more"
exit
fi
sudo ./system_backup.sh
#sudo cp -rf ./usr/modules-HDMI /etc/modules
#sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
#sudo cp ./boot/config-nomal.txt /boot/config.txt
#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/
echo "reboot now"
sudo reboot

71
LCD24-3A+-show Executable file
View File

@ -0,0 +1,71 @@
#!/bin/bash
sudo ./system_backup.sh
if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir -p /etc/X11/xorg.conf.d
fi
sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/
sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "dtoverlay=tft9341:rotate=90" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
sudo cp -rf ./usr/99-calibration.conf-32-90 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if test "$root_dev" = "/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-32.txt /boot/config.txt
sudo touch ./.have_installed
echo "gpio:resistance:32:90:320:240" > ./.have_installed
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

71
LCD24-show Executable file
View File

@ -0,0 +1,71 @@
#!/bin/bash
sudo ./system_backup.sh
if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir -p /etc/X11/xorg.conf.d
fi
sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/
sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "dtoverlay=tft9341:rotate=270" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
sudo cp -rf ./usr/99-calibration.conf-32-270 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if test "$root_dev" = "/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-32.txt /boot/config.txt
sudo touch ./.have_installed
echo "gpio:resistance:32:270:320:240" > ./.have_installed
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

71
LCD28-show Executable file
View File

@ -0,0 +1,71 @@
#!/bin/bash
sudo ./system_backup.sh
if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir -p /etc/X11/xorg.conf.d
fi
sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/
sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "dtoverlay=tft9341:rotate=270" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
sudo cp -rf ./usr/99-calibration.conf-32-270 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if test "$root_dev" = "/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-32.txt /boot/config.txt
sudo touch ./.have_installed
echo "gpio:resistance:32:270:320:240" > ./.have_installed
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

71
LCD32-show Executable file
View File

@ -0,0 +1,71 @@
#!/bin/bash
sudo ./system_backup.sh
if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir -p /etc/X11/xorg.conf.d
fi
sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/
sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "dtoverlay=tft9341:rotate=270" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
sudo cp -rf ./usr/99-calibration.conf-32-270 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if test "$root_dev" = "/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-32.txt /boot/config.txt
sudo touch ./.have_installed
echo "gpio:resistance:32:270:320:240" > ./.have_installed
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

72
LCD35-show Executable file
View File

@ -0,0 +1,72 @@
#!/bin/bash
sudo ./system_backup.sh
if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir -p /etc/X11/xorg.conf.d
fi
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "dtoverlay=tft35a:rotate=90" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
sudo cp -rf ./usr/99-calibration.conf-35-90 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if test "$root_dev" = "/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
sudo touch ./.have_installed
echo "gpio:resistance:35:90:480:320" > ./.have_installed
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

74
LCD5-show Executable file
View File

@ -0,0 +1,74 @@
#!/bin/bash
sudo ./system_backup.sh
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "display_rotate=0" >> ./boot/config.txt.bak
sudo echo "max_usb_current=1" >> ./boot/config.txt.bak
sudo echo "config_hdmi_boost=7" >> ./boot/config.txt.bak
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=1" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=87" >> ./boot/config.txt.bak
sudo echo "hdmi_drive=1" >> ./boot/config.txt.bak
sudo echo "hdmi_cvt 800 480 60 6 0 0 0" >> ./boot/config.txt.bak
sudo echo "dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp -rf ./boot/config-5.txt /boot/config.txt
if test "$root_dev" = "/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 -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
sudo cp -rf ./usr/99-calibration.conf-5-0 /etc/X11/xorg.conf.d/99-calibration.conf
sudo touch ./.have_installed
echo "hdmi:resistance:5:0:800:480" > ./.have_installed
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

49
LCD7B-show Executable file
View File

@ -0,0 +1,49 @@
#!/bin/bash
sudo ./system_backup.sh
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "display_rotate=0" >> ./boot/config.txt.bak
sudo echo "max_usb_current=1" >> ./boot/config.txt.bak
sudo echo "config_hdmi_boost=7" >> ./boot/config.txt.bak
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=1" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=87" >> ./boot/config.txt.bak
sudo echo "hdmi_drive=1" >> ./boot/config.txt.bak
sudo echo "hdmi_cvt 800 480 60 6 0 0 0" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp -rf ./boot/config-7B-800x480.txt /boot/config.txt
if test "$root_dev" = "/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 -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
sudo cp ./usr/40-libinput.conf-0 /etc/X11/xorg.conf.d/40-libinput.conf
sudo touch ./.have_installed
echo "hdmi:capacity:7B-800x480:0:800:480" > ./.have_installed
sudo sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

49
LCD7C-show Executable file
View File

@ -0,0 +1,49 @@
#!/bin/bash
sudo ./system_backup.sh
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "display_rotate=0" >> ./boot/config.txt.bak
sudo echo "max_usb_current=1" >> ./boot/config.txt.bak
sudo echo "config_hdmi_boost=7" >> ./boot/config.txt.bak
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=1" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=87" >> ./boot/config.txt.bak
sudo echo "hdmi_drive=1" >> ./boot/config.txt.bak
sudo echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp -rf ./boot/config-7C-1024x600.txt /boot/config.txt
if test "$root_dev" = "/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 -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
sudo cp ./usr/40-libinput.conf-0 /etc/X11/xorg.conf.d/40-libinput.conf
sudo touch ./.have_installed
echo "hdmi:capacity:7C-1024x600:0:1024:600" > ./.have_installed
sudo sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

45
MHS24-show Executable file
View File

@ -0,0 +1,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

95
MHS32-show Executable file
View File

@ -0,0 +1,95 @@
#!/bin/bash
sudo ./system_backup.sh
if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir -p /etc/X11/xorg.conf.d
fi
sudo cp ./usr/mhs32-overlay.dtb /boot/overlays/
sudo cp ./usr/mhs32-overlay.dtb /boot/overlays/mhs32.dtbo
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "dtoverlay=mhs32:rotate=270" >> ./boot/config.txt.bak
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=1" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=87" >> ./boot/config.txt.bak
sudo echo "hdmi_cvt 480 320 60 6 0 0 0" >> ./boot/config.txt.bak
sudo echo "hdmi_drive=2" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
sudo cp -rf ./usr/99-calibration.conf-mhs32-270 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if test "$root_dev" = "/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-mhs32.txt /boot/config.txt
sudo touch ./.have_installed
echo "gpio:resistance:mhs32:270:480:320" > ./.have_installed
#FBCP install
wget --spider -q -o /dev/null --tries=1 -T 10 https://github.com
if [ $? -eq 0 ]; then
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
sudo cp -rf ./etc/rc.local /etc/rc.local
sudo apt-get install git cmake -y 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "^E:" ./error_output.txt && exit
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
cd - > /dev/null
fi
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

97
MHS35-show Executable file
View File

@ -0,0 +1,97 @@
#!/bin/bash
sudo ./system_backup.sh
if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir -p /etc/X11/xorg.conf.d
fi
sudo cp ./usr/mhs35-overlay.dtb /boot/overlays/
sudo cp ./usr/mhs35-overlay.dtb /boot/overlays/mhs35.dtbo
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "dtoverlay=mhs35:rotate=90" >> ./boot/config.txt.bak
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=1" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=87" >> ./boot/config.txt.bak
sudo echo "hdmi_cvt 480 320 60 6 0 0 0" >> ./boot/config.txt.bak
sudo echo "hdmi_drive=2" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
sudo cp -rf ./usr/99-calibration.conf-mhs35-90 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if test "$root_dev" = "/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-mhs35.txt /boot/config.txt
sudo touch ./.have_installed
echo "gpio:resistance:mhs35:90:480:320" > ./.have_installed
#FBCP install
wget --spider -q -o /dev/null --tries=1 -T 10 https://github.com
if [ $? -eq 0 ]; then
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
sudo cp -rf ./etc/rc.local /etc/rc.local
sudo apt-get install git cmake -y 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "^E:" ./error_output.txt && exit
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
cd - > /dev/null
fi
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

95
MHS40-show Executable file
View File

@ -0,0 +1,95 @@
#!/bin/bash
sudo ./system_backup.sh
if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir -p /etc/X11/xorg.conf.d
fi
sudo cp ./usr/mhs395-overlay.dtb /boot/overlays/
sudo cp ./usr/mhs395-overlay.dtb /boot/overlays/mhs395.dtbo
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "dtoverlay=mhs395:rotate=90" >> ./boot/config.txt.bak
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=1" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=87" >> ./boot/config.txt.bak
sudo echo "hdmi_cvt 480 320 60 6 0 0 0" >> ./boot/config.txt.bak
sudo echo "hdmi_drive=2" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
sudo cp -rf ./usr/99-calibration.conf-mhs395-90 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if test "$root_dev" = "/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
sudo touch ./.have_installed
echo "gpio:resistance:mhs395:90:480:320" > ./.have_installed
#FBCP install
wget --spider -q -o /dev/null --tries=1 -T 10 https://github.com
if [ $? -eq 0 ]; then
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
sudo cp -rf ./etc/rc.local /etc/rc.local
sudo apt-get install git cmake -y 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "^E:" ./error_output.txt && exit
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
cd - > /dev/null
fi
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

45
MIS35-show Executable file
View File

@ -0,0 +1,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/mis35-overlay.dtb /boot/overlays/
sudo cp ./usr/mis35-overlay.dtb /boot/overlays/mis35.dtbo
sudo cp -rf ./usr/99-calibration.conf-mhs35 /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-mis35.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

74
MPI3508-show Executable file
View File

@ -0,0 +1,74 @@
#!/bin/bash
sudo ./system_backup.sh
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "hdmi_force_edid_audio=1" >> ./boot/config.txt.bak
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "display_rotate=0" >> ./boot/config.txt.bak
sudo echo "max_usb_current=1" >> ./boot/config.txt.bak
sudo echo "config_hdmi_boost=7" >> ./boot/config.txt.bak
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=1" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=87" >> ./boot/config.txt.bak
sudo echo "hdmi_drive=2" >> ./boot/config.txt.bak
sudo echo "hdmi_cvt 480 320 60 6 0 0 0" >> ./boot/config.txt.bak
sudo echo "dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp -rf ./boot/config-35-480X320.txt /boot/config.txt
if test "$root_dev" = "/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 -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
sudo cp -rf ./usr/99-calibration.conf-3508-0 /etc/X11/xorg.conf.d/99-calibration.conf
sudo touch ./.have_installed
echo "hdmi:resistance:3508:0:480:320" > ./.have_installed
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

32
MPI3508_480_320-show Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
sudo cp -rf ./boot/config-35-480X320.txt /boot/config.txt
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 -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp -rf ./usr/99-calibration.conf-3508 /etc/X11/xorg.conf.d/99-calibration.conf
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

31
MPI3510-show Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
sudo cp -rf ./boot/config-35DPI.txt /boot/config.txt
#sudo cp ./usr/bcm2709-rpi-2-b.dtb /boot/
#sudo cp ./usr/bcm2710-rpi-3-b.dtb /boot/
#sudo cp ./usr/cmdline.txt /boot/
#sudo cp ./usr/qddpi24.dtb /boot/overlays/
#sudo cp ./usr/qddpi24.dtb /boot/overlays/qddpi24.dtbo
#sudo cp ./usr/inittab /etc/
#sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp -rf ./usr/99-calibration.conf-3508 /etc/X11/xorg.conf.d/99-calibration.conf
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

77
MPI4008-show Executable file
View File

@ -0,0 +1,77 @@
#!/bin/bash
sudo ./system_backup.sh
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "hdmi_force_edid_audio=1" >> ./boot/config.txt.bak
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "display_rotate=3" >> ./boot/config.txt.bak
sudo echo "max_usb_current=1" >> ./boot/config.txt.bak
sudo echo "config_hdmi_boost=7" >> ./boot/config.txt.bak
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=1" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=87" >> ./boot/config.txt.bak
sudo echo "hdmi_drive=2" >> ./boot/config.txt.bak
sudo echo "hdmi_cvt 480 800 60 6 0 0 0" >> ./boot/config.txt.bak
sudo echo "dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp -rf ./boot/config-397.txt /boot/config.txt
if test "$root_dev" = "/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 -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
sudo cp -rf ./usr/99-calibration.conf-397-270 /etc/X11/xorg.conf.d/99-calibration.conf
sudo touch ./.have_installed
echo "hdmi:resistance:397:270:480:800" > ./.have_installed
#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 2017;then
echo "reboot"
else
echo "need to update touch configuration"
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb 2> error_output.txt
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "error:" ./error_output.txt && exit
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 sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

50
MPI5001-show Executable file
View File

@ -0,0 +1,50 @@
#!/bin/bash
sudo ./system_backup.sh
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
else
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
fi
sudo echo "hdmi_force_edid_audio=1" >> ./boot/config.txt.bak
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
sudo echo "display_rotate=0" >> ./boot/config.txt.bak
sudo echo "max_usb_current=1" >> ./boot/config.txt.bak
sudo echo "config_hdmi_boost=7" >> ./boot/config.txt.bak
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=1" >> ./boot/config.txt.bak
sudo echo "hdmi_mode=87" >> ./boot/config.txt.bak
sudo echo "hdmi_drive=2" >> ./boot/config.txt.bak
sudo echo "hdmi_cvt 800 480 60 6 0 0 0" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp -rf ./boot/config-MPI5001.txt /boot/config.txt
if test "$root_dev" = "/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 -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
sudo cp ./usr/40-libinput.conf-0 /etc/X11/xorg.conf.d/40-libinput.conf
sudo touch ./.have_installed
echo "hdmi:capacity:MPI5001:0:800:480" > ./.have_installed
sudo sync
sudo sync
sleep 1
if [ $# -eq 1 ]; then
sudo ./rotate.sh $1
elif [ $# -gt 1 ]; then
echo "Too many parameters"
fi
echo "reboot now"
sudo reboot

80
README.md Executable file
View File

@ -0,0 +1,80 @@
LCD driver for the Raspberry PI Installation<br>
====================================================
Update: <br>
v1.9-20181204<br>
Update to support MHS40 & MHS32<br>
Update: <br>
v1.8-20180907<br>
Update to support MHS35<br>
Update: <br>
v1.7-20180320<br>
Update to support Raspbian Version:March 2018(Release date:2018-03-13)<br>
Update: <br>
v1.6-20170824<br>
Update xserver to support Raspbian-2017-08-16<br>
Update: <br>
v1.5-20170706<br>
Update to support Raspbian-2017-07-05,Raspbian-2017-06-21<br>
Update: <br>
v1.3-20170612<br>
fixed to support Raspbian-2017-03-02,Raspbian-2017-04-10<br>
Update: <br>
v1.2-20170302<br>
Add xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb to support Raspbian-2017-03-02<br>
Update: <br>
v1.1-20160815<br><br>
1.)Step1, Install Raspbian official mirror <br>
====================================================
a)Download Raspbian official mirror:<br>
https://www.raspberrypi.org/downloads/<br>
b)Use“SDFormatter.exe”to Format your TF Card<br>
c)Use“Win32DiskImager.exe” Burning mirror to TF Card<br>
2.) Step2, Clone my repo onto your pi<br>
====================================================
Use SSH to connect the raspberry pi, <br>
And Ensure that the raspberry pi is connected to the Internet before executing the following commands:
-----------------------------------------------------------------------------------------------------
```sudo rm -rf LCD-show```<br>
```git clone https://github.com/goodtft/LCD-show.git```<br>
```chmod -R 755 LCD-show```<br>
```cd LCD-show/```<br>
3.)Step3, According to your LCD's type, excute:
====================================================
In case of 2.4" RPi Display(MPI2401)<br>
```sudo ./LCD24-show```<br><br>
In case of 2.8" RPi Display(MPI2801)<br>
```sudo ./LCD28-show```<br><br>
In case of 3.2" RPi Display(MPI3201)<br>
```sudo ./LCD32-show```<br><br>
In case of 3.5inch RPi Display(MPI3501)<br>
```sudo ./LCD35-show```<br><br>
In case of 3.5" HDMI Display-B(MPI3508)<br>
```sudo ./MPI3508-show```<br><br>
In case of 3.2" High Speed display(MHS32)<br>
```sudo ./MHS32-show```<br><br>
In case of 3.5" High Speed display(MHS35)<br>
```sudo ./MHS35-show```<br><br>
In case of 4.0" High Speed display(MHS40)<br>
```sudo ./MHS40-show```<br><br>
In case of 4.0" HDMI Display(MPI4008)<br>
```sudo ./MPI4008-show```<br><br>
In case of 5inch HDMI Display-B(Capacitor touch)(MPI5001):<br>
```sudo ./MPI5001-show```<br><br>
In case of 5inch HDMI Display(Resistance touch)(MPI5008)<br>
```sudo ./LCD5-show```<br><br>
In case of 7inch HDMI Display-B-800X480(MPI7001)<br>
```sudo ./LCD7B-show```<br><br>
In case of 7inch HDMI Display-C-1024X600(MPI7002)<br>
```sudo ./LCD7C-show```<br><br><br>
If you need to switch back to the traditional HDMI display<br>
```sudo ./LCD-hdmi```<br>
Wait a few minutes,the system will restart automaticall , enjoy with your LCD.
-------------------------------------------------------------------------------
The LCD-show.tar.gz also can be download from:
http://www.lcdwiki.com/RaspberryPi-LCD-Driver
<br><br>

64
boot/config-nomal.txt Executable file
View File

@ -0,0 +1,64 @@
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
#dtoverlay=vc4-fkms-v3d

67
boot/config-noobs-nomal.txt Executable file
View File

@ -0,0 +1,67 @@
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
#dtoverlay=vc4-fkms-v3d
# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1

23
etc/rc.local Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
sleep 7
fbcp &
exit 0

20
etc/rc.local-original Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
exit 0

171
rotate.sh Executable file
View File

@ -0,0 +1,171 @@
#!/bin/bash
cur_dir=`pwd`
if [ ! -f $cur_dir/.have_installed ]; then
echo "Please install the LCD driver first"
echo "Usage: sudo ./xxx-show. xxx: MHS35,LCD35,MPI3508 etc."
exit
fi
print_info()
{
echo "Usage:sudo ./rotate.sh [0] [90] [180] [270] [360] [450]"
echo "0-Screen rotation 0 degrees"
echo "90-Screen rotation 90 degrees"
echo "180-Screen rotation 180 degrees"
echo "270-Screen rotation 270 degrees"
echo "360-Screen flip horizontal(Valid only for HDMI screens)"
echo "450-Screen flip vertical(Valid only for HDMI screens)"
}
if [ $# -eq 0 ]; then
echo "Please input parameter:0,90,180,270,360,450"
print_info
exit
elif [ $# -eq 1 ]; then
if [ ! -n "$(echo $1| sed -n "/^[0-9]\+$/p")" ]; then
echo "Invalid parameter"
print_info
exit
else
if [ $1 -ne 0 ] && [ $1 -ne 90 ] && [ $1 -ne 180 ] && [ $1 -ne 270 ] && [ $1 -ne 360 ] && [ $1 -ne 450 ]; then
echo "Invalid parameter"
print_info
exit
fi
fi
else
echo "Too many parameters, only one parameter allowed"
exit
fi
#get screen parameter
tmp=`cat $cur_dir/.have_installed`
output_type=`cat $cur_dir/.have_installed | awk -F ':' '{printf $1}'`
touch_type=`cat $cur_dir/.have_installed | awk -F ':' '{printf $2}'`
device_id=`cat $cur_dir/.have_installed | awk -F ':' '{printf $3}'`
default_value=`cat $cur_dir/.have_installed | awk -F ':' '{printf $4}'`
width=`cat $cur_dir/.have_installed | awk -F ':' '{printf $5}'`
height=`cat $cur_dir/.have_installed | awk -F ':' '{printf $6}'`
if [ $output_type = "hdmi" ]; then
result=`grep -rn "^display_rotate=" /boot/config.txt | tail -n 1`
line=`echo -n $result | awk -F: '{printf $1}'`
str=`echo -n $result | awk -F: '{printf $NF}'`
old_rotate_value=`echo -n $result | awk -F= '{printf $NF}'`
if [ $old_rotate_value = "0x10000" ]; then
old_rotate_value=4
elif [ $old_rotate_value = "0x20000" ]; then
old_rotate_value=5
fi
if [ $1 -eq 0 ] || [ $1 -eq 90 ] || [ $1 -eq 180 ] || [ $1 -eq 270 ]; then
new_rotate_value=$[(($default_value+$1)%360)/90]
else
new_rotate_value=$[$1/90]
fi
elif [ $output_type = "gpio" ]; then
result=`grep -rn "^dtoverlay=" /boot/config.txt | grep ":rotate=" | tail -n 1`
line=`echo -n $result | awk -F: '{printf $1}'`
str=`echo -n $result | awk -F: '{printf $NF}'`
old_rotate_value=`echo -n $result | awk -F= '{printf $NF}'`
if [ $1 -eq 0 ] || [ $1 -eq 90 ] || [ $1 -eq 180 ] || [ $1 -eq 270 ]; then
new_rotate_value=$[($default_value+$1)%360]
else
echo "Invalid parameter: only for HDMI screens"
exit
fi
else
echo "Invalid output type"
exit
fi
if [ $old_rotate_value -eq $new_rotate_value ]; then
if [ $output_type = "hdmi" ]; then
if [ $1 -eq 0 ] || [ $1 -eq 90 ] || [ $1 -eq 180 ] || [ $1 -eq 270 ]; then
old_rotate_value=$[($old_rotate_value*90+360-$default_value)%360]
else
old_rotate_value=$[$old_rotate_value*90]
fi
elif [ $output_type = "gpio" ]; then
old_rotate_value=$[($old_rotate_value+360-$default_value)%360]
fi
echo "Current rotate value is $old_rotate_value"
exit
fi
#setting LCD rotate
if [ $output_type = "hdmi" ]; then
if [ $new_rotate_value -eq 4 ]; then
sudo sed -i -e ''"$line"'s/'"$str"'/display_rotate=0x10000/' /boot/config.txt
elif [ $new_rotate_value -eq 5 ]; then
sudo sed -i -e ''"$line"'s/'"$str"'/display_rotate=0x20000/' /boot/config.txt
else
sudo sed -i -e ''"$line"'s/'"$str"'/display_rotate='"$new_rotate_value"'/' /boot/config.txt
fi
new_rotate_value=$[$new_rotate_value*90]
elif [ $output_type = "gpio" ]; then
sudo sed -i -e ''"$line"'s/'"$str"'/rotate='"$new_rotate_value"'/' /boot/config.txt
resultr=`grep -rn "^hdmi_cvt" /boot/config.txt | tail -n 1 | awk -F' ' '{print $1,$2,$3}'`
if [ -n "$resultr" ]; then
liner=`echo -n $resultr | awk -F: '{printf $1}'`
strr=`echo -n $resultr | awk -F: '{printf $2}'`
if [ $new_rotate_value -eq $default_value ] || [ $new_rotate_value -eq $[($default_value+180+360)%360] ]; then
sudo sed -i -e ''"$liner"'s/'"$strr"'/hdmi_cvt '"$width"' '"$height"'/' /boot/config.txt
elif [ $new_rotate_value -eq $[($default_value-90+360)%360] ] || [ $new_rotate_value -eq $[($default_value+90+360)%360] ]; then
sudo sed -i -e ''"$liner"'s/'"$strr"'/hdmi_cvt '"$height"' '"$width"'/' /boot/config.txt
fi
fi
fi
#setting touch screen rotate
if [ $touch_type = "resistance" ]; then
if [ $new_rotate_value -eq 0 ]; then
cp $cur_dir/usr/99-calibration.conf-$device_id-0 /etc/X11/xorg.conf.d/99-calibration.conf
echo "LCD rotate value is set to $1"
elif [ $new_rotate_value -eq 90 ]; then
cp $cur_dir/usr/99-calibration.conf-$device_id-90 /etc/X11/xorg.conf.d/99-calibration.conf
echo "LCD rotate value is set to $1"
elif [ $new_rotate_value -eq 180 ]; then
cp $cur_dir/usr/99-calibration.conf-$device_id-180 /etc/X11/xorg.conf.d/99-calibration.conf
echo "LCD rotate value is set to $1"
elif [ $new_rotate_value -eq 270 ]; then
cp $cur_dir/usr/99-calibration.conf-$device_id-270 /etc/X11/xorg.conf.d/99-calibration.conf
echo "LCD rotate value is set to $1"
elif [ $new_rotate_value -eq 360 ]; then
cp $cur_dir/usr/99-calibration.conf-$device_id-FLIP-H /etc/X11/xorg.conf.d/99-calibration.conf
echo "LCD rotate value is set to flip horizontally"
elif [ $new_rotate_value -eq 450 ]; then
cp $cur_dir/usr/99-calibration.conf-$device_id-FLIP-V /etc/X11/xorg.conf.d/99-calibration.conf
echo "LCD rotate value is set to flip vertically"
fi
elif [ $touch_type = "capacity" ]; then
if [ $new_rotate_value -eq 0 ]; then
cp $cur_dir/usr/40-libinput.conf-0 /etc/X11/xorg.conf.d/40-libinput.conf
echo "LCD rotate value is set to $1"
elif [ $new_rotate_value -eq 90 ]; then
cp $cur_dir/usr/40-libinput.conf-90 /etc/X11/xorg.conf.d/40-libinput.conf
echo "LCD rotate value is set to $1"
elif [ $new_rotate_value -eq 180 ]; then
cp $cur_dir/usr/40-libinput.conf-180 /etc/X11/xorg.conf.d/40-libinput.conf
echo "LCD rotate value is set to $1"
elif [ $new_rotate_value -eq 270 ]; then
cp $cur_dir/usr/40-libinput.conf-270 /etc/X11/xorg.conf.d/40-libinput.conf
echo "LCD rotate value is set to $1"
elif [ $new_rotate_value -eq 360 ]; then
cp $cur_dir/usr/40-libinput.conf-FLIP-H /etc/X11/xorg.conf.d/40-libinput.conf
echo "LCD rotate value is set to flip horizontally"
elif [ $new_rotate_value -eq 450 ]; then
cp $cur_dir/usr/40-libinput.conf-FLIP-V /etc/X11/xorg.conf.d/40-libinput.conf
echo "LCD rotate value is set to flip vertically"
fi
else
echo "Invalid touch type"
exit
fi
sudo sync
sudo sync
echo "reboot now"
sleep 1
sudo reboot

86
system_backup.sh Executable file
View File

@ -0,0 +1,86 @@
#!/bin/bash
if [ ! -d "./.system_backup" ]; then
sudo mkdir ./.system_backup
fi
sudo rm -rf ./.system_backup/*
if [ -f /etc/X11/xorg.conf.d/99-calibration.conf ]; then
sudo cp -rf /etc/X11/xorg.conf.d/99-calibration.conf ./.system_backup
sudo rm -rf /etc/X11/xorg.conf.d/99-calibration.conf
fi
if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then
sudo cp -rf /etc/X11/xorg.conf.d/40-libinput.conf ./.system_backup
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
fi
if [ -d /etc/X11/xorg.conf.d ]; then
sudo mkdir -p ./.system_backup/xorg.conf.d
sudo rm -rf /etc/X11/xorg.conf.d
fi
result=`grep -rn "^dtoverlay=" /boot/config.txt | grep ":rotate=" | tail -n 1`
if [ $? -eq 0 ]; then
str=`echo -n $result | awk -F: '{printf $2}' | awk -F= '{printf $NF}'`
if [ -f /boot/overlays/$str-overlay.dtb ]; then
sudo cp -rf /boot/overlays/$str-overlay.dtb ./.system_backup
sudo rm -rf /boot/overlays/$str-overlay.dtb
fi
if [ -f /boot/overlays/$str.dtbo ]; then
sudo cp -rf /boot/overlays/$str.dtbo ./.system_backup
sudo rm -rf /boot/overlays/$str.dtbo
fi
fi
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
sudo cp -rf /boot/config.txt ./.system_backup
sudo cp -rf /boot/cmdline.txt ./.system_backup/
if test "$root_dev" = "/dev/mmcblk0p7";then
sudo cp -rf ./boot/config-noobs-nomal.txt /boot/config.txt
sudo cp -rf ./usr/cmdline.txt-noobs-original /boot/cmdline.txt
else
sudo cp -rf ./boot/config-nomal.txt /boot/config.txt
sudo cp -rf ./usr/cmdline.txt-original /boot/cmdline.txt
fi
sudo cp -rf /usr/share/X11/xorg.conf.d/99-fbturbo.conf ./.system_backup/
sudo cp -rf ./usr/99-fbturbo.conf-original /usr/share/X11/xorg.conf.d/99-fbturbo.conf
sudo cp -rf /etc/rc.local ./.system_backup/
sudo cp -rf ./etc/rc.local-original /etc/rc.local
if [ -f /etc/inittab ]; then
sudo cp -rf /etc/inittab ./.system_backup
sudo rm -rf /etc/inittab
fi
type fbcp > /dev/null 2>&1
if [ $? -eq 0 ]; then
sudo touch ./.system_backup/have_fbcp
sudo rm -rf /usr/local/bin/fbcp
fi
#type cmake > /dev/null 2>&1
#if [ $? -eq 0 ]; then
#sudo touch ./.system_backup/have_cmake
#sudo apt-get purge cmake -y 2> error_output.txt
#result=`cat ./error_output.txt`
#echo -e "\033[31m$result\033[0m"
#fi
if [ -f /usr/share/X11/xorg.conf.d/10-evdev.conf ]; then
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf ./.system_backup
sudo dpkg -P xserver-xorg-input-evdev
#sudo apt-get purge xserver-xorg-input-evdev -y 2> error_output.txt
#result=`cat ./error_output.txt`
#echo -e "\033[31m$result\033[0m"
fi
if [ -f /usr/share/X11/xorg.conf.d/45-evdev.conf ]; then
sudo cp -rf /usr/share/X11/xorg.conf.d/45-evdev.conf ./.system_backup
sudo rm -rf /usr/share/X11/xorg.conf.d/45-evdev.conf
fi
if [ -f ./.have_installed ]; then
sudo cp -rf ./.have_installed ./.system_backup
sudo rm -rf ./.have_installed
fi

96
system_restore.sh Executable file
View File

@ -0,0 +1,96 @@
#!/bin/bash
#Just finished the system, no need to restore
if [ ! -d "./.system_backup" ]; then
echo "The system is the original version and does not need to be restored"
exit
fi
if [ -d /etc/X11/xorg.conf.d ]; then
sudo rm -rf /etc/X11/xorg.conf.d
fi
if [ -d ./.system_backup/xorg.conf.d ]; then
sudo cp -rf ./.system_backup/xorg.conf.d /etc/X11
if [ -f ./.system_backup/99-calibration.conf ]; then
sudo cp -rf ./.system_backup/99-calibration.conf /etc/X11/xorg.conf.d
fi
if [ -f ./.system_backup/40-libinput.conf ]; then
sudo cp -rf ./.system_backup/40-libinput.conf /etc/X11/xorg.conf.d
fi
fi
result=`grep -rn "^dtoverlay=" /boot/config.txt | grep ":rotate=" | tail -n 1`
if [ $? -eq 0 ]; then
str=`echo -n $result | awk -F: '{printf $2}' | awk -F= '{printf $NF}'`
sudo rm -rf /boot/overlays/$str-overlay.dtb
sudo rm -rf /boot/overlays/$str.dtbo
fi
ls -al ./.system_backup/*.dtb > /dev/null 2>&1 && sudo cp -rf ./.system_backup/*.dtb /boot/overlays/
ls -al ./.system_backup/*.dtbo > /dev/null 2>&1 && sudo cp -rf ./.system_backup/*.dtbo /boot/overlays/
sudo cp -rf ./.system_backup/99-fbturbo.conf /usr/share/X11/xorg.conf.d
sudo cp -rf ./.system_backup/cmdline.txt /boot/
sudo cp -rf ./.system_backup/config.txt /boot/
sudo cp -rf ./.system_backup/rc.local /etc/
if [ -f /etc/inittab ]; then
sudo rm -rf /etc/inittab
fi
if [ -f ./.system_backup/inittab ]; then
sudo cp -rf ./.system_backup/inittab /etc
fi
type fbcp > /dev/null 2>&1
if [ $? -eq 0 ]; then
sudo rm -rf /usr/local/bin/fbcp
fi
if [ -f ./.system_backup/have_fbcp ]; then
sudo install ./rpi-fbcp/build/fbcp /usr/local/bin/fbcp
fi
#type cmake > /dev/null 2>&1
#if [ $? -eq 0 ]; then
#sudo apt-get purge cmake -y 2> error_output.txt
#result=`cat ./error_output.txt`
#echo -e "\033[31m$result\033[0m"
#fi
#if [ -f ./.system_backup/have_cmake ]; then
#sudo apt-get install cmake -y 2> error_output.txt
#result=`cat ./error_output.txt`
#echo -e "\033[31m$result\033[0m"
#fi
if [ -f /usr/share/X11/xorg.conf.d/10-evdev.conf ]; then
sudo dpkg -P xserver-xorg-input-evdev
#sudo apt-get purge xserver-xorg-input-evdev -y 2> error_output.txt
#result=`cat ./error_output.txt`
#echo -e "\033[31m$result\033[0m"
fi
if [ -f ./.system_backup/10-evdev.conf ]; then
sudo dpkg -i -B ./xserver-xorg-input-evdev_2.10.5-1_armhf.deb
#sudo apt-get install xserver-xorg-input-evdev -y 2> error_output.txt
#result=`cat ./error_output.txt`
#echo -e "\033[31m$result\033[0m"
fi
if [ -f /usr/share/X11/xorg.conf.d/45-evdev.conf ]; then
sudo rm -rf /usr/share/X11/xorg.conf.d/45-evdev.conf
fi
if [ -f ./.system_backup/45-evdev.conf ]; then
sudo cp -rf ./.system_backup/45-evdev.conf /usr/share/X11/xorg.conf.d
fi
if [ -f ./.have_installed ]; then
sudo rm -rf ./.have_installed
fi
if [ -f ./.system_backup/.have_installed ]; then
sudo cp -rf ./.system_backup/.have_installed ./
fi
sudo sync
sudo sync
echo "The system has been restored"
echo "now reboot"
sleep 1
sudo reboot

36
usr/40-libinput.conf-0 Executable file
View File

@ -0,0 +1,36 @@
# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "CalibrationMatrix" "1 0 0 0 1 0 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

36
usr/40-libinput.conf-180 Executable file
View File

@ -0,0 +1,36 @@
# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

36
usr/40-libinput.conf-270 Executable file
View File

@ -0,0 +1,36 @@
# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

36
usr/40-libinput.conf-90 Executable file
View File

@ -0,0 +1,36 @@
# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

36
usr/40-libinput.conf-FLIP-H Executable file
View File

@ -0,0 +1,36 @@
# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "CalibrationMatrix" "-1 0 1 0 1 0 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

36
usr/40-libinput.conf-FLIP-V Executable file
View File

@ -0,0 +1,36 @@
# Match on all types of devices but tablet devices and joysticks
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "CalibrationMatrix" "1 0 0 0 -1 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection

6
usr/99-calibration.conf-24 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3639 145 192 3794"
Option "SwapAxes" "1"
EndSection

6
usr/99-calibration.conf-28 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3770 171 239 3892"
Option "SwapAxes" "1"
EndSection

6
usr/99-calibration.conf-32-0 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "155 3865 115 3700"
Option "SwapAxes" "0"
EndSection

6
usr/99-calibration.conf-32-180 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3865 155 3700 115"
Option "SwapAxes" "0"
EndSection

6
usr/99-calibration.conf-32-270 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "115 3700 3865 155"
Option "SwapAxes" "1"
EndSection

6
usr/99-calibration.conf-32-90 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3700 115 155 3865"
Option "SwapAxes" "1"
EndSection

6
usr/99-calibration.conf-35-0 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "268 3880 227 3936"
Option "SwapAxes" "0"
EndSection

6
usr/99-calibration.conf-35-180 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3880 268 3936 227"
Option "SwapAxes" "0"
EndSection

6
usr/99-calibration.conf-35-270 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "227 3936 3880 268"
Option "SwapAxes" "1"
EndSection

6
usr/99-calibration.conf-35-90 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3936 227 268 3880"
Option "SwapAxes" "1"
EndSection

6
usr/99-calibration.conf-3508-0 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3945 233 3939 183"
Option "SwapAxes" "1"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "233 3945 183 3939"
Option "SwapAxes" "1"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "183 3939 3945 233"
Option "SwapAxes" "0"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3939 183 233 3945"
Option "SwapAxes" "0"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "233 3945 3939 183"
Option "SwapAxes" "1"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3945 233 183 3939"
Option "SwapAxes" "1"
EndSection

6
usr/99-calibration.conf-397-0 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "72 3916 182 4012"
Option "SwapAxes" "0"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3916 72 4012 182"
Option "SwapAxes" "0"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "4012 182 72 3916"
Option "SwapAxes" "1"
EndSection

6
usr/99-calibration.conf-397-90 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "182 4012 3916 72"
Option "SwapAxes" "1"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3916 72 182 4012"
Option "SwapAxes" "0"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "72 3916 4012 182"
Option "SwapAxes" "0"
EndSection

6
usr/99-calibration.conf-43 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "535 3860 254 3883"
Option "SwapAxes" "0"
EndSection

6
usr/99-calibration.conf-5-0 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "140 3951 261 3998"
Option "SwapAxes" "0"
EndSection

6
usr/99-calibration.conf-5-180 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3951 140 3998 261"
Option "SwapAxes" "0"
EndSection

6
usr/99-calibration.conf-5-270 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3998 261 140 3951"
Option "SwapAxes" "1"
EndSection

6
usr/99-calibration.conf-5-90 Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "261 3998 3951 140"
Option "SwapAxes" "1"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3951 140 261 3998"
Option "SwapAxes" "0"
EndSection

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "140 3951 3998 261"
Option "SwapAxes" "0"
EndSection

6
usr/99-calibration.conf-HDMI7C Executable file
View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "深圳市全动电子技术有限公司 ByQDtech 触控USB鼠标"
Option "Calibration" "0 1024 0 600"
Option "SwapAxes" "0"
EndSection

9
usr/99-calibration.conf-mhs24 Executable file
View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3697 135 136 3839"
Option "SwapAxes" "1"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3901 158 212 3713"
Option "SwapAxes" "0"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "158 3901 3713 212"
Option "SwapAxes" "0"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "212 3713 158 3901"
Option "SwapAxes" "1"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3713 212 3901 158"
Option "SwapAxes" "1"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "268 3880 227 3936"
Option "SwapAxes" "0"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3880 268 3936 227"
Option "SwapAxes" "0"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "227 3936 3880 268"
Option "SwapAxes" "1"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3936 227 268 3880"
Option "SwapAxes" "1"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "268 3880 227 3936"
Option "SwapAxes" "0"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3880 268 3936 227"
Option "SwapAxes" "0"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "227 3936 3880 268"
Option "SwapAxes" "1"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

View File

@ -0,0 +1,9 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3936 227 268 3880"
Option "SwapAxes" "1"
Option "EmulateThirdButton" "1"
Option "EmulateThirdButtonTimeout" "1000"
Option "EmulateThirdButtonMoveThreshold" "300"
EndSection

16
usr/99-fbturbo-fbcp.conf Executable file
View File

@ -0,0 +1,16 @@
# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.
Section "Device"
Identifier "Allwinner A10/A13/A20 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "SwapbuffersWait" "true"
EndSection

16
usr/99-fbturbo.conf Executable file
View File

@ -0,0 +1,16 @@
# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.
Section "Device"
Identifier "Allwinner A10/A13/A20 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb1"
Option "SwapbuffersWait" "true"
EndSection

16
usr/99-fbturbo.conf-HDMI Executable file
View File

@ -0,0 +1,16 @@
# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.
Section "Device"
Identifier "Allwinner A10/A13/A20 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "SwapbuffersWait" "true"
EndSection

View File

@ -0,0 +1,17 @@
# This is a minimal sample config file, which can be copied to
# /etc/X11/xorg.conf in order to make the Xorg server pick up
# and load xf86-video-fbturbo driver installed in the system.
#
# When troubleshooting, check /var/log/Xorg.0.log for the debugging
# output and error messages.
#
# Run "man fbturbo" to get additional information about the extra
# configuration options for tuning the driver.
Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "SwapbuffersWait" "true"
EndSection

BIN
usr/bcm2709-rpi-2-b.dtb Executable file

Binary file not shown.

BIN
usr/bcm2710-rpi-3-b.dtb Executable file

Binary file not shown.

1
usr/cmdline.txt Executable file
View File

@ -0,0 +1 @@
dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo

1
usr/cmdline.txt-noobs Executable file
View File

@ -0,0 +1 @@
dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo

1
usr/cmdline.txt-noobs-original Executable file
View File

@ -0,0 +1 @@
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

1
usr/cmdline.txt-original Normal file
View File

@ -0,0 +1 @@
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=f27bf3fc-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles

72
usr/inittab Executable file
View File

@ -0,0 +1,72 @@
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
# The default runlevel.
id:2:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
# What to do in single-user mode.
~~:S:wait:/sbin/sulogin
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
# Action on special keypress (ALT-UpArrow).
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."
# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop
# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
# <id>:<runlevels>:<action>:<process>
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
1:2345:respawn:/sbin/getty --noclear 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6
# Example how to put a getty on a serial line (for a terminal)
#
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
# Example how to put a getty on a modem line.
#
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

BIN
usr/mhs24-overlay.dtb Executable file

Binary file not shown.

BIN
usr/mhs32-overlay.dtb Executable file

Binary file not shown.

BIN
usr/mhs35-overlay.dtb Executable file

Binary file not shown.

BIN
usr/mhs395-overlay.dtb Executable file

Binary file not shown.

BIN
usr/mis35-overlay.dtb Executable file

Binary file not shown.

13
usr/modules-HDMI Executable file
View File

@ -0,0 +1,13 @@
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
snd-bcm2835
i2c-bcm2708
i2c-dev
#flexfb width=320 height=480 regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3
#fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24
#ads7846_device model=7846 cs=1 gpio_pendown=17 keep_vref_on=1 swap_xy=1 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900

BIN
usr/qddpi24.dtb Executable file

Binary file not shown.

BIN
usr/tft35a-overlay.dtb Executable file

Binary file not shown.

BIN
usr/tft9341-overlay.dtb Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.