mirror of
https://github.com/goodtft/LCD-show.git
synced 2024-11-28 17:24:12 +01:00
modify 5inch and 4inch HDMI driver
This commit is contained in:
parent
6320e6197f
commit
f5c474ac49
@ -16,6 +16,9 @@ row=`grep -nr "#dtoverlay=vc4-fkms-v3d" ./boot/config.txt.bak | awk -F ':' '{if(
|
||||
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
|
||||
if [ $hardware_model -eq 5 ]; then
|
||||
sudo sed -i -e 's/#dtoverlay=vc4-kms-v3d/dtoverlay=vc4-kms-v3d/' ./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
|
||||
|
@ -11,6 +11,9 @@ sudo ./system_backup.sh
|
||||
#fi
|
||||
|
||||
source ./system_config.sh
|
||||
if [ $hardware_model -eq 5 ]; then
|
||||
sudo sed -i -e 's/#dtoverlay=vc4-kms-v3d/dtoverlay=vc4-kms-v3d/' ./boot/config.txt.bak
|
||||
fi
|
||||
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
|
||||
sudo echo "hdmi_force_edid_audio=1" >> ./boot/config.txt.bak
|
||||
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
|
||||
@ -27,6 +30,10 @@ sudo echo "hdmi_cvt 480 800 60 6 0 0 0" >> ./boot/config.txt.bak
|
||||
sudo echo "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" >> ./boot/config.txt.bak
|
||||
sudo cp -rf ./boot/config.txt.bak /boot/config.txt
|
||||
|
||||
if [ $hardware_model -eq 5 ]; then
|
||||
sudo sed -i "/xrandr -o/d" /etc/xdg/lxsession/LXDE-pi/autostart
|
||||
sudo echo "xrandr -o 1" >> /etc/xdg/lxsession/LXDE-pi/autostart
|
||||
fi
|
||||
#sudo cp -rf ./boot/config-397.txt /boot/config.txt
|
||||
|
||||
#if test "$root_dev" = "/dev/mmcblk0p7";then
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
big_version=`lsb_release -r | awk -F ' ' '{printf $NF}'`
|
||||
deb_version=`cat /etc/debian_version | tr -d '\n'`
|
||||
hw_result=`tr -d '\0' < /proc/device-tree/model`
|
||||
|
||||
if [ $(getconf WORD_BIT) = '32' ] && [ $(getconf LONG_BIT) = '64' ] ; then
|
||||
hardware_arch=64
|
||||
@ -9,6 +10,12 @@ else
|
||||
hardware_arch=32
|
||||
fi
|
||||
|
||||
if [[ $hw_result == *"Raspberry Pi 5"* ]]; then
|
||||
hardware_model=5
|
||||
else
|
||||
hardware_model=255
|
||||
fi
|
||||
|
||||
sudo raspi-config nonint do_wayland W1
|
||||
|
||||
if [ $hardware_arch -eq 32 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user