tmfdk333 / note

:ledger: 노트정리용 Repository
1 stars 0 forks source link

RaspberryPI2에 LCD Driver 설치하기(deb to rpm) #2

Open tmfdk333 opened 5 years ago

tmfdk333 commented 5 years ago

Mac OS X Mojave 10.14.3

RaspberryPI2에 LCD Driver 설치하기(deb to rpm)

[2] Build

yum install -y gcc gcc-c++ cmake make git
git clone https://github.com/waveshare/LCD-show.git
cd LCD-show/rpi-fbcp/build/

[3] Run Script

cd ../../
sudo cp -rf ./etc/rc.local /etc/rc.local
# "LCD configure 0"
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-5.txt /boot/config.txt
# !!SKIP IF GNOME!!
sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf 

[4] Reference

tmfdk333 commented 5 years ago

for lines in cat ./boot/mark do echo "lines: ${lines}" case ${i} in 1) var1=${lines} echo "var: ${var1}" ;; esac i=expr ${i} + 1 echo "i: ${i}" done

echo "$var1"

j=$(uname -n) echo "j: ${j}"

if test "$var1" = "0" -a "$1" != "lite" -a "$2" != "lite";then echo "test: $test" if test "$j" != "retropie" ;then echo "test is not retropie" # real

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 echo "test is retropie"

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 "test: $test" 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 /usr/share/X11/xorg.conf.d/99-calibration.conf

sudo cp ./boot/config-5.txt /boot/config.txt

echo "LCD configrue 0" #real elif test "$1" = "lite" -a "$#" = "1"; 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-5.txt /boot/config.txt

echo "LCD configrue 0" elif test "$1" = "90" -o "$2" = "90"; 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-5.txt-90 /boot/config.txt

echo "LCD configrue 90" elif test "$1" = "180" -o "$2" = "180";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-5.txt-180 /boot/config.txt

echo "LCD configrue 180" elif test "$1" = "270" -o "$2" = "270" ;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-5.txt-270 /boot/config.txt

echo "LCD configrue 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 echo "$kali"

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 echo "true"

sudo cp ./cmdline.txt-noobs /boot/cmdline.txt

else echo "false"

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:LCD5-show [0] [90] [180] [270] [lite]"