From 41943532e979635902485fd822f2d91768b8d655 Mon Sep 17 00:00:00 2001 From: goodtft Date: Wed, 21 May 2025 09:50:14 +0100 Subject: [PATCH] modify driver for new system --- LCD24-3A+-show | 2 ++ LCD24-show | 2 ++ LCD28-show | 2 ++ LCD32-show | 2 ++ LCD35-show | 2 ++ MHS32-show | 2 ++ MHS35-show | 2 ++ MHS35B-show | 2 ++ MHS35IPS-show | 2 ++ MHS40-show | 2 ++ MHS40C-show | 2 ++ MIS35-show | 2 ++ NANO24-show | 2 ++ boot/config-nomal-12.10-64.txt | 51 ++++++++++++++++++++++++++++++++++ system_config.sh | 4 +++ 15 files changed, 81 insertions(+) create mode 100755 boot/config-nomal-12.10-64.txt diff --git a/LCD24-3A+-show b/LCD24-3A+-show index 095f7a8..0462bc2 100755 --- a/LCD24-3A+-show +++ b/LCD24-3A+-show @@ -45,7 +45,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:32:90:480:360" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/LCD24-show b/LCD24-show index 6e5fc5d..31f7d80 100755 --- a/LCD24-show +++ b/LCD24-show @@ -45,7 +45,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:32:270:480:360" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/LCD28-show b/LCD28-show index 6e5fc5d..31f7d80 100755 --- a/LCD28-show +++ b/LCD28-show @@ -45,7 +45,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:32:270:480:360" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/LCD32-show b/LCD32-show index 6e5fc5d..31f7d80 100755 --- a/LCD32-show +++ b/LCD32-show @@ -45,7 +45,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:32:270:480:360" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/LCD35-show b/LCD35-show index eb9de68..9978443 100755 --- a/LCD35-show +++ b/LCD35-show @@ -46,7 +46,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:35:90:480:320" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/MHS32-show b/MHS32-show index 2613eb8..cacf6bf 100755 --- a/MHS32-show +++ b/MHS32-show @@ -46,7 +46,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:mhs32:270:480:360" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/MHS35-show b/MHS35-show index 3e03317..ddcb7b6 100755 --- a/MHS35-show +++ b/MHS35-show @@ -47,7 +47,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:mhs35:90:480:320" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/MHS35B-show b/MHS35B-show index 82601b5..eabe013 100755 --- a/MHS35B-show +++ b/MHS35B-show @@ -52,7 +52,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:mhs35b:90:480:320" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/MHS35IPS-show b/MHS35IPS-show index 93f938a..5289e8c 100755 --- a/MHS35IPS-show +++ b/MHS35IPS-show @@ -47,7 +47,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:mhs35ips:90:480:320" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/MHS40-show b/MHS40-show index 4ee487d..e27db9d 100755 --- a/MHS40-show +++ b/MHS40-show @@ -45,7 +45,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:mhs395:90:480:320" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/MHS40C-show b/MHS40C-show index 25391c8..e11bbc8 100755 --- a/MHS40C-show +++ b/MHS40C-show @@ -51,7 +51,9 @@ sudo cp -rf ./etc/modprobe.d/fbtft.conf /etc/modprobe.d/ sudo touch ./.have_installed echo "hdmi:resistance:mhs397:0:800:480" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/MIS35-show b/MIS35-show index 311bb49..856f680 100755 --- a/MIS35-show +++ b/MIS35-show @@ -47,7 +47,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:mis35:90:480:320" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/NANO24-show b/NANO24-show index df266ff..e5d0dd1 100755 --- a/NANO24-show +++ b/NANO24-show @@ -50,7 +50,9 @@ sudo cp ./usr/inittab /etc/ sudo touch ./.have_installed echo "gpio:resistance:nano24:90:320:240" > ./.have_installed +if [[ "$deb_version" < "12.10" ]]; then sudo apt-get update +fi #FBCP install wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/ if [ $? -eq 0 ]; then diff --git a/boot/config-nomal-12.10-64.txt b/boot/config-nomal-12.10-64.txt new file mode 100755 index 0000000..331d256 --- /dev/null +++ b/boot/config-nomal-12.10-64.txt @@ -0,0 +1,51 @@ +# 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 + +# Run in 64-bit mode +arm_64bit=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 + +[cm5] +dtoverlay=dwc2,dr_mode=host + +[all] diff --git a/system_config.sh b/system_config.sh index 4b06e2a..600607c 100755 --- a/system_config.sh +++ b/system_config.sh @@ -34,7 +34,11 @@ sudo cp -rf ./boot/config-nomal-12.1-32.txt ./boot/config.txt.bak fi fi elif [ $hardware_arch -eq 64 ]; then +if [[ "$deb_version" < "12.1" ]]; then sudo cp -rf ./boot/config-nomal-11.4-64.txt ./boot/config.txt.bak +else +sudo cp -rf ./boot/config-nomal-12.10-64.txt ./boot/config.txt.bak +fi fi