mirror of
https://github.com/goodtft/LCD-show.git
synced 2025-02-17 23:54:16 +01:00
support 64bit system
This commit is contained in:
parent
7702aba501
commit
726f51df97
34
MHS40C-show
34
MHS40C-show
@ -9,13 +9,16 @@ if [ ! -d /etc/X11/xorg.conf.d ]; then
|
|||||||
sudo mkdir -p /etc/X11/xorg.conf.d
|
sudo mkdir -p /etc/X11/xorg.conf.d
|
||||||
fi
|
fi
|
||||||
|
|
||||||
root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
|
#root_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`
|
||||||
if test "$root_dev" = "/dev/mmcblk0p7";then
|
#if test "$root_dev" = "/dev/mmcblk0p7";then
|
||||||
sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
|
#sudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bak
|
||||||
else
|
#else
|
||||||
sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
|
#sudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.bak
|
||||||
|
#sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
|
||||||
|
#fi
|
||||||
|
|
||||||
|
source ./system_config.sh
|
||||||
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
|
sudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bak
|
||||||
fi
|
|
||||||
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
|
sudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.bak
|
||||||
sudo echo "dtparam=spi=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 "enable_uart=1" >> ./boot/config.txt.bak
|
||||||
@ -45,10 +48,11 @@ sudo cp -rf ./etc/modprobe.d/fbtft.conf /etc/modprobe.d/
|
|||||||
sudo touch ./.have_installed
|
sudo touch ./.have_installed
|
||||||
echo "hdmi:resistance:mhs397:0:800:480" > ./.have_installed
|
echo "hdmi:resistance:mhs397:0:800:480" > ./.have_installed
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
#FBCP install
|
#FBCP install
|
||||||
wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/
|
wget --spider -q -o /dev/null --tries=1 -T 10 https://cmake.org/
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
sudo apt-get update
|
#sudo apt-get update
|
||||||
sudo apt-get install cmake -y 2> error_output.txt
|
sudo apt-get install cmake -y 2> error_output.txt
|
||||||
result=`cat ./error_output.txt`
|
result=`cat ./error_output.txt`
|
||||||
echo -e "\033[31m$result\033[0m"
|
echo -e "\033[31m$result\033[0m"
|
||||||
@ -91,6 +95,7 @@ fi
|
|||||||
version=`uname -v`
|
version=`uname -v`
|
||||||
#if test "$nodeplatform" = "raspberrypi";then
|
#if test "$nodeplatform" = "raspberrypi";then
|
||||||
#echo "this is raspberrypi kernel"
|
#echo "this is raspberrypi kernel"
|
||||||
|
input_result=0
|
||||||
version=${version##* }
|
version=${version##* }
|
||||||
#version=${version#*#}
|
#version=${version#*#}
|
||||||
echo $version
|
echo $version
|
||||||
@ -99,10 +104,21 @@ echo "reboot"
|
|||||||
else
|
else
|
||||||
echo "need to update touch configuration"
|
echo "need to update touch configuration"
|
||||||
wget --spider -q -o /dev/null --tries=1 -T 10 http://mirrors.zju.edu.cn/raspbian/raspbian
|
wget --spider -q -o /dev/null --tries=1 -T 10 http://mirrors.zju.edu.cn/raspbian/raspbian
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
|
input_result=1
|
||||||
else
|
else
|
||||||
|
sudo apt-get install xserver-xorg-input-evdev 2> error_output.txt
|
||||||
|
dpkg -l | grep xserver-xorg-input-evdev > /dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
input_result=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ $input_result -eq 1 ]; then
|
||||||
|
if [ $hardware_arch -eq 32 ]; then
|
||||||
sudo dpkg -i -B ./xserver-xorg-input-evdev_1%3a2.10.6-1+b1_armhf.deb 2> error_output.txt
|
sudo dpkg -i -B ./xserver-xorg-input-evdev_1%3a2.10.6-1+b1_armhf.deb 2> error_output.txt
|
||||||
|
elif [ $hardware_arch -eq 64 ]; then
|
||||||
|
sudo dpkg -i -B ./xserver-xorg-input-evdev_1%3a2.10.6-2_arm64.deb 2> error_output.txt
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
result=`cat ./error_output.txt`
|
result=`cat ./error_output.txt`
|
||||||
echo -e "\033[31m$result\033[0m"
|
echo -e "\033[31m$result\033[0m"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user