diff --git a/LCD-hdmi b/LCD-hdmi old mode 100644 new mode 100755 diff --git a/LCD24-show b/LCD24-show old mode 100644 new mode 100755 index 4019f92..f013b1a --- a/LCD24-show +++ b/LCD24-show @@ -3,7 +3,7 @@ sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf sudo mkdir /etc/X11/xorg.conf.d sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/ sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo -sudo cp -rf ./usr/99-calibration.conf-24 /etc/X11/xorg.conf.d/99-calibration.conf +sudo cp -rf ./usr/99-calibration.conf-32 /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 @@ -11,7 +11,7 @@ else sudo cp ./usr/cmdline.txt /boot/ fi sudo cp ./usr/inittab /etc/ -sudo cp ./boot/config-28.txt /boot/config.txt +sudo cp ./boot/config-32.txt /boot/config.txt nodeplatform=`uname -n` kernel=`uname -r` version=`uname -v` @@ -24,13 +24,7 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +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 diff --git a/LCD28-show b/LCD28-show old mode 100644 new mode 100755 index 67fe163..f013b1a --- a/LCD28-show +++ b/LCD28-show @@ -3,7 +3,7 @@ sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf sudo mkdir /etc/X11/xorg.conf.d sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/ sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo -sudo cp -rf ./usr/99-calibration.conf-28 /etc/X11/xorg.conf.d/99-calibration.conf +sudo cp -rf ./usr/99-calibration.conf-32 /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 @@ -11,7 +11,7 @@ else sudo cp ./usr/cmdline.txt /boot/ fi sudo cp ./usr/inittab /etc/ -sudo cp ./boot/config-28.txt /boot/config.txt +sudo cp ./boot/config-32.txt /boot/config.txt nodeplatform=`uname -n` kernel=`uname -r` version=`uname -v` @@ -24,13 +24,7 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +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 diff --git a/LCD32-show b/LCD32-show old mode 100644 new mode 100755 index 656638d..f013b1a --- a/LCD32-show +++ b/LCD32-show @@ -24,13 +24,7 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +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 diff --git a/LCD35-show b/LCD35-show old mode 100644 new mode 100755 index f7cedee..5716905 --- a/LCD35-show +++ b/LCD35-show @@ -24,13 +24,7 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +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 diff --git a/LCD5-show b/LCD5-show old mode 100644 new mode 100755 index cf876df..7a068de --- a/LCD5-show +++ b/LCD5-show @@ -22,13 +22,7 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +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 diff --git a/LCD7B-show b/LCD7B-show old mode 100644 new mode 100755 index ee11053..0e17561 --- a/LCD7B-show +++ b/LCD7B-show @@ -18,13 +18,7 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +sudo apt-get install xserver-xorg-input-evdev fi fi sudo mkdir /etc/X11/xorg.conf.d diff --git a/LCD7C-show b/LCD7C-show old mode 100644 new mode 100755 index b9a645a..ce18243 --- a/LCD7C-show +++ b/LCD7C-show @@ -20,13 +20,7 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +sudo apt-get install xserver-xorg-input-evdev fi fi sudo mkdir /etc/X11/xorg.conf.d diff --git a/MHS24-show b/MHS24-show new file mode 100755 index 0000000..cbb9cd3 --- /dev/null +++ b/MHS24-show @@ -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 diff --git a/MHS32-show b/MHS32-show new file mode 100755 index 0000000..6799f7e --- /dev/null +++ b/MHS32-show @@ -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/mhs32-overlay.dtb /boot/overlays/ +sudo cp ./usr/mhs32-overlay.dtb /boot/overlays/mhs32.dtbo +sudo cp -rf ./usr/99-calibration.conf-mhs32 /etc/X11/xorg.conf.d/99-calibration.conf +sudo cp -rf ./usr/99-fbturbo-fbcp.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-mhs32.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 diff --git a/MHS35-show b/MHS35-show new file mode 100755 index 0000000..6a5fe7c --- /dev/null +++ b/MHS35-show @@ -0,0 +1,92 @@ +#!/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 + +sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak +sudo echo "hdmi_force_hotplug=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 "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 [ -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-mhs35.txt /boot/config.txt +sudo touch ./.have_installed +echo "gpio:resistance:mhs35:90" > ./.have_installed + +#FBCP install +wget --spider -q -o /dev/null --tries=1 -T 3 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 970;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 diff --git a/MHS40-show b/MHS40-show new file mode 100755 index 0000000..1b66f3c --- /dev/null +++ b/MHS40-show @@ -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/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-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-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 diff --git a/MIS35-show b/MIS35-show new file mode 100755 index 0000000..b2d2dcf --- /dev/null +++ b/MIS35-show @@ -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 diff --git a/MPI3508-show b/MPI3508-show old mode 100644 new mode 100755 index c67df03..c3c2829 --- a/MPI3508-show +++ b/MPI3508-show @@ -22,13 +22,7 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +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 diff --git a/MPI3508_480_320-show b/MPI3508_480_320-show old mode 100644 new mode 100755 index c67df03..c3c2829 --- a/MPI3508_480_320-show +++ b/MPI3508_480_320-show @@ -22,13 +22,7 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +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 diff --git a/MPI3510-show b/MPI3510-show old mode 100644 new mode 100755 index 83ea0fc..2ce75b7 --- a/MPI3510-show +++ b/MPI3510-show @@ -21,13 +21,7 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +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 diff --git a/MPI4008-show b/MPI4008-show old mode 100644 new mode 100755 index 7b9cbea..c4077a8 --- a/MPI4008-show +++ b/MPI4008-show @@ -1,5 +1,26 @@ #!/bin/bash -sudo cp -rf ./boot/config-397.txt /boot/config.txt + +sudo ./system_backup.sh + +sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak +sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak +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 [ -b /dev/mmcblk0p7 ]; then sudo cp ./usr/cmdline.txt-noobs /boot/cmdline.txt else @@ -7,8 +28,13 @@ 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 -sudo cp -rf ./usr/99-calibration.conf-397 /etc/X11/xorg.conf.d/99-calibration.conf +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" > ./.have_installed + nodeplatform=`uname -n` kernel=`uname -r` version=`uname -v` @@ -21,17 +47,26 @@ if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi +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" +#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 diff --git a/MPI5001-show b/MPI5001-show old mode 100644 new mode 100755 index f5aed0b..bd542f4 --- a/MPI5001-show +++ b/MPI5001-show @@ -1,33 +1,39 @@ -sudo cp -rf ./boot/config-MPI5001.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 +#!/bin/bash -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" -if test $version -ge 1023;then -echo "install xserver-xorg-input-evdev_2.10.5-1" -sudo dpkg -i -B xserver-xorg-input-evdev_2.10.5-1_armhf.deb -else -echo "install xserver-xorg-input-evdev_1%3a2.10.3-1" -sudo dpkg -i -B xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -fi -fi -fi +sudo ./system_backup.sh + +sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak +sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak +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 +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 -sudo cp ./usr/40-libinput.conf-MPI5001 /etc/X11/xorg.conf.d/40-libinput.conf +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" > ./.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 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index fbe6741..e502885 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ LCD driver for the Raspberry PI Installation
==================================================== +Update:
+v1.9-20181204
+Update to support MHS40 & MHS32
+Update:
+v1.8-20180907
+Update to support MHS35
+Update:
v1.7-20180320
Update to support Raspbian Version:March 2018(Release date:2018-03-13)
Update:
@@ -47,6 +54,12 @@ In case of 3.5inch RPi Display(MPI3501)
```sudo ./LCD35-show```

In case of 3.5" HDMI Display-B(MPI3508)
```sudo ./MPI3508-show```

+ In case of 3.2" High Speed display(MHS32)
+ ```sudo ./MHS32-show```

+In case of 3.5" High Speed display(MHS35)
+ ```sudo ./MHS35-show```

+In case of 4.0" High Speed display(MHS40)
+ ```sudo ./MHS40-show```

In case of 4.0" HDMI Display(MPI4008)
```sudo ./MPI4008-show```

In case of 5inch HDMI Display-B(Capacitor touch)(MPI5001):
@@ -63,7 +76,5 @@ If you need to switch back to the traditional HDMI display
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.hellolcd.com/wiki/LCD-show +http://www.lcdwiki.com/RaspberryPi-LCD-Driver

- - diff --git a/boot/config-28.txt b/boot/config-28.txt old mode 100644 new mode 100755 index 3778f46..cce09e0 --- a/boot/config-28.txt +++ b/boot/config-28.txt @@ -54,5 +54,5 @@ enable_uart=1 # Enable audio (loads snd_bcm2835) dtparam=audio=on -dtoverlay=tft9341:rotate=90 +dtoverlay=tft9341:rotate=270 #dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900 diff --git a/boot/config-32.txt b/boot/config-32.txt old mode 100644 new mode 100755 diff --git a/boot/config-35-480X320.txt b/boot/config-35-480X320.txt old mode 100644 new mode 100755 diff --git a/boot/config-35.txt b/boot/config-35.txt old mode 100644 new mode 100755 diff --git a/boot/config-35DPI.txt b/boot/config-35DPI.txt old mode 100644 new mode 100755 diff --git a/boot/config-397.txt b/boot/config-397.txt old mode 100644 new mode 100755 index 0be179c..3152f15 --- a/boot/config-397.txt +++ b/boot/config-397.txt @@ -22,7 +22,7 @@ #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output -hdmi_force_hotplug=1 +#hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 @@ -61,5 +61,6 @@ config_hdmi_boost=7 hdmi_group=2 hdmi_mode=1 hdmi_mode=87 +hdmi_drive=2 hdmi_cvt 480 800 60 6 0 0 0 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 diff --git a/boot/config-43.txt b/boot/config-43.txt old mode 100644 new mode 100755 diff --git a/boot/config-5.txt b/boot/config-5.txt old mode 100644 new mode 100755 index 7dd4eb8..6bbe075 --- a/boot/config-5.txt +++ b/boot/config-5.txt @@ -22,7 +22,7 @@ #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output -hdmi_force_hotplug=1 +#hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 @@ -55,6 +55,7 @@ enable_uart=1 # Enable audio (loads snd_bcm2835) dtparam=audio=on max_usb_current=1 +display_rotate=0 hdmi_force_hotplug=1 config_hdmi_boost=7 hdmi_group=2 diff --git a/boot/config-7B-800x480.txt b/boot/config-7B-800x480.txt old mode 100644 new mode 100755 diff --git a/boot/config-7C-1024x600.txt b/boot/config-7C-1024x600.txt old mode 100644 new mode 100755 diff --git a/boot/config-MPI5001.txt b/boot/config-MPI5001.txt old mode 100644 new mode 100755 index bf11502..a5aa41f --- a/boot/config-MPI5001.txt +++ b/boot/config-MPI5001.txt @@ -54,11 +54,13 @@ enable_uart=1 # Enable audio (loads snd_bcm2835) dtparam=audio=on +display_rotate=0 max_usb_current=1 hdmi_force_hotplug=1 config_hdmi_boost=7 hdmi_group=2 hdmi_mode=1 hdmi_mode=87 -hdmi_drive=1 -hdmi_cvt 800 480 60 6 0 0 0 \ No newline at end of file +hdmi_drive=2 +hdmi_force_edid_audio=1 +hdmi_cvt 800 480 60 6 0 0 0 diff --git a/boot/config-mhs24.txt b/boot/config-mhs24.txt new file mode 100755 index 0000000..7dd2e2d --- /dev/null +++ b/boot/config-mhs24.txt @@ -0,0 +1,63 @@ +# For more options and information see +# http://www.raspberrypi.org/documentation/configuration/config-txt.md +# 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 +enable_uart=1 +# 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 +dtoverlay=mhs24 +hdmi_force_hotplug=1 +hdmi_group=2 +hdmi_mode=1 +hdmi_mode=87 +hdmi_cvt 320 240 60 6 0 0 0 +hdmi_drive=2 diff --git a/boot/config-mhs32.txt b/boot/config-mhs32.txt new file mode 100755 index 0000000..2b191b6 --- /dev/null +++ b/boot/config-mhs32.txt @@ -0,0 +1,63 @@ +# For more options and information see +# http://www.raspberrypi.org/documentation/configuration/config-txt.md +# 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 +enable_uart=1 +# 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 +dtoverlay=mhs32 +hdmi_force_hotplug=1 +hdmi_group=2 +hdmi_mode=1 +hdmi_mode=87 +hdmi_cvt 480 320 60 6 0 0 0 +hdmi_drive=2 \ No newline at end of file diff --git a/boot/config-mhs35.txt b/boot/config-mhs35.txt new file mode 100755 index 0000000..51b2e27 --- /dev/null +++ b/boot/config-mhs35.txt @@ -0,0 +1,63 @@ +# For more options and information see +# http://www.raspberrypi.org/documentation/configuration/config-txt.md +# 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 +enable_uart=1 +# 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 +dtoverlay=mhs35:rotate=90 +hdmi_force_hotplug=1 +hdmi_group=2 +hdmi_mode=1 +hdmi_mode=87 +hdmi_cvt 480 320 60 6 0 0 0 +hdmi_drive=2 diff --git a/boot/config-mhs395.txt b/boot/config-mhs395.txt new file mode 100755 index 0000000..b9d3278 --- /dev/null +++ b/boot/config-mhs395.txt @@ -0,0 +1,63 @@ +# For more options and information see +# http://www.raspberrypi.org/documentation/configuration/config-txt.md +# 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 +enable_uart=1 +# 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 +dtoverlay=mhs395 +hdmi_force_hotplug=1 +hdmi_group=2 +hdmi_mode=1 +hdmi_mode=87 +hdmi_cvt 480 320 60 6 0 0 0 +hdmi_drive=2 \ No newline at end of file diff --git a/boot/config-mis35.txt b/boot/config-mis35.txt new file mode 100755 index 0000000..fc53c4a --- /dev/null +++ b/boot/config-mis35.txt @@ -0,0 +1,63 @@ +# For more options and information see +# http://www.raspberrypi.org/documentation/configuration/config-txt.md +# 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 +enable_uart=1 +# 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 +dtoverlay=mis35 +hdmi_force_hotplug=1 +hdmi_group=2 +hdmi_mode=1 +hdmi_mode=87 +hdmi_cvt 480 320 60 6 0 0 0 +hdmi_drive=2 diff --git a/boot/config-nomal.txt b/boot/config-nomal.txt old mode 100644 new mode 100755 index 9184c55..06364c5 --- a/boot/config-nomal.txt +++ b/boot/config-nomal.txt @@ -1,5 +1,5 @@ # For more options and information see -# http://www.raspberrypi.org/documentation/configuration/config-txt.md +# 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 @@ -22,7 +22,7 @@ #framebuffer_height=720 # uncomment if hdmi display is not detected and composite is being output -hdmi_force_hotplug=1 +#hdmi_force_hotplug=1 # uncomment to force a specific HDMI mode (this will force VGA) #hdmi_group=1 @@ -43,10 +43,10 @@ hdmi_force_hotplug=1 #arm_freq=800 # Uncomment some or all of these to enable the optional hardware interfaces -dtparam=i2c_arm=on +#dtparam=i2c_arm=on #dtparam=i2s=on -dtparam=spi=on -enable_uart=1 +#dtparam=spi=on + # Uncomment this to enable the lirc-rpi module #dtoverlay=lirc-rpi diff --git a/boot/config.txt.bak b/boot/config.txt.bak new file mode 100755 index 0000000..6888425 --- /dev/null +++ b/boot/config.txt.bak @@ -0,0 +1,66 @@ +# 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 +hdmi_force_hotplug=1 +dtparam=i2c_arm=on +dtparam=spi=on +enable_uart=1 +dtoverlay=mhs35:rotate=90 +hdmi_group=2 +hdmi_mode=1 +hdmi_mode=87 +hdmi_cvt 480 320 60 6 0 0 0 +hdmi_drive=2 diff --git a/etc/rc.local b/etc/rc.local new file mode 100755 index 0000000..4e385fd --- /dev/null +++ b/etc/rc.local @@ -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 diff --git a/etc/rc.local-original b/etc/rc.local-original new file mode 100755 index 0000000..7d39ed7 --- /dev/null +++ b/etc/rc.local-original @@ -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 diff --git a/rotate.sh b/rotate.sh new file mode 100755 index 0000000..5b5c499 --- /dev/null +++ b/rotate.sh @@ -0,0 +1,167 @@ +#!/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}'` + +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}'` +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 480 320/' /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 320 480/' /boot/config.txt +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 + diff --git a/rpi-fbcp b/rpi-fbcp new file mode 160000 index 0000000..af8d322 --- /dev/null +++ b/rpi-fbcp @@ -0,0 +1 @@ +Subproject commit af8d32246c23cb23e4030e6588668a14341f5ddc diff --git a/system_backup.sh b/system_backup.sh new file mode 100755 index 0000000..b177b06 --- /dev/null +++ b/system_backup.sh @@ -0,0 +1,75 @@ +#!/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 + +sudo cp -rf /boot/config.txt ./.system_backup +sudo cp -rf /usr/share/X11/xorg.conf.d/99-fbturbo.conf ./.system_backup/ +sudo cp -rf /boot/cmdline.txt ./.system_backup/ +sudo cp -rf /etc/rc.local ./.system_backup/ + +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 +fi diff --git a/system_restore.sh b/system_restore.sh new file mode 100755 index 0000000..e6342f2 --- /dev/null +++ b/system_restore.sh @@ -0,0 +1,93 @@ +#!/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 ./.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 diff --git a/usr/40-libinput.conf-MPI5001 b/usr/40-libinput.conf-0 old mode 100644 new mode 100755 similarity index 100% rename from usr/40-libinput.conf-MPI5001 rename to usr/40-libinput.conf-0 diff --git a/usr/40-libinput.conf-180 b/usr/40-libinput.conf-180 new file mode 100755 index 0000000..2f59e67 --- /dev/null +++ b/usr/40-libinput.conf-180 @@ -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 diff --git a/usr/40-libinput.conf-270 b/usr/40-libinput.conf-270 new file mode 100755 index 0000000..cdc3e19 --- /dev/null +++ b/usr/40-libinput.conf-270 @@ -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 diff --git a/usr/40-libinput.conf-90 b/usr/40-libinput.conf-90 new file mode 100755 index 0000000..b12d365 --- /dev/null +++ b/usr/40-libinput.conf-90 @@ -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 diff --git a/usr/40-libinput.conf-FLIP-H b/usr/40-libinput.conf-FLIP-H new file mode 100755 index 0000000..8bddc85 --- /dev/null +++ b/usr/40-libinput.conf-FLIP-H @@ -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 diff --git a/usr/40-libinput.conf-FLIP-V b/usr/40-libinput.conf-FLIP-V new file mode 100755 index 0000000..a10c4e1 --- /dev/null +++ b/usr/40-libinput.conf-FLIP-V @@ -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 diff --git a/usr/40-libinput.conf-HDMI7B b/usr/40-libinput.conf-HDMI7B old mode 100644 new mode 100755 diff --git a/usr/40-libinput.conf-HDMI7C b/usr/40-libinput.conf-HDMI7C old mode 100644 new mode 100755 diff --git a/usr/99-calibration.conf-24 b/usr/99-calibration.conf-24 old mode 100644 new mode 100755 diff --git a/usr/99-calibration.conf-28 b/usr/99-calibration.conf-28 old mode 100644 new mode 100755 diff --git a/usr/99-calibration.conf-32 b/usr/99-calibration.conf-32 old mode 100644 new mode 100755 diff --git a/usr/99-calibration.conf-35 b/usr/99-calibration.conf-35 old mode 100644 new mode 100755 diff --git a/usr/99-calibration.conf-3508 b/usr/99-calibration.conf-3508 old mode 100644 new mode 100755 diff --git a/usr/99-calibration.conf-397-0 b/usr/99-calibration.conf-397-0 new file mode 100755 index 0000000..6c2f2cc --- /dev/null +++ b/usr/99-calibration.conf-397-0 @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "calibration" + MatchProduct "ADS7846 Touchscreen" + Option "Calibration" "72 3916 182 4012" + Option "SwapAxes" "0" +EndSection diff --git a/usr/99-calibration.conf-397-180 b/usr/99-calibration.conf-397-180 new file mode 100755 index 0000000..a5cf2ec --- /dev/null +++ b/usr/99-calibration.conf-397-180 @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "calibration" + MatchProduct "ADS7846 Touchscreen" + Option "Calibration" "3916 72 4012 182" + Option "SwapAxes" "0" +EndSection diff --git a/usr/99-calibration.conf-397 b/usr/99-calibration.conf-397-270 old mode 100644 new mode 100755 similarity index 74% rename from usr/99-calibration.conf-397 rename to usr/99-calibration.conf-397-270 index 4e759e0..1f3a6b2 --- a/usr/99-calibration.conf-397 +++ b/usr/99-calibration.conf-397-270 @@ -1,6 +1,6 @@ Section "InputClass" Identifier "calibration" MatchProduct "ADS7846 Touchscreen" - Option "Calibration" "3865 158 289 3873" + Option "Calibration" "4012 182 72 3916" Option "SwapAxes" "1" EndSection diff --git a/usr/99-calibration.conf-397-90 b/usr/99-calibration.conf-397-90 new file mode 100755 index 0000000..40de086 --- /dev/null +++ b/usr/99-calibration.conf-397-90 @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "calibration" + MatchProduct "ADS7846 Touchscreen" + Option "Calibration" "182 4012 3916 72" + Option "SwapAxes" "1" +EndSection diff --git a/usr/99-calibration.conf-397-FLIP-H b/usr/99-calibration.conf-397-FLIP-H new file mode 100755 index 0000000..24d360f --- /dev/null +++ b/usr/99-calibration.conf-397-FLIP-H @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "calibration" + MatchProduct "ADS7846 Touchscreen" + Option "Calibration" "3916 72 182 4012" + Option "SwapAxes" "0" +EndSection diff --git a/usr/99-calibration.conf-397-FLIP-V b/usr/99-calibration.conf-397-FLIP-V new file mode 100755 index 0000000..b63870c --- /dev/null +++ b/usr/99-calibration.conf-397-FLIP-V @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "calibration" + MatchProduct "ADS7846 Touchscreen" + Option "Calibration" "72 3916 4012 182" + Option "SwapAxes" "0" +EndSection diff --git a/usr/99-calibration.conf-43 b/usr/99-calibration.conf-43 old mode 100644 new mode 100755 diff --git a/usr/99-calibration.conf-5 b/usr/99-calibration.conf-5 old mode 100644 new mode 100755 diff --git a/usr/99-calibration.conf-HDMI7C b/usr/99-calibration.conf-HDMI7C old mode 100644 new mode 100755 diff --git a/usr/99-calibration.conf-mhs24 b/usr/99-calibration.conf-mhs24 new file mode 100755 index 0000000..af6faea --- /dev/null +++ b/usr/99-calibration.conf-mhs24 @@ -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 diff --git a/usr/99-calibration.conf-mhs32 b/usr/99-calibration.conf-mhs32 new file mode 100755 index 0000000..044c457 --- /dev/null +++ b/usr/99-calibration.conf-mhs32 @@ -0,0 +1,9 @@ +Section "InputClass" + Identifier "calibration" + MatchProduct "ADS7846 Touchscreen" + Option "Calibration" "3713 158 3901 212" + Option "SwapAxes" "1" + Option "EmulateThirdButton" "1" + Option "EmulateThirdButtonTimeout" "1000" + Option "EmulateThirdButtonMoveThreshold" "300" +EndSection diff --git a/usr/99-calibration.conf-mhs35-0 b/usr/99-calibration.conf-mhs35-0 new file mode 100755 index 0000000..1576093 --- /dev/null +++ b/usr/99-calibration.conf-mhs35-0 @@ -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 diff --git a/usr/99-calibration.conf-mhs35-180 b/usr/99-calibration.conf-mhs35-180 new file mode 100755 index 0000000..9d81748 --- /dev/null +++ b/usr/99-calibration.conf-mhs35-180 @@ -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 diff --git a/usr/99-calibration.conf-mhs35-270 b/usr/99-calibration.conf-mhs35-270 new file mode 100755 index 0000000..f536459 --- /dev/null +++ b/usr/99-calibration.conf-mhs35-270 @@ -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 diff --git a/usr/99-calibration.conf-mhs35-90 b/usr/99-calibration.conf-mhs35-90 new file mode 100755 index 0000000..2df34e2 --- /dev/null +++ b/usr/99-calibration.conf-mhs35-90 @@ -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 diff --git a/usr/99-calibration.conf-mhs395 b/usr/99-calibration.conf-mhs395 new file mode 100755 index 0000000..2df34e2 --- /dev/null +++ b/usr/99-calibration.conf-mhs395 @@ -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 diff --git a/usr/99-fbturbo-fbcp.conf b/usr/99-fbturbo-fbcp.conf new file mode 100755 index 0000000..1f2fae0 --- /dev/null +++ b/usr/99-fbturbo-fbcp.conf @@ -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 diff --git a/usr/99-fbturbo.conf b/usr/99-fbturbo.conf old mode 100644 new mode 100755 diff --git a/usr/99-fbturbo.conf-HDMI b/usr/99-fbturbo.conf-HDMI old mode 100644 new mode 100755 diff --git a/usr/bcm2709-rpi-2-b.dtb b/usr/bcm2709-rpi-2-b.dtb old mode 100644 new mode 100755 diff --git a/usr/bcm2710-rpi-3-b.dtb b/usr/bcm2710-rpi-3-b.dtb old mode 100644 new mode 100755 diff --git a/usr/cmdline.txt b/usr/cmdline.txt old mode 100644 new mode 100755 diff --git a/usr/cmdline.txt_noobs b/usr/cmdline.txt-noobs old mode 100644 new mode 100755 similarity index 100% rename from usr/cmdline.txt_noobs rename to usr/cmdline.txt-noobs diff --git a/usr/inittab b/usr/inittab old mode 100644 new mode 100755 diff --git a/usr/mhs24-overlay.dtb b/usr/mhs24-overlay.dtb new file mode 100755 index 0000000..83ae9d7 Binary files /dev/null and b/usr/mhs24-overlay.dtb differ diff --git a/usr/mhs32-overlay.dtb b/usr/mhs32-overlay.dtb new file mode 100755 index 0000000..afb5864 Binary files /dev/null and b/usr/mhs32-overlay.dtb differ diff --git a/usr/mhs35-overlay.dtb b/usr/mhs35-overlay.dtb new file mode 100755 index 0000000..8e983db Binary files /dev/null and b/usr/mhs35-overlay.dtb differ diff --git a/usr/mhs395-overlay.dtb b/usr/mhs395-overlay.dtb new file mode 100755 index 0000000..f5576c3 Binary files /dev/null and b/usr/mhs395-overlay.dtb differ diff --git a/usr/mis35-overlay.dtb b/usr/mis35-overlay.dtb new file mode 100755 index 0000000..b583a2c Binary files /dev/null and b/usr/mis35-overlay.dtb differ diff --git a/usr/modules-HDMI b/usr/modules-HDMI old mode 100644 new mode 100755 diff --git a/usr/qddpi24.dtb b/usr/qddpi24.dtb old mode 100644 new mode 100755 diff --git a/usr/tft35a-overlay.dtb b/usr/tft35a-overlay.dtb old mode 100644 new mode 100755 index 31aeff9..b3ed2f3 Binary files a/usr/tft35a-overlay.dtb and b/usr/tft35a-overlay.dtb differ diff --git a/usr/tft9341-overlay.dtb b/usr/tft9341-overlay.dtb old mode 100644 new mode 100755 diff --git a/xinput-calibrator_0.7.5-1_armhf.deb b/xinput-calibrator_0.7.5-1_armhf.deb old mode 100644 new mode 100755 index bc5f57b..3ec2d5e Binary files a/xinput-calibrator_0.7.5-1_armhf.deb and b/xinput-calibrator_0.7.5-1_armhf.deb differ diff --git a/xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb b/xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb old mode 100644 new mode 100755 diff --git a/xserver-xorg-input-evdev_2.10.5-1_armhf.deb b/xserver-xorg-input-evdev_2.10.5-1_armhf.deb old mode 100644 new mode 100755