Skip to content

Instantly share code, notes, and snippets.

@dabumana
Created August 2, 2020 03:33
Show Gist options
  • Save dabumana/bd70940846969bdad4143fbda5ee1ff8 to your computer and use it in GitHub Desktop.
Save dabumana/bd70940846969bdad4143fbda5ee1ff8 to your computer and use it in GitHub Desktop.
TFT Screen installation
cd /tmp
wget https://github.com/goodtft/LCD-show/archive/master.zip
unzip master.zip
rm master.zip
cd LCD-show-master
cp usr/tft35a-overlay.dtb /boot/overlays/
mv usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
mkdir -p /etc/X11/xorg.conf.d
cp usr/99-calibration.conf-35-90 /etc/X11/xorg.conf.d/99-calibration.conf
mkdir -p /usr/share/X11/xorg.conf.d
cp usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/
sed -i 's/[[:blank:]]logo.nologo//' /boot/cmdline.txt
sed -i 's/[[:blank:]]fbcon=[^[:blank:]]*//g' /boot/cmdline.txt
echo "$(sed -n 1p /boot/cmdline.txt) fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo" > /boot/cmdline_new.txt
mv /boot/cmdline_new.txt /boot/cmdline.txt
G_CONFIG_INJECT 'dtoverlay=tft35a' 'dtoverlay=tft35a:rotate=90' /DietPi/config.txt
G_CONFIG_INJECT 'dtparam=i2c_arm=' 'dtparam=i2c_arm=on' /DietPi/config.txt
G_CONFIG_INJECT 'dtparam=spi=' 'dtparam=spi=on' /DietPi/config.txt
G_CONFIG_INJECT 'enable_uart=' 'enable_uart=1' /DietPi/config.txt
G_CONFIG_INJECT 'hdmi_force_hotplug=' 'hdmi_force_hotplug=1' /DietPi/config.txt
G_AGI xserver-xorg-input-evdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment