mirror of
https://github.com/goodtft/LCD-show.git
synced 2024-11-28 17:24:12 +01:00
update lcd35 driver
This commit is contained in:
parent
cd6befd132
commit
cfd602e665
48
LCD35-show
48
LCD35-show
@ -21,6 +21,11 @@ sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
|
||||
sudo echo "dtparam=spi=on" >> ./boot/config.txt.bak
|
||||
sudo echo "enable_uart=1" >> ./boot/config.txt.bak
|
||||
sudo echo "dtoverlay=tft35a:rotate=90" >> ./boot/config.txt.bak
|
||||
sudo echo "hdmi_group=2" >> ./boot/config.txt.bak
|
||||
sudo echo "hdmi_mode=1" >> ./boot/config.txt.bak
|
||||
sudo echo "hdmi_mode=87" >> ./boot/config.txt.bak
|
||||
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-35-90 /etc/X11/xorg.conf.d/99-calibration.conf
|
||||
@ -34,6 +39,43 @@ sudo cp ./usr/inittab /etc/
|
||||
#sudo cp ./boot/config-35.txt /boot/config.txt
|
||||
sudo touch ./.have_installed
|
||||
echo "gpio:resistance:35:90:480:320" > ./.have_installed
|
||||
|
||||
#FBCP install
|
||||
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
|
||||
result=`cat ./error_output.txt`
|
||||
echo -e "\033[31m$result\033[0m"
|
||||
grep -q "^E:" ./error_output.txt
|
||||
type cmake > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
sudo rm -rf rpi-fbcp
|
||||
wget --spider -q -o /dev/null --tries=1 -T 10 https://github.com
|
||||
if [ $? -eq 0 ]; then
|
||||
sudo git clone https://github.com/tasanakorn/rpi-fbcp
|
||||
else
|
||||
echo "bad network, copy native fbcp!!!"
|
||||
sudo cp -r ./usr/rpi-fbcp .
|
||||
fi
|
||||
sudo mkdir ./rpi-fbcp/build
|
||||
cd ./rpi-fbcp/build/
|
||||
sudo cmake ..
|
||||
sudo make
|
||||
sudo install fbcp /usr/local/bin/fbcp
|
||||
cd - > /dev/null
|
||||
type fbcp > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
sudo cp -rf ./usr/99-fbturbo-fbcp.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
|
||||
sudo cp -rf ./etc/rc.local /etc/rc.local
|
||||
fi
|
||||
else
|
||||
echo "install cmake error!!!!"
|
||||
fi
|
||||
else
|
||||
echo "bad network, can't install cmake!!!"
|
||||
fi
|
||||
|
||||
#evdev install
|
||||
#nodeplatform=`uname -n`
|
||||
#kernel=`uname -r`
|
||||
@ -47,8 +89,12 @@ if test $version -lt 2017;then
|
||||
echo "reboot"
|
||||
else
|
||||
echo "need to update touch configuration"
|
||||
wget --spider -q -o /dev/null --tries=1 -T 10 http://mirrors.zju.edu.cn/raspbian/raspbian
|
||||
if [ $? -eq 0 ]; then
|
||||
sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
|
||||
else
|
||||
sudo dpkg -i -B ./xserver-xorg-input-evdev_1%3a2.10.6-1+b1_armhf.deb 2> error_output.txt
|
||||
#sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
|
||||
fi
|
||||
result=`cat ./error_output.txt`
|
||||
echo -e "\033[31m$result\033[0m"
|
||||
grep -q "error:" ./error_output.txt && exit
|
||||
|
Loading…
Reference in New Issue
Block a user