Skip to content

Commit

Permalink
update driver to fit new system
Browse files Browse the repository at this point in the history
  • Loading branch information
goodtft committed Jan 2, 2024
1 parent 1cd5ea1 commit 6320e61
Show file tree
Hide file tree
Showing 31 changed files with 167 additions and 27 deletions.
3 changes: 2 additions & 1 deletion LCD101H-show
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp ./usr/cmdline.txt /boot/
#fi
sudo cp ./usr/inittab /etc/
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf

fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
Expand Down
7 changes: 4 additions & 3 deletions LCD101S-show
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ sudo ./system_backup.sh
#fi

source ./system_config.sh
sudo sed -i -e 's/#dtoverlay=vc4-fkms-v3d/dtoverlay=vc4-fkms-v3d/' ./boot/config.txt.bak
sudo sed -i -e 's/#dtoverlay=vc4-kms-v3d/dtoverlay=vc4-fkms-v3d/' ./boot/config.txt.bak
#sudo sed -i -e 's/#dtoverlay=vc4-fkms-v3d/dtoverlay=vc4-fkms-v3d/' ./boot/config.txt.bak
#sudo sed -i -e 's/#dtoverlay=vc4-kms-v3d/dtoverlay=vc4-fkms-v3d/' ./boot/config.txt.bak
sudo echo "max_usb_current=1" >> ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
sudo echo "config_hdmi_boost=7" >> ./boot/config.txt.bak
Expand All @@ -29,8 +29,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp ./usr/cmdline.txt /boot/
#fi
sudo cp ./usr/inittab /etc/
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf

fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
Expand Down
3 changes: 2 additions & 1 deletion LCD101TMP-show
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp ./usr/cmdline.txt /boot/
#fi
sudo cp ./usr/inittab /etc/
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf

fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
Expand Down
3 changes: 2 additions & 1 deletion LCD101Y-show
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp ./usr/cmdline.txt /boot/
#fi
sudo cp ./usr/inittab /etc/
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf

fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
Expand Down
1 change: 1 addition & 0 deletions LCD154-show
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fi
#fi

source ./system_config.sh
#sudo sed -i -e 's/dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/' ./boot/config.txt.bak
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
sudo echo "hdmi_cvt 300 300 60 1 0 0 0" >> ./boot/config.txt.bak
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
Expand Down
7 changes: 6 additions & 1 deletion LCD24-3A+-show
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo
#fi

source ./system_config.sh
#sudo sed -i -e 's/dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/' ./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
Expand All @@ -31,7 +32,9 @@ sudo echo "hdmi_cvt 480 360 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-32-90 /etc/X11/xorg.conf.d/99-calibration.conf
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
#if test "$root_dev" = "/dev/mmcblk0p7";then
#sudo cp ./usr/cmdline.txt-noobs /boot/cmdline.txt
#else
Expand All @@ -47,7 +50,7 @@ sudo apt-get update
wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/
if [ $? -eq 0 ]; then
#sudo apt-get update
sudo apt-get install cmake -y 2> error_output.txt
sudo apt-get install cmake libraspberrypi-dev -y 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "^E:" ./error_output.txt
Expand All @@ -73,7 +76,9 @@ sudo install fbcp /usr/local/bin/fbcp
cd - > /dev/null
type fbcp > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
sudo cp -rf ./etc/rc.local /etc/rc.local
fi
else
Expand Down
7 changes: 6 additions & 1 deletion LCD24-show
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo
#fi

source ./system_config.sh
#sudo sed -i -e 's/dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/' ./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
Expand All @@ -31,7 +32,9 @@ sudo echo "hdmi_cvt 480 360 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-32-270 /etc/X11/xorg.conf.d/99-calibration.conf
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
#if test "$root_dev" = "/dev/mmcblk0p7";then
#sudo cp ./usr/cmdline.txt-noobs /boot/cmdline.txt
#else
Expand All @@ -47,7 +50,7 @@ sudo apt-get update
wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/
if [ $? -eq 0 ]; then
#sudo apt-get update
sudo apt-get install cmake -y 2> error_output.txt
sudo apt-get install cmake libraspberrypi-dev -y 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "^E:" ./error_output.txt
Expand All @@ -73,7 +76,9 @@ sudo install fbcp /usr/local/bin/fbcp
cd - > /dev/null
type fbcp > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
sudo cp -rf ./etc/rc.local /etc/rc.local
fi
else
Expand Down
7 changes: 6 additions & 1 deletion LCD28-show
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo
#fi

source ./system_config.sh
#sudo sed -i -e 's/dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/' ./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
Expand All @@ -31,7 +32,9 @@ sudo echo "hdmi_cvt 480 360 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-32-270 /etc/X11/xorg.conf.d/99-calibration.conf
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
#if test "$root_dev" = "/dev/mmcblk0p7";then
#sudo cp ./usr/cmdline.txt-noobs /boot/cmdline.txt
#else
Expand All @@ -47,7 +50,7 @@ sudo apt-get update
wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/
if [ $? -eq 0 ]; then
#sudo apt-get update
sudo apt-get install cmake -y 2> error_output.txt
sudo apt-get install cmake libraspberrypi-dev -y 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "^E:" ./error_output.txt
Expand All @@ -73,7 +76,9 @@ sudo install fbcp /usr/local/bin/fbcp
cd - > /dev/null
type fbcp > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
sudo cp -rf ./etc/rc.local /etc/rc.local
fi
else
Expand Down
7 changes: 6 additions & 1 deletion LCD32-show
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sudo cp ./usr/tft9341-overlay.dtb /boot/overlays/tft9341.dtbo
#fi

source ./system_config.sh
#sudo sed -i -e 's/dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/' ./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
Expand All @@ -31,7 +32,9 @@ sudo echo "hdmi_cvt 480 360 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-32-270 /etc/X11/xorg.conf.d/99-calibration.conf
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
#if test "$root_dev" = "/dev/mmcblk0p7";then
#sudo cp ./usr/cmdline.txt-noobs /boot/cmdline.txt
#else
Expand All @@ -47,7 +50,7 @@ sudo apt-get update
wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/
if [ $? -eq 0 ]; then
#sudo apt-get update
sudo apt-get install cmake -y 2> error_output.txt
sudo apt-get install cmake libraspberrypi-dev -y 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "^E:" ./error_output.txt
Expand All @@ -73,7 +76,9 @@ sudo install fbcp /usr/local/bin/fbcp
cd - > /dev/null
type fbcp > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
sudo cp -rf ./etc/rc.local /etc/rc.local
fi
else
Expand Down
7 changes: 6 additions & 1 deletion LCD35-show
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
#fi

source ./system_config.sh
#sudo sed -i -e 's/dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/' ./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
Expand All @@ -32,7 +33,9 @@ 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-35-90 /etc/X11/xorg.conf.d/99-calibration.conf
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
#if test "$root_dev" = "/dev/mmcblk0p7";then
#sudo cp ./usr/cmdline.txt-noobs /boot/cmdline.txt
#else
Expand All @@ -48,7 +51,7 @@ sudo apt-get update
wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/
if [ $? -eq 0 ]; then
#sudo apt-get update
sudo apt-get install cmake -y 2> error_output.txt
sudo apt-get install cmake libraspberrypi-dev -y 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "^E:" ./error_output.txt
Expand All @@ -74,7 +77,9 @@ sudo install fbcp /usr/local/bin/fbcp
cd - > /dev/null
type fbcp > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
sudo cp -rf ./etc/rc.local /etc/rc.local
fi
else
Expand Down
6 changes: 5 additions & 1 deletion LCD5-show
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ sudo ./system_backup.sh
#fi

source ./system_config.sh
if [[ "$deb_version" < "12.1" ]]; then
row=`grep -nr "#dtoverlay=vc4-fkms-v3d" ./boot/config.txt.bak | awk -F ':' '{if(NR==1)printf $1}'`
sudo sed -i -e ''"$row"'s/#dtoverlay=vc4-fkms-v3d/dtoverlay=vc4-fkms-v3d/' ./boot/config.txt.bak
sudo sed -i -e 's/#max_framebuffers=2/max_framebuffers=2/' ./boot/config.txt.bak
fi
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
Expand All @@ -37,7 +39,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp ./usr/cmdline.txt /boot/
#fi
sudo cp ./usr/inittab /etc/
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
Expand All @@ -53,7 +57,7 @@ input_result=0
version=${version##* }
#version=${version#*#}
echo $version
if test $version -lt 2017;then
if test $version -lt 2017; then
echo "reboot"
else
echo "need to update touch configuration"
Expand Down
3 changes: 2 additions & 1 deletion LCD55-show
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp ./usr/cmdline.txt /boot/
#fi
sudo cp ./usr/inittab /etc/
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf

fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
Expand Down
3 changes: 2 additions & 1 deletion LCD7B-show
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp ./usr/cmdline.txt /boot/
#fi
sudo cp ./usr/inittab /etc/
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf

fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
Expand Down
3 changes: 2 additions & 1 deletion LCD7C-show
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp ./usr/cmdline.txt /boot/
#fi
sudo cp ./usr/inittab /etc/
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf

fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
Expand Down
3 changes: 2 additions & 1 deletion LCD7H-show
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp ./usr/cmdline.txt /boot/
#fi
sudo cp ./usr/inittab /etc/
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf

fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
Expand Down
3 changes: 2 additions & 1 deletion LCD7S-show
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt
#sudo cp ./usr/cmdline.txt /boot/
#fi
sudo cp ./usr/inittab /etc/
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf

fi
if [ ! -d /etc/X11/xorg.conf.d ]; then
sudo mkdir /etc/X11/xorg.conf.d
fi
Expand Down
7 changes: 6 additions & 1 deletion MHS32-show
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sudo cp ./usr/mhs32-overlay.dtb /boot/overlays/mhs32.dtbo
#fi

source ./system_config.sh
#sudo sed -i -e 's/dtoverlay=vc4-kms-v3d/#dtoverlay=vc4-kms-v3d/' ./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
Expand All @@ -32,7 +33,9 @@ sudo echo "hdmi_drive=2" >> ./boot/config.txt.bak
sudo cp -rf ./boot/config.txt.bak /boot/config.txt

sudo cp -rf ./usr/99-calibration.conf-mhs32-270 /etc/X11/xorg.conf.d/99-calibration.conf
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
#if test "$root_dev" = "/dev/mmcblk0p7";then
#sudo cp ./usr/cmdline.txt-noobs /boot/cmdline.txt
#else
Expand All @@ -48,7 +51,7 @@ sudo apt-get update
wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/
if [ $? -eq 0 ]; then
#sudo apt-get update
sudo apt-get install cmake -y 2> error_output.txt
sudo apt-get install cmake libraspberrypi-dev -y 2> error_output.txt
result=`cat ./error_output.txt`
echo -e "\033[31m$result\033[0m"
grep -q "^E:" ./error_output.txt
Expand All @@ -74,7 +77,9 @@ sudo install fbcp /usr/local/bin/fbcp
cd - > /dev/null
type fbcp > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [[ "$deb_version" < "12.1" ]]; then
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
sudo cp -rf ./etc/rc.local /etc/rc.local
fi
else
Expand Down
Loading

0 comments on commit 6320e61

Please sign in to comment.