代码拉取完成,页面将自动刷新
i=1
for lines in `cat ./boot/mark`
do
case ${i} in
1) var1=${lines};;
esac
i=`expr ${i} + 1`
done
#echo "$var1"
j=$(uname -n)
if test "$var1" = "0" -a "$1" != "lite" -a "$2" != "lite";then
if test "$j" != "retropie" ;then
sudo apt-get install xserver-xorg-input-evdev
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
fi
if test "$j" = "retropie" ;then
sudo cp -rf ./nes /home/pi/RetroPie/roms/
fi
echo "1" > ./boot/mark
sudo dpkg -i -B ./xinput-calibrator_0.7.5-1_armhf.deb
sudo apt-get install cmake -y
cd ./rpi-fbcp/build/
sudo cmake ..
sudo make
sudo install fbcp /usr/local/bin/fbcp
cd ../../
sudo mkdir -p /usr/share/X11/xorg.conf.d
elif test "$var1" = "0" -a "$1" = "lite" ;then
echo "1" > ./boot/mark
echo "No touch driver installled"
echo "No fbcp driver installled"
sudo mkdir -p /usr/share/X11/xorg.conf.d
fi
sudo cp -rf ./etc/rc.local /etc/rc.local
if test "$1" = "0" -o "$#" = "0" -o "$2" = "0"; then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-5-270 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-4-800x480.txt /boot/config.txt
echo "LCD configure 0"
elif test "$1" = "lite" -a "$#" = "1"; then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-5-270 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-4-800x480.txt /boot/config.txt
echo "LCD configure 0"
elif test "$1" = "90" -o "$2" = "90"; then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-5-180 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-4-800x480.txt-90 /boot/config.txt
echo "LCD configure 90"
elif test "$1" = "180" -o "$2" = "180";then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-5-90 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-4-800x480.txt-180 /boot/config.txt
echo "LCD configure 180"
elif test "$1" = "270" -o "$2" = "270";then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-5 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-4-800x480.txt-270 /boot/config.txt
echo "LCD configure 270"
fi
sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
if test "$j" = "kali" ;then
sudo cp ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-kali-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
if [ -b /dev/mmcblk0p7 ]; then
sudo cp ./cmdline.txt-noobs /boot/cmdline.txt
else
sudo cp ./cmdline.txt /boot/
fi
sudo cp ./inittab /etc/
if test "$#" = "0" -o "$1" = "0" -o "$1" = "90" -o "$1" = "180" -o "$1" = "270" -o "$2" = "0" -o "$2" = "90" -o "$2" = "180" -o "$2" = "270" -o "$1" = "lite" -o "$2" = "lite"; then
sudo reboot
echo "reboot now"
else
echo "Invalid parameter,Usage:LCD4-800x480-show [0] [90] [180] [270] [lite]"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。