├── wiringpi-latest.deb ├── overlays └── tft35a-overlay.dtb ├── xinput-calibrator_0.7.5-1_armhf.deb ├── xserver-xorg-input-evdev_2.10.5-1_armhf.deb ├── xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb ├── xserver-xorg-input-evdev_1%3a2.10.5-1_armhf.deb ├── boot ├── cmdline.txt ├── cmdline.txt-noobs ├── config-nomal.txt ├── config-35.txt ├── config-70-HDMI-1024x600.txt ├── config-40-HDMI-480x320.txt ├── config-35-HDMI-480x320.txt ├── config-40-HDMI-600x400.txt └── config-35-HDMI-600x400.txt ├── config ├── 99-calibration.conf-35 ├── 99-calibration.conf-35-HDMI ├── 99-calibration.conf-40-HDMI ├── 99-fbturbo.conf ├── 99-fbturbo-fbcp.conf ├── 99-fbturbo.conf-HDMI └── 40-libinput.conf ├── LCD-hdmi ├── etc ├── rc.local-original ├── rc.local └── inittab ├── LCD70-HDMI-1024x600-show ├── LCD35-HDMI-480x320-show ├── LCD35-HDMI-600x400-show ├── LCD40-HDMI-480x320-show ├── LCD40-HDMI-600x400-show ├── README.md └── LCD35-show /wiringpi-latest.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcddiy/LCD-show/HEAD/wiringpi-latest.deb -------------------------------------------------------------------------------- /overlays/tft35a-overlay.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcddiy/LCD-show/HEAD/overlays/tft35a-overlay.dtb -------------------------------------------------------------------------------- /xinput-calibrator_0.7.5-1_armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcddiy/LCD-show/HEAD/xinput-calibrator_0.7.5-1_armhf.deb -------------------------------------------------------------------------------- /xserver-xorg-input-evdev_2.10.5-1_armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcddiy/LCD-show/HEAD/xserver-xorg-input-evdev_2.10.5-1_armhf.deb -------------------------------------------------------------------------------- /xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcddiy/LCD-show/HEAD/xserver-xorg-input-evdev_1%3a2.10.3-1_armhf.deb -------------------------------------------------------------------------------- /xserver-xorg-input-evdev_1%3a2.10.5-1_armhf.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lcddiy/LCD-show/HEAD/xserver-xorg-input-evdev_1%3a2.10.5-1_armhf.deb -------------------------------------------------------------------------------- /boot/cmdline.txt: -------------------------------------------------------------------------------- 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 2 | -------------------------------------------------------------------------------- /boot/cmdline.txt-noobs: -------------------------------------------------------------------------------- 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 2 | -------------------------------------------------------------------------------- /config/99-calibration.conf-35: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "calibration" 3 | MatchProduct "ADS7846 Touchscreen" 4 | Option "Calibration" "3951 106 3889 202" 5 | Option "SwapAxes" "1" 6 | EndSection 7 | -------------------------------------------------------------------------------- /config/99-calibration.conf-35-HDMI: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "calibration" 3 | MatchProduct "ADS7846 Touchscreen" 4 | Option "Calibration" "3972 113 3915 188" 5 | Option "SwapAxes" "1" 6 | EndSection 7 | -------------------------------------------------------------------------------- /config/99-calibration.conf-40-HDMI: -------------------------------------------------------------------------------- 1 | Section "InputClass" 2 | Identifier "calibration" 3 | MatchProduct "ADS7846 Touchscreen" 4 | Option "Calibration" "4003 217 3930 119" 5 | Option "SwapAxes" "1" 6 | EndSection 7 | -------------------------------------------------------------------------------- /LCD-hdmi: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo cp -rf ./config/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf 4 | sudo cp -rf ./boot/config-nomal.txt /boot/config.txt 5 | sudo echo "hdmi_force_hotplug=1" >> /boot/config.txt 6 | if [ -b /dev/mmcblk0p7 ]; then 7 | sudo cp ./boot/cmdline.txt-noobs /boot/cmdline.txt 8 | else 9 | sudo cp ./boot/cmdline.txt /boot/ 10 | fi 11 | sudo cp ./etc/inittab /etc/ 12 | sudo sync 13 | sudo sync 14 | 15 | echo "reboot now" 16 | sudo reboot 17 | 18 | -------------------------------------------------------------------------------- /etc/rc.local-original: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # 3 | # rc.local 4 | # 5 | # This script is executed at the end of each multiuser runlevel. 6 | # Make sure that the script will "exit 0" on success or any other 7 | # value on error. 8 | # 9 | # In order to enable or disable this script just change the execution 10 | # bits. 11 | # 12 | # By default this script does nothing. 13 | 14 | # Print the IP address 15 | _IP=$(hostname -I) || true 16 | if [ "$_IP" ]; then 17 | printf "My IP address is %s\n" "$_IP" 18 | fi 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /etc/rc.local: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # 3 | # rc.local 4 | # 5 | # This script is executed at the end of each multiuser runlevel. 6 | # Make sure that the script will "exit 0" on success or any other 7 | # value on error. 8 | # 9 | # In order to enable or disable this script just change the execution 10 | # bits. 11 | # 12 | # By default this script does nothing. 13 | 14 | # Print the IP address 15 | _IP=$(hostname -I) || true 16 | if [ "$_IP" ]; then 17 | printf "My IP address is %s\n" "$_IP" 18 | fi 19 | 20 | sleep 7 21 | fbcp & 22 | 23 | exit 0 24 | -------------------------------------------------------------------------------- /LCD70-HDMI-1024x600-show: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo cp -rf ./boot/config-70-HDMI-1024x600.txt /boot/config.txt 4 | if test "$root_dev" = "/dev/mmcblk0p7";then 5 | sudo cp ./boot/cmdline.txt-noobs /boot/cmdline.txt 6 | else 7 | sudo cp ./boot/cmdline.txt /boot/ 8 | fi 9 | sudo cp ./etc/inittab /etc/ 10 | sudo cp -rf ./config/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf 11 | if [ ! -d /etc/X11/xorg.conf.d ]; then 12 | sudo mkdir /etc/X11/xorg.conf.d 13 | fi 14 | sudo cp ./config/40-libinput.conf /etc/X11/xorg.conf.d/40-libinput.conf 15 | 16 | echo "reboot now" 17 | sudo reboot 18 | -------------------------------------------------------------------------------- /config/99-fbturbo.conf: -------------------------------------------------------------------------------- 1 | # This is a minimal sample config file, which can be copied to 2 | # /etc/X11/xorg.conf in order to make the Xorg server pick up 3 | # and load xf86-video-fbturbo driver installed in the system. 4 | # 5 | # When troubleshooting, check /var/log/Xorg.0.log for the debugging 6 | # output and error messages. 7 | # Run "man fbturbo" to get additional information about the extra 8 | # configuration options for tuning the driver. 9 | 10 | Section "Device" 11 | Identifier "Allwinner A10/A13/A20 FBDEV" 12 | Driver "fbturbo" 13 | Option "fbdev" "/dev/fb1" 14 | 15 | Option "SwapbuffersWait" "true" 16 | EndSection 17 | -------------------------------------------------------------------------------- /config/99-fbturbo-fbcp.conf: -------------------------------------------------------------------------------- 1 | # This is a minimal sample config file, which can be copied to 2 | # /etc/X11/xorg.conf in order to make the Xorg server pick up 3 | # and load xf86-video-fbturbo driver installed in the system. 4 | # 5 | # When troubleshooting, check /var/log/Xorg.0.log for the debugging 6 | # output and error messages. 7 | # Run "man fbturbo" to get additional information about the extra 8 | # configuration options for tuning the driver. 9 | 10 | Section "Device" 11 | Identifier "Allwinner A10/A13/A20 FBDEV" 12 | Driver "fbturbo" 13 | Option "fbdev" "/dev/fb0" 14 | 15 | Option "SwapbuffersWait" "true" 16 | EndSection 17 | -------------------------------------------------------------------------------- /config/99-fbturbo.conf-HDMI: -------------------------------------------------------------------------------- 1 | # This is a minimal sample config file, which can be copied to 2 | # /etc/X11/xorg.conf in order to make the Xorg server pick up 3 | # and load xf86-video-fbturbo driver installed in the system. 4 | # 5 | # When troubleshooting, check /var/log/Xorg.0.log for the debugging 6 | # output and error messages. 7 | # Run "man fbturbo" to get additional information about the extra 8 | # configuration options for tuning the driver. 9 | 10 | Section "Device" 11 | Identifier "Allwinner A10/A13/A20 FBDEV" 12 | Driver "fbturbo" 13 | Option "fbdev" "/dev/fb0" 14 | 15 | Option "SwapbuffersWait" "true" 16 | EndSection 17 | -------------------------------------------------------------------------------- /config/40-libinput.conf: -------------------------------------------------------------------------------- 1 | # Match on all types of devices but tablet devices and joysticks 2 | Section "InputClass" 3 | Identifier "libinput pointer catchall" 4 | MatchIsPointer "on" 5 | MatchDevicePath "/dev/input/event*" 6 | Driver "libinput" 7 | EndSection 8 | 9 | Section "InputClass" 10 | Identifier "libinput keyboard catchall" 11 | MatchIsKeyboard "on" 12 | MatchDevicePath "/dev/input/event*" 13 | Driver "libinput" 14 | EndSection 15 | 16 | Section "InputClass" 17 | Identifier "libinput touchpad catchall" 18 | MatchIsTouchpad "on" 19 | MatchDevicePath "/dev/input/event*" 20 | Driver "libinput" 21 | EndSection 22 | 23 | Section "InputClass" 24 | Identifier "libinput touchscreen catchall" 25 | MatchIsTouchscreen "on" 26 | Option "CalibrationMatrix" "1 0 0 0 1 0 0 0 1" 27 | MatchDevicePath "/dev/input/event*" 28 | Driver "libinput" 29 | EndSection 30 | 31 | Section "InputClass" 32 | Identifier "libinput tablet catchall" 33 | MatchIsTablet "on" 34 | MatchDevicePath "/dev/input/event*" 35 | Driver "libinput" 36 | EndSection 37 | -------------------------------------------------------------------------------- /LCD35-HDMI-480x320-show: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then 4 | sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf 5 | fi 6 | if [ ! -d /etc/X11/xorg.conf.d ]; then 7 | sudo mkdir -p /etc/X11/xorg.conf.d 8 | fi 9 | 10 | sudo cp -rf ./boot/config-35-HDMI-480x320.txt /boot/config.txt 11 | if [ -b /dev/mmcblk0p7 ]; then 12 | sudo cp ./boot/cmdline.txt-noobs /boot/cmdline.txt 13 | else 14 | sudo cp ./boot/cmdline.txt /boot/ 15 | fi 16 | sudo cp ./etc/inittab /etc/ 17 | sudo cp -rf ./config/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf 18 | sudo cp -rf ./config/99-calibration.conf-35-HDMI /etc/X11/xorg.conf.d/99-calibration.conf 19 | nodeplatform=`uname -n` 20 | kernel=`uname -r` 21 | version=`cat /proc/version` 22 | if test "$nodeplatform" = "raspberrypi";then 23 | echo "this is raspberrypi kernel" 24 | version=${version##* } 25 | echo $version 26 | if test $version -lt 2017;then 27 | echo "reboot" 28 | else 29 | echo "need to update touch configuration" 30 | sudo apt-get install xserver-xorg-input-evdev 31 | sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf 32 | echo "reboot" 33 | fi 34 | else 35 | echo "this is not raspberrypi kernel, no need to update touch configure, reboot" 36 | fi 37 | sudo reboot 38 | 39 | -------------------------------------------------------------------------------- /LCD35-HDMI-600x400-show: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then 4 | sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf 5 | fi 6 | if [ ! -d /etc/X11/xorg.conf.d ]; then 7 | sudo mkdir -p /etc/X11/xorg.conf.d 8 | fi 9 | 10 | sudo cp -rf ./boot/config-35-HDMI-600x400.txt /boot/config.txt 11 | if [ -b /dev/mmcblk0p7 ]; then 12 | sudo cp ./boot/cmdline.txt-noobs /boot/cmdline.txt 13 | else 14 | sudo cp ./boot/cmdline.txt /boot/ 15 | fi 16 | sudo cp ./etc/inittab /etc/ 17 | sudo cp -rf ./config/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf 18 | sudo cp -rf ./config/99-calibration.conf-35-HDMI /etc/X11/xorg.conf.d/99-calibration.conf 19 | nodeplatform=`uname -n` 20 | kernel=`uname -r` 21 | version=`cat /proc/version` 22 | if test "$nodeplatform" = "raspberrypi";then 23 | echo "this is raspberrypi kernel" 24 | version=${version##* } 25 | echo $version 26 | if test $version -lt 2017;then 27 | echo "reboot" 28 | else 29 | echo "need to update touch configuration" 30 | sudo apt-get install xserver-xorg-input-evdev 31 | sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf 32 | echo "reboot" 33 | fi 34 | else 35 | echo "this is not raspberrypi kernel, no need to update touch configure, reboot" 36 | fi 37 | sudo reboot 38 | 39 | -------------------------------------------------------------------------------- /LCD40-HDMI-480x320-show: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then 4 | sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf 5 | fi 6 | if [ ! -d /etc/X11/xorg.conf.d ]; then 7 | sudo mkdir -p /etc/X11/xorg.conf.d 8 | fi 9 | 10 | sudo cp -rf ./boot/config-40-HDMI-480x320.txt /boot/config.txt 11 | if [ -b /dev/mmcblk0p7 ]; then 12 | sudo cp ./boot/cmdline.txt-noobs /boot/cmdline.txt 13 | else 14 | sudo cp ./boot/cmdline.txt /boot/ 15 | fi 16 | sudo cp ./etc/inittab /etc/ 17 | sudo cp -rf ./config/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf 18 | sudo cp -rf ./config/99-calibration.conf-40-HDMI /etc/X11/xorg.conf.d/99-calibration.conf 19 | nodeplatform=`uname -n` 20 | kernel=`uname -r` 21 | version=`cat /proc/version` 22 | if test "$nodeplatform" = "raspberrypi";then 23 | echo "this is raspberrypi kernel" 24 | version=${version##* } 25 | echo $version 26 | if test $version -lt 2017;then 27 | echo "reboot" 28 | else 29 | echo "need to update touch configuration" 30 | sudo apt-get install xserver-xorg-input-evdev 31 | sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf 32 | echo "reboot" 33 | fi 34 | else 35 | echo "this is not raspberrypi kernel, no need to update touch configure, reboot" 36 | fi 37 | sudo reboot 38 | 39 | -------------------------------------------------------------------------------- /LCD40-HDMI-600x400-show: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then 4 | sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf 5 | fi 6 | if [ ! -d /etc/X11/xorg.conf.d ]; then 7 | sudo mkdir -p /etc/X11/xorg.conf.d 8 | fi 9 | 10 | sudo cp -rf ./boot/config-40-HDMI-600x400.txt /boot/config.txt 11 | if [ -b /dev/mmcblk0p7 ]; then 12 | sudo cp ./boot/cmdline.txt-noobs /boot/cmdline.txt 13 | else 14 | sudo cp ./boot/cmdline.txt /boot/ 15 | fi 16 | sudo cp ./etc/inittab /etc/ 17 | sudo cp -rf ./config/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf 18 | sudo cp -rf ./config/99-calibration.conf-40-HDMI /etc/X11/xorg.conf.d/99-calibration.conf 19 | nodeplatform=`uname -n` 20 | kernel=`uname -r` 21 | version=`cat /proc/version` 22 | if test "$nodeplatform" = "raspberrypi";then 23 | echo "this is raspberrypi kernel" 24 | version=${version##* } 25 | echo $version 26 | if test $version -lt 2017;then 27 | echo "reboot" 28 | else 29 | echo "need to update touch configuration" 30 | sudo apt-get install xserver-xorg-input-evdev 31 | sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf 32 | echo "reboot" 33 | fi 34 | else 35 | echo "this is not raspberrypi kernel, no need to update touch configure, reboot" 36 | fi 37 | sudo reboot 38 | 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # How to install the driver 2 | 3 | -------for 3.5inch GPIO-------------- \ 4 | sudo rm -rf LCD-show \ 5 | git clone https://github.com/lcddiy/LCD-show.git \ 6 | chmod -R 755 LCD-show \ 7 | cd LCD-show \ 8 | sudo ./LCD35-show 9 | 10 | 11 | -------for 3.5inch HDMI 480X320-------------- \ 12 | sudo rm -rf LCD-show \ 13 | git clone https://github.com/lcddiy/LCD-show.git \ 14 | chmod -R 755 LCD-show \ 15 | cd LCD-show \ 16 | sudo ./LCD35-HDMI-480x320-show 17 | 18 | 19 | -------for 3.5inch HDMI 600X400-------------- \ 20 | sudo rm -rf LCD-show \ 21 | git clone https://github.com/lcddiy/LCD-show.git \ 22 | chmod -R 755 LCD-show \ 23 | cd LCD-show \ 24 | sudo ./LCD35-HDMI-600x400-show 25 | 26 | 27 | -------for 4.0inch HDMI 480X320-------------- \ 28 | sudo rm -rf LCD-show \ 29 | git clone https://github.com/lcddiy/LCD-show.git \ 30 | chmod -R 755 LCD-show \ 31 | cd LCD-show \ 32 | sudo ./LCD40-HDMI-480x320-show 33 | 34 | 35 | -------for 4.0inch HDMI 600X400-------------- \ 36 | sudo rm -rf LCD-show \ 37 | git clone https://github.com/lcddiy/LCD-show.git \ 38 | chmod -R 755 LCD-show \ 39 | cd LCD-show \ 40 | sudo ./LCD40-HDMI-600x400-show 41 | 42 | -------for 7.0inch HDMI 1024X600-------------- \ 43 | sudo rm -rf LCD-show \ 44 | git clone https://github.com/lcddiy/LCD-show.git \ 45 | chmod -R 755 LCD-show \ 46 | cd LCD-show \ 47 | sudo ./LCD70-HDMI-1024x600-show 48 | 49 | -------for HDMI recovery-------------- \ 50 | sudo rm -rf LCD-show \ 51 | git clone https://github.com/lcddiy/LCD-show.git \ 52 | chmod -R 755 LCD-show \ 53 | cd LCD-show \ 54 | sudo ./LCD-hdmi 55 | -------------------------------------------------------------------------------- /boot/config-nomal.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rpf.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # uncomment if you get no picture on HDMI for a default "safe" mode 6 | #hdmi_safe=1 7 | 8 | # uncomment this if your display has a black border of unused pixels visible 9 | # and your display can output without overscan 10 | #disable_overscan=1 11 | 12 | # uncomment the following to adjust overscan. Use positive numbers if console 13 | # goes off screen, and negative if there is too much border 14 | #overscan_left=16 15 | #overscan_right=16 16 | #overscan_top=16 17 | #overscan_bottom=16 18 | 19 | # uncomment to force a console size. By default it will be display's size minus 20 | # overscan. 21 | #framebuffer_width=1280 22 | #framebuffer_height=720 23 | 24 | # uncomment if hdmi display is not detected and composite is being output 25 | #hdmi_force_hotplug=1 26 | 27 | # uncomment to force a specific HDMI mode (this will force VGA) 28 | #hdmi_group=1 29 | #hdmi_mode=1 30 | 31 | # uncomment to force a HDMI mode rather than DVI. This can make audio work in 32 | # DMT (computer monitor) modes 33 | #hdmi_drive=2 34 | 35 | # uncomment to increase signal to HDMI, if you have interference, blanking, or 36 | # no display 37 | #config_hdmi_boost=4 38 | 39 | # uncomment for composite PAL 40 | #sdtv_mode=2 41 | 42 | #uncomment to overclock the arm. 700 MHz is the default. 43 | #arm_freq=800 44 | 45 | # Uncomment some or all of these to enable the optional hardware interfaces 46 | #dtparam=i2c_arm=on 47 | #dtparam=i2s=on 48 | #dtparam=spi=on 49 | 50 | # Uncomment this to enable the lirc-rpi module 51 | #dtoverlay=lirc-rpi 52 | 53 | # Additional overlays and parameters are documented /boot/overlays/README 54 | 55 | # Enable audio (loads snd_bcm2835) 56 | dtparam=audio=on 57 | 58 | [pi4] 59 | # Enable DRM VC4 V3D driver on top of the dispmanx display stack 60 | #dtoverlay=vc4-fkms-v3d 61 | #max_framebuffers=2 62 | 63 | [all] 64 | #dtoverlay=vc4-fkms-v3d 65 | -------------------------------------------------------------------------------- /boot/config-35.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rpf.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # uncomment if you get no picture on HDMI for a default "safe" mode 6 | #hdmi_safe=1 7 | 8 | # uncomment this if your display has a black border of unused pixels visible 9 | # and your display can output without overscan 10 | #disable_overscan=1 11 | 12 | # uncomment the following to adjust overscan. Use positive numbers if console 13 | # goes off screen, and negative if there is too much border 14 | #overscan_left=16 15 | #overscan_right=16 16 | #overscan_top=16 17 | #overscan_bottom=16 18 | 19 | # uncomment to force a console size. By default it will be display's size minus 20 | # overscan. 21 | #framebuffer_width=1280 22 | #framebuffer_height=720 23 | 24 | # uncomment if hdmi display is not detected and composite is being output 25 | hdmi_force_hotplug=1 26 | 27 | # uncomment to force a specific HDMI mode (this will force VGA) 28 | #hdmi_group=1 29 | #hdmi_mode=1 30 | 31 | # uncomment to force a HDMI mode rather than DVI. This can make audio work in 32 | # DMT (computer monitor) modes 33 | hdmi_drive=2 34 | 35 | # uncomment to increase signal to HDMI, if you have interference, blanking, or 36 | # no display 37 | #config_hdmi_boost=4 38 | 39 | # uncomment for composite PAL 40 | #sdtv_mode=2 41 | 42 | #uncomment to overclock the arm. 700 MHz is the default. 43 | #arm_freq=800 44 | 45 | # Uncomment some or all of these to enable the optional hardware interfaces 46 | dtparam=i2c_arm=on 47 | #dtparam=i2s=on 48 | dtparam=spi=on 49 | 50 | # Uncomment this to enable the lirc-rpi module 51 | #dtoverlay=lirc-rpi 52 | 53 | # Additional overlays and parameters are documented /boot/overlays/README 54 | 55 | # Enable audio (loads snd_bcm2835) 56 | dtparam=audio=on 57 | 58 | [pi4] 59 | # Enable DRM VC4 V3D driver on top of the dispmanx display stack 60 | #dtoverlay=vc4-fkms-v3d 61 | #max_framebuffers=2 62 | 63 | [all] 64 | #dtoverlay=vc4-fkms-v3d 65 | 66 | enable_uart=1 67 | dtoverlay=tft35a:rotate=90 68 | hdmi_group=2 69 | hdmi_mode=1 70 | hdmi_mode=87 71 | hdmi_cvt 480 320 60 6 0 0 0 72 | -------------------------------------------------------------------------------- /boot/config-70-HDMI-1024x600.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rpf.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # uncomment if you get no picture on HDMI for a default "safe" mode 6 | #hdmi_safe=1 7 | 8 | # uncomment this if your display has a black border of unused pixels visible 9 | # and your display can output without overscan 10 | #disable_overscan=1 11 | 12 | # uncomment the following to adjust overscan. Use positive numbers if console 13 | # goes off screen, and negative if there is too much border 14 | #overscan_left=16 15 | #overscan_right=16 16 | #overscan_top=16 17 | #overscan_bottom=16 18 | 19 | # uncomment to force a console size. By default it will be display's size minus 20 | # overscan. 21 | #framebuffer_width=1280 22 | #framebuffer_height=720 23 | 24 | # uncomment if hdmi display is not detected and composite is being output 25 | hdmi_force_hotplug=1 26 | 27 | # uncomment to force a specific HDMI mode (this will force VGA) 28 | #hdmi_group=1 29 | #hdmi_mode=1 30 | 31 | # uncomment to force a HDMI mode rather than DVI. This can make audio work in 32 | # DMT (computer monitor) modes 33 | #hdmi_drive=2 34 | 35 | # uncomment to increase signal to HDMI, if you have interference, blanking, or 36 | # no display 37 | #config_hdmi_boost=4 38 | 39 | # uncomment for composite PAL 40 | #sdtv_mode=2 41 | 42 | #uncomment to overclock the arm. 700 MHz is the default. 43 | #arm_freq=800 44 | 45 | # Uncomment some or all of these to enable the optional hardware interfaces 46 | dtparam=i2c_arm=on 47 | #dtparam=i2s=on 48 | dtparam=spi=on 49 | 50 | # Uncomment this to enable infrared communication. 51 | #dtoverlay=gpio-ir,gpio_pin=17 52 | #dtoverlay=gpio-ir-tx,gpio_pin=18 53 | 54 | # Additional overlays and parameters are documented /boot/overlays/README 55 | 56 | # Enable audio (loads snd_bcm2835) 57 | dtparam=audio=on 58 | 59 | [pi4] 60 | # Enable DRM VC4 V3D driver on top of the dispmanx display stack 61 | dtoverlay=vc4-fkms-v3d 62 | max_framebuffers=2 63 | 64 | [all] 65 | #dtoverlay=vc4-fkms-v3d 66 | 67 | enable_uart=1 68 | max_usb_current=1 69 | config_hdmi_boost=7 70 | hdmi_group=2 71 | hdmi_mode=1 72 | hdmi_mode=87 73 | hdmi_drive=1 74 | hdmi_cvt 1024 600 60 6 0 0 0 75 | -------------------------------------------------------------------------------- /boot/config-40-HDMI-480x320.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rpf.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # uncomment if you get no picture on HDMI for a default "safe" mode 6 | #hdmi_safe=1 7 | 8 | # uncomment this if your display has a black border of unused pixels visible 9 | # and your display can output without overscan 10 | #disable_overscan=1 11 | 12 | # uncomment the following to adjust overscan. Use positive numbers if console 13 | # goes off screen, and negative if there is too much border 14 | #overscan_left=16 15 | #overscan_right=16 16 | #overscan_top=16 17 | #overscan_bottom=16 18 | 19 | # uncomment to force a console size. By default it will be display's size minus 20 | # overscan. 21 | #framebuffer_width=1280 22 | #framebuffer_height=720 23 | 24 | # uncomment if hdmi display is not detected and composite is being output 25 | hdmi_force_hotplug=1 26 | 27 | # uncomment to force a specific HDMI mode (this will force VGA) 28 | #hdmi_group=1 29 | hdmi_mode=1 30 | 31 | # uncomment to force a HDMI mode rather than DVI. This can make audio work in 32 | # DMT (computer monitor) modes 33 | hdmi_drive=1 34 | 35 | # uncomment to increase signal to HDMI, if you have interference, blanking, or 36 | # no display 37 | #config_hdmi_boost=4 38 | 39 | # uncomment for composite PAL 40 | #sdtv_mode=2 41 | 42 | #uncomment to overclock the arm. 700 MHz is the default. 43 | #arm_freq=800 44 | 45 | # Uncomment some or all of these to enable the optional hardware interfaces 46 | dtparam=i2c_arm=on 47 | #dtparam=i2s=on 48 | dtparam=spi=on 49 | 50 | # Uncomment this to enable the lirc-rpi module 51 | #dtoverlay=lirc-rpi 52 | 53 | # Additional overlays and parameters are documented /boot/overlays/README 54 | 55 | # Enable audio (loads snd_bcm2835) 56 | dtparam=audio=on 57 | 58 | [pi4] 59 | # Enable DRM VC4 V3D driver on top of the dispmanx display stack 60 | #dtoverlay=vc4-fkms-v3d 61 | #max_framebuffers=2 62 | 63 | [all] 64 | #dtoverlay=vc4-fkms-v3d 65 | 66 | enable_uart=1 67 | max_usb_current=1 68 | config_hdmi_boost=7 69 | hdmi_group=2 70 | hdmi_mode=87 71 | hdmi_cvt 480 320 60 6 0 0 0 72 | 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" 73 | 74 | -------------------------------------------------------------------------------- /boot/config-35-HDMI-480x320.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rpf.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # uncomment if you get no picture on HDMI for a default "safe" mode 6 | #hdmi_safe=1 7 | 8 | # uncomment this if your display has a black border of unused pixels visible 9 | # and your display can output without overscan 10 | #disable_overscan=1 11 | 12 | # uncomment the following to adjust overscan. Use positive numbers if console 13 | # goes off screen, and negative if there is too much border 14 | #overscan_left=16 15 | #overscan_right=16 16 | #overscan_top=16 17 | #overscan_bottom=16 18 | 19 | # uncomment to force a console size. By default it will be display's size minus 20 | # overscan. 21 | #framebuffer_width=1280 22 | #framebuffer_height=720 23 | 24 | # uncomment if hdmi display is not detected and composite is being output 25 | hdmi_force_hotplug=1 26 | 27 | # uncomment to force a specific HDMI mode (this will force VGA) 28 | #hdmi_group=1 29 | hdmi_mode=1 30 | 31 | # uncomment to force a HDMI mode rather than DVI. This can make audio work in 32 | # DMT (computer monitor) modes 33 | hdmi_drive=1 34 | 35 | # uncomment to increase signal to HDMI, if you have interference, blanking, or 36 | # no display 37 | #config_hdmi_boost=4 38 | 39 | # uncomment for composite PAL 40 | #sdtv_mode=2 41 | 42 | #uncomment to overclock the arm. 700 MHz is the default. 43 | #arm_freq=800 44 | 45 | # Uncomment some or all of these to enable the optional hardware interfaces 46 | dtparam=i2c_arm=on 47 | #dtparam=i2s=on 48 | dtparam=spi=on 49 | 50 | # Uncomment this to enable the lirc-rpi module 51 | #dtoverlay=lirc-rpi 52 | 53 | # Additional overlays and parameters are documented /boot/overlays/README 54 | 55 | # Enable audio (loads snd_bcm2835) 56 | dtparam=audio=on 57 | 58 | [pi4] 59 | # Enable DRM VC4 V3D driver on top of the dispmanx display stack 60 | #dtoverlay=vc4-fkms-v3d 61 | #max_framebuffers=2 62 | 63 | [all] 64 | #dtoverlay=vc4-fkms-v3d 65 | 66 | enable_uart=1 67 | max_usb_current=1 68 | config_hdmi_boost=7 69 | hdmi_group=2 70 | hdmi_mode=87 71 | hdmi_cvt 480 320 60 6 0 0 0 72 | 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" 73 | 74 | 75 | -------------------------------------------------------------------------------- /boot/config-40-HDMI-600x400.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rpf.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # uncomment if you get no picture on HDMI for a default "safe" mode 6 | #hdmi_safe=1 7 | 8 | # uncomment this if your display has a black border of unused pixels visible 9 | # and your display can output without overscan 10 | #disable_overscan=1 11 | 12 | # uncomment the following to adjust overscan. Use positive numbers if console 13 | # goes off screen, and negative if there is too much border 14 | #overscan_left=16 15 | #overscan_right=16 16 | #overscan_top=16 17 | #overscan_bottom=16 18 | 19 | # uncomment to force a console size. By default it will be display's size minus 20 | # overscan. 21 | #framebuffer_width=1280 22 | #framebuffer_height=720 23 | 24 | # uncomment if hdmi display is not detected and composite is being output 25 | hdmi_force_hotplug=1 26 | 27 | # uncomment to force a specific HDMI mode (this will force VGA) 28 | #hdmi_group=1 29 | hdmi_mode=1 30 | 31 | # uncomment to force a HDMI mode rather than DVI. This can make audio work in 32 | # DMT (computer monitor) modes 33 | hdmi_drive=1 34 | 35 | # uncomment to increase signal to HDMI, if you have interference, blanking, or 36 | # no display 37 | #config_hdmi_boost=4 38 | 39 | # uncomment for composite PAL 40 | #sdtv_mode=2 41 | 42 | #uncomment to overclock the arm. 700 MHz is the default. 43 | #arm_freq=800 44 | 45 | # Uncomment some or all of these to enable the optional hardware interfaces 46 | dtparam=i2c_arm=on 47 | #dtparam=i2s=on 48 | dtparam=spi=on 49 | 50 | # Uncomment this to enable the lirc-rpi module 51 | #dtoverlay=lirc-rpi 52 | 53 | # Additional overlays and parameters are documented /boot/overlays/README 54 | 55 | # Enable audio (loads snd_bcm2835) 56 | dtparam=audio=on 57 | 58 | [pi4] 59 | # Enable DRM VC4 V3D driver on top of the dispmanx display stack 60 | #dtoverlay=vc4-fkms-v3d 61 | #max_framebuffers=2 62 | 63 | [all] 64 | #dtoverlay=vc4-fkms-v3d 65 | 66 | enable_uart=1 67 | max_usb_current=1 68 | config_hdmi_boost=7 69 | hdmi_group=2 70 | hdmi_mode=87 71 | hdmi_timings=600 0 20 28 48 400 0 13 3 32 0 0 0 30 0 25000000 5 72 | 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" 73 | 74 | -------------------------------------------------------------------------------- /boot/config-35-HDMI-600x400.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rpf.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # uncomment if you get no picture on HDMI for a default "safe" mode 6 | #hdmi_safe=1 7 | 8 | # uncomment this if your display has a black border of unused pixels visible 9 | # and your display can output without overscan 10 | #disable_overscan=1 11 | 12 | # uncomment the following to adjust overscan. Use positive numbers if console 13 | # goes off screen, and negative if there is too much border 14 | #overscan_left=16 15 | #overscan_right=16 16 | #overscan_top=16 17 | #overscan_bottom=16 18 | 19 | # uncomment to force a console size. By default it will be display's size minus 20 | # overscan. 21 | #framebuffer_width=1280 22 | #framebuffer_height=720 23 | 24 | # uncomment if hdmi display is not detected and composite is being output 25 | hdmi_force_hotplug=1 26 | 27 | # uncomment to force a specific HDMI mode (this will force VGA) 28 | #hdmi_group=1 29 | hdmi_mode=1 30 | 31 | # uncomment to force a HDMI mode rather than DVI. This can make audio work in 32 | # DMT (computer monitor) modes 33 | hdmi_drive=1 34 | 35 | # uncomment to increase signal to HDMI, if you have interference, blanking, or 36 | # no display 37 | #config_hdmi_boost=4 38 | 39 | # uncomment for composite PAL 40 | #sdtv_mode=2 41 | 42 | #uncomment to overclock the arm. 700 MHz is the default. 43 | #arm_freq=800 44 | 45 | # Uncomment some or all of these to enable the optional hardware interfaces 46 | dtparam=i2c_arm=on 47 | #dtparam=i2s=on 48 | dtparam=spi=on 49 | 50 | # Uncomment this to enable the lirc-rpi module 51 | #dtoverlay=lirc-rpi 52 | 53 | # Additional overlays and parameters are documented /boot/overlays/README 54 | 55 | # Enable audio (loads snd_bcm2835) 56 | dtparam=audio=on 57 | 58 | [pi4] 59 | # Enable DRM VC4 V3D driver on top of the dispmanx display stack 60 | #dtoverlay=vc4-fkms-v3d 61 | #max_framebuffers=2 62 | 63 | [all] 64 | #dtoverlay=vc4-fkms-v3d 65 | 66 | enable_uart=1 67 | max_usb_current=1 68 | config_hdmi_boost=7 69 | hdmi_group=2 70 | hdmi_mode=87 71 | hdmi_timings=600 0 20 28 48 400 0 13 3 32 0 0 0 30 0 25000000 5 72 | 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" 73 | 74 | 75 | -------------------------------------------------------------------------------- /etc/inittab: -------------------------------------------------------------------------------- 1 | # /etc/inittab: init(8) configuration. 2 | # $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $ 3 | 4 | # The default runlevel. 5 | id:2:initdefault: 6 | 7 | # Boot-time system configuration/initialization script. 8 | # This is run first except when booting in emergency (-b) mode. 9 | si::sysinit:/etc/init.d/rcS 10 | 11 | # What to do in single-user mode. 12 | ~~:S:wait:/sbin/sulogin 13 | 14 | # /etc/init.d executes the S and K scripts upon change 15 | # of runlevel. 16 | # 17 | # Runlevel 0 is halt. 18 | # Runlevel 1 is single-user. 19 | # Runlevels 2-5 are multi-user. 20 | # Runlevel 6 is reboot. 21 | 22 | l0:0:wait:/etc/init.d/rc 0 23 | l1:1:wait:/etc/init.d/rc 1 24 | l2:2:wait:/etc/init.d/rc 2 25 | l3:3:wait:/etc/init.d/rc 3 26 | l4:4:wait:/etc/init.d/rc 4 27 | l5:5:wait:/etc/init.d/rc 5 28 | l6:6:wait:/etc/init.d/rc 6 29 | # Normally not reached, but fallthrough in case of emergency. 30 | z6:6:respawn:/sbin/sulogin 31 | 32 | # What to do when CTRL-ALT-DEL is pressed. 33 | ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now 34 | 35 | # Action on special keypress (ALT-UpArrow). 36 | #kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work." 37 | 38 | # What to do when the power fails/returns. 39 | pf::powerwait:/etc/init.d/powerfail start 40 | pn::powerfailnow:/etc/init.d/powerfail now 41 | po::powerokwait:/etc/init.d/powerfail stop 42 | 43 | # /sbin/getty invocations for the runlevels. 44 | # 45 | # The "id" field MUST be the same as the last 46 | # characters of the device (after "tty"). 47 | # 48 | # Format: 49 | # ::: 50 | # 51 | # Note that on most Debian systems tty7 is used by the X Window System, 52 | # so if you want to add more getty's go ahead but skip tty7 if you run X. 53 | # 54 | 1:2345:respawn:/sbin/getty --noclear 38400 tty1 55 | 2:23:respawn:/sbin/getty 38400 tty2 56 | 3:23:respawn:/sbin/getty 38400 tty3 57 | 4:23:respawn:/sbin/getty 38400 tty4 58 | 5:23:respawn:/sbin/getty 38400 tty5 59 | 6:23:respawn:/sbin/getty 38400 tty6 60 | 61 | # Example how to put a getty on a serial line (for a terminal) 62 | # 63 | #T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 64 | #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100 65 | 66 | # Example how to put a getty on a modem line. 67 | # 68 | #T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 69 | 70 | 71 | #Spawn a getty on Raspberry Pi serial line 72 | T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 73 | -------------------------------------------------------------------------------- /LCD35-show: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -f /etc/X11/xorg.conf.d/40-libinput.conf ]; then 4 | sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf 5 | fi 6 | if [ ! -d /etc/X11/xorg.conf.d ]; then 7 | sudo mkdir -p /etc/X11/xorg.conf.d 8 | fi 9 | sudo cp ./overlays/tft35a-overlay.dtb /boot/overlays/ 10 | sudo cp ./overlays/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo 11 | sudo cp -rf ./boot/config-35.txt /boot/config.txt 12 | sudo cp -rf ./config/99-calibration.conf-35 /etc/X11/xorg.conf.d/99-calibration.conf 13 | sudo cp -rf ./config/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf 14 | if [ -b /dev/mmcblk0p7 ]; then 15 | sudo cp ./boot/cmdline.txt-noobs /boot/cmdline.txt 16 | else 17 | sudo cp ./boot/cmdline.txt /boot/ 18 | fi 19 | sudo cp ./etc/inittab /etc/ 20 | 21 | #FBCP install 22 | wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ 23 | if [ $? -eq 0 ]; then 24 | sudo apt-get update 25 | sudo apt-get install cmake -y 26 | type cmake > /dev/null 2>&1 27 | if [ $? -eq 0 ]; then 28 | sudo rm -rf rpi-fbcp 29 | wget --spider -q -o /dev/null --tries=1 -T 10 https://github.com 30 | if [ $? -eq 0 ]; then 31 | sudo git clone https://github.com/tasanakorn/rpi-fbcp 32 | if [ $? -ne 0 ]; then 33 | echo "git fbcp error, copy native fbcp!!!" 34 | sudo cp -r ./config/rpi-fbcp . 35 | fi 36 | else 37 | echo "network error, copy native fbcp!!!" 38 | sudo cp -r ./config/rpi-fbcp . 39 | fi 40 | sudo mkdir ./rpi-fbcp/build 41 | cd ./rpi-fbcp/build/ 42 | sudo cmake .. 43 | sudo make 44 | sudo install fbcp /usr/local/bin/fbcp 45 | cd - > /dev/null 46 | type fbcp > /dev/null 2>&1 47 | if [ $? -eq 0 ]; then 48 | sudo cp -rf ./config/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf 49 | sudo cp -rf ./etc/rc.local /etc/rc.local 50 | fi 51 | else 52 | echo "install cmake error!!!!" 53 | fi 54 | else 55 | echo "network error, can't install cmake!!!" 56 | fi 57 | 58 | #evdev install 59 | nodeplatform=`uname -n` 60 | kernel=`uname -r` 61 | version=`cat /proc/version` 62 | if test "$nodeplatform" = "raspberrypi";then 63 | echo "this is raspberrypi kernel" 64 | version=${version##* } 65 | #version=${version#*#} 66 | echo $version 67 | if test $version -lt 2017;then 68 | echo "reboot" 69 | else 70 | echo "need to update touch configuration" 71 | sudo apt-get install xserver-xorg-input-evdev 72 | sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf 73 | echo "reboot" 74 | fi 75 | else 76 | echo "this is not raspberrypi kernel, no need to update touch configure, reboot" 77 | fi 78 | sudo reboot 79 | --------------------------------------------------------------------------------