From 6320e6197fd36526bdd0bbb86325809a17e77d05 Mon Sep 17 00:00:00 2001 From: goodtft Date: Tue, 2 Jan 2024 03:41:52 +0000 Subject: [PATCH] update driver to fit new system --- LCD101H-show | 3 ++- LCD101S-show | 7 +++--- LCD101TMP-show | 3 ++- LCD101Y-show | 3 ++- LCD154-show | 1 + LCD24-3A+-show | 7 +++++- LCD24-show | 7 +++++- LCD28-show | 7 +++++- LCD32-show | 7 +++++- LCD35-show | 7 +++++- LCD5-show | 6 ++++- LCD55-show | 3 ++- LCD7B-show | 3 ++- LCD7C-show | 3 ++- LCD7H-show | 3 ++- LCD7S-show | 3 ++- MHS32-show | 7 +++++- MHS35-show | 7 +++++- MHS35B-show | 7 +++++- MHS35IPS-show | 7 +++++- MHS40-show | 7 +++++- MHS40C-show | 7 +++++- MIS35-show | 7 +++++- MPI3508-show | 2 ++ MPI4008-show | 2 ++ MPI4009-show | 2 ++ MPI5001-show | 3 ++- NANO24-show | 7 +++++- boot/config-nomal-12.1-32.txt | 46 +++++++++++++++++++++++++++++++++++ system_backup.sh | 4 +++ system_config.sh | 6 ++++- 31 files changed, 167 insertions(+), 27 deletions(-) create mode 100755 boot/config-nomal-12.1-32.txt diff --git a/LCD101H-show b/LCD101H-show index 18a4ff2..37a0cba 100755 --- a/LCD101H-show +++ b/LCD101H-show @@ -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 diff --git a/LCD101S-show b/LCD101S-show index 7ab2a6c..b6ddc13 100755 --- a/LCD101S-show +++ b/LCD101S-show @@ -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 @@ -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 diff --git a/LCD101TMP-show b/LCD101TMP-show index 6ef34cb..f21d935 100755 --- a/LCD101TMP-show +++ b/LCD101TMP-show @@ -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 diff --git a/LCD101Y-show b/LCD101Y-show index add7a4b..0225ee2 100755 --- a/LCD101Y-show +++ b/LCD101Y-show @@ -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 diff --git a/LCD154-show b/LCD154-show index 4be9671..c80ef45 100755 --- a/LCD154-show +++ b/LCD154-show @@ -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 diff --git a/LCD24-3A+-show b/LCD24-3A+-show index f839b12..095f7a8 100755 --- a/LCD24-3A+-show +++ b/LCD24-3A+-show @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/LCD24-show b/LCD24-show index 8abb964..6e5fc5d 100755 --- a/LCD24-show +++ b/LCD24-show @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/LCD28-show b/LCD28-show index 8abb964..6e5fc5d 100755 --- a/LCD28-show +++ b/LCD28-show @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/LCD32-show b/LCD32-show index 8abb964..6e5fc5d 100755 --- a/LCD32-show +++ b/LCD32-show @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/LCD35-show b/LCD35-show index ec817d5..eb9de68 100755 --- a/LCD35-show +++ b/LCD35-show @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/LCD5-show b/LCD5-show index daf4544..d56b4d3 100755 --- a/LCD5-show +++ b/LCD5-show @@ -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 @@ -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 @@ -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" diff --git a/LCD55-show b/LCD55-show index 7cac195..42a476d 100755 --- a/LCD55-show +++ b/LCD55-show @@ -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 diff --git a/LCD7B-show b/LCD7B-show index 4330c99..501dfbe 100755 --- a/LCD7B-show +++ b/LCD7B-show @@ -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 diff --git a/LCD7C-show b/LCD7C-show index 0563ff5..2b98ba1 100755 --- a/LCD7C-show +++ b/LCD7C-show @@ -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 diff --git a/LCD7H-show b/LCD7H-show index e247091..0574914 100755 --- a/LCD7H-show +++ b/LCD7H-show @@ -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 diff --git a/LCD7S-show b/LCD7S-show index 523b585..cbdeec5 100755 --- a/LCD7S-show +++ b/LCD7S-show @@ -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 diff --git a/MHS32-show b/MHS32-show index 225d7c0..2613eb8 100755 --- a/MHS32-show +++ b/MHS32-show @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/MHS35-show b/MHS35-show index cc1165c..3e03317 100755 --- a/MHS35-show +++ b/MHS35-show @@ -20,6 +20,7 @@ sudo cp ./usr/mhs35-overlay.dtb /boot/overlays/mhs35.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 @@ -33,7 +34,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-mhs35-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 @@ -48,7 +51,7 @@ sudo apt-get update #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then -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 @@ -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 diff --git a/MHS35B-show b/MHS35B-show index 8dead42..82601b5 100755 --- a/MHS35B-show +++ b/MHS35B-show @@ -20,6 +20,7 @@ sudo cp ./usr/mhs35b-overlay.dtb /boot/overlays/mhs35b.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 @@ -39,7 +40,9 @@ sudo cp ./usr/goodix.dtbo /boot/overlays/ fi sudo cp -rf ./usr/99-calibration.conf-mhs35b-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 @@ -54,7 +57,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 @@ -80,7 +83,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 diff --git a/MHS35IPS-show b/MHS35IPS-show index 8831ab6..93f938a 100755 --- a/MHS35IPS-show +++ b/MHS35IPS-show @@ -20,6 +20,7 @@ sudo cp ./usr/mhs35ips-overlay.dtb /boot/overlays/mhs35ips.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 @@ -33,7 +34,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-mhs35ips-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 @@ -48,7 +51,7 @@ sudo apt-get update #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then -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 @@ -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 diff --git a/MHS40-show b/MHS40-show index ec4d80a..4ee487d 100755 --- a/MHS40-show +++ b/MHS40-show @@ -19,6 +19,7 @@ sudo cp ./usr/mhs395-overlay.dtb /boot/overlays/mhs395.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 @@ -31,7 +32,9 @@ sudo echo "hdmi_cvt 480 320 60 6 0 0 0" >> ./boot/config.txt.bak sudo echo "hdmi_drive=2" >> ./boot/config.txt.bak sudo cp -rf ./boot/config.txt.bak /boot/config.txt sudo cp -rf ./usr/99-calibration.conf-mhs395-90 /etc/X11/xorg.conf.d/99-calibration.conf +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 @@ -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 @@ -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 diff --git a/MHS40C-show b/MHS40C-show index 6571bf8..25391c8 100755 --- a/MHS40C-show +++ b/MHS40C-show @@ -18,6 +18,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 "dtparam=i2c_arm=on" >> ./boot/config.txt.bak sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak @@ -32,7 +33,9 @@ sudo echo "dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vre sudo cp -rf ./boot/config.txt.bak /boot/config.txt sudo cp -rf ./usr/99-calibration.conf-mhs397-0 /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 [[ "$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 #if test "$root_dev" = "/dev/mmcblk0p7";then #sudo cp ./usr/cmdline.txt-noobs /boot/cmdline.txt @@ -53,7 +56,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 @@ -79,7 +82,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 diff --git a/MIS35-show b/MIS35-show index 38d7aab..311bb49 100755 --- a/MIS35-show +++ b/MIS35-show @@ -20,6 +20,7 @@ sudo cp ./usr/mis35-overlay.dtb /boot/overlays/mis35.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 @@ -33,7 +34,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-mis35-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 @@ -49,7 +52,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 @@ -75,7 +78,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 diff --git a/MPI3508-show b/MPI3508-show index cf26cd3..2fcf2e9 100755 --- a/MPI3508-show +++ b/MPI3508-show @@ -35,7 +35,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 diff --git a/MPI4008-show b/MPI4008-show index 1be1b36..d4717f8 100755 --- a/MPI4008-show +++ b/MPI4008-show @@ -35,7 +35,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 diff --git a/MPI4009-show b/MPI4009-show index 86f18e4..7032bfe 100755 --- a/MPI4009-show +++ b/MPI4009-show @@ -35,7 +35,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 diff --git a/MPI5001-show b/MPI5001-show index f2bf6f6..628e835 100755 --- a/MPI5001-show +++ b/MPI5001-show @@ -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 diff --git a/NANO24-show b/NANO24-show index 9b89ad1..df266ff 100755 --- a/NANO24-show +++ b/NANO24-show @@ -19,6 +19,7 @@ sudo cp ./usr/tft7789-overlay.dtb /boot/overlays/tft7789.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 @@ -37,7 +38,9 @@ sudo cp -rf ./boot/config.txt.bak /boot/config.txt sudo cp ./usr/ft6236.dtb /boot/overlays/ft6236.dtbo sudo cp -rf ./usr/99-calibration.conf-nano24-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 @@ -51,7 +54,7 @@ sudo apt-get update #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then -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 @@ -77,7 +80,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 diff --git a/boot/config-nomal-12.1-32.txt b/boot/config-nomal-12.1-32.txt new file mode 100755 index 0000000..b48ae12 --- /dev/null +++ b/boot/config-nomal-12.1-32.txt @@ -0,0 +1,46 @@ +# For more options and information see +# http://rptl.io/configtxt +# Some settings may impact device functionality. See link above for details + +# Uncomment some or all of these to enable the optional hardware interfaces +#dtparam=i2c_arm=on +#dtparam=i2s=on +#dtparam=spi=on + +# Enable audio (loads snd_bcm2835) +dtparam=audio=on + +# Additional overlays and parameters are documented +# /boot/firmware/overlays/README + +# Automatically load overlays for detected cameras +camera_auto_detect=1 + +# Automatically load overlays for detected DSI displays +display_auto_detect=1 + +# Automatically load initramfs files, if found +auto_initramfs=1 + +# Enable DRM VC4 V3D driver +#dtoverlay=vc4-kms-v3d +max_framebuffers=2 + +# Don't have the firmware create an initial video= setting in cmdline.txt. +# Use the kernel's default instead. +disable_fw_kms_setup=1 + +# Disable compensation for displays with overscan +disable_overscan=1 + +# Run as fast as firmware / board allows +arm_boost=1 + +[cm4] +# Enable host mode on the 2711 built-in XHCI USB controller. +# This line should be removed if the legacy DWC2 controller is required +# (e.g. for USB device mode) or if USB support is not required. +otg_mode=1 + +[all] + diff --git a/system_backup.sh b/system_backup.sh index 8317899..f841fa9 100755 --- a/system_backup.sh +++ b/system_backup.sh @@ -1,4 +1,6 @@ #!/bin/bash +deb_ver=`cat /etc/debian_version | tr -d '\n'` + if [ ! -d "./.system_backup" ]; then sudo mkdir ./.system_backup fi @@ -46,7 +48,9 @@ fi if [ -f /usr/share/X11/xorg.conf.d/99-fbturbo.conf ]; then sudo cp -rf /usr/share/X11/xorg.conf.d/99-fbturbo.conf ./.system_backup/ fi +if [[ "$deb_ver" < "12.1" ]]; then sudo cp -rf ./usr/99-fbturbo.conf-original /usr/share/X11/xorg.conf.d/99-fbturbo.conf +fi sudo cp -rf /etc/rc.local ./.system_backup/ sudo cp -rf ./etc/rc.local-original /etc/rc.local diff --git a/system_config.sh b/system_config.sh index c62a050..d9aa851 100755 --- a/system_config.sh +++ b/system_config.sh @@ -9,14 +9,18 @@ else hardware_arch=32 fi +sudo raspi-config nonint do_wayland W1 + if [ $hardware_arch -eq 32 ]; then if [ $(($big_version)) -lt 10 ]; then sudo cp -rf ./boot/config-nomal-10.9-32.txt ./boot/config.txt.bak else if [[ "$deb_version" < "10.9" ]] || [[ "$deb_version" = "10.9" ]]; then sudo cp -rf ./boot/config-nomal-10.9-32.txt ./boot/config.txt.bak -else +elif [[ "$deb_version" < "12.1" ]]; then sudo cp -rf ./boot/config-nomal-11.4-32.txt ./boot/config.txt.bak +else +sudo cp -rf ./boot/config-nomal-12.1-32.txt ./boot/config.txt.bak fi fi elif [ $hardware_arch -eq 64 ]; then