Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tmfdk333 opened this issue Feb 27, 2019 · 1 comment
Open

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

tmfdk333 opened this issue Feb 27, 2019 · 1 comment
Assignees

Comments

@tmfdk333
Copy link
Owner

tmfdk333 commented Feb 27, 2019

Mac OS X Mojave 10.14.3

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

  • Debian 기반의 Driver 설치 스크립트를 Redhat 기반에 맞게 변경

[1] Install Package

  • xserver-xorg-input-evdev(deb) → xorg-x11-drv-evdev, xorg-x11-drv-evdev-devel(rpm)
  • xinput-calibrator_0.7.5-1_armhf(deb) → xorg-x11-drv-synaptics, xorg-x11-drv-synaptics-devel(rpm)
  • bcm_host.h
yum install -y xorg-x11-drv-evdev xorg-x11-drv-evdev-devel
yum install -y xorg-x11-drv-synaptics xorg-x11-drv-synaptics-devel
yum install -y raspberrypi-vc-libs raspberrypi-vc-libs-devel 
cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
cp -rf /usr/include/vc/* /usr/include/ 

[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/
  • CMakeCache.txt 파일 수정 & cmake(line: 169, 172, 182, 245)
# Edit "/home/pi" to "/home/tmfdk333"
:%s/\/home\/pi/\/home\/tmfdk333/g
cmake ..
  • CMakeFiles/fbcp.dir/link.txt 파일 수정 & make & install
# Edit line 1 "/opt/vc/lib" to "/usr/lib/vc"
:%s/\/opt\/vc\/lib/\/usr\/lib\/vc/g
make 
install fbcp /usr/local/bin/fbcp

[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 
  • cmdline.txt 파일 수정 & reboot
# -b /dev/mmcblk0p7 else
:%s/mmcblk0p2/mmcblk0p3/g
:%s/logo.nologo//g
sudo cp ./cmdline.txt /boot/
reboot

[4] Reference

@tmfdk333
Copy link
Owner Author

i=1
echo "i: ${i}"

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]"

@tmfdk333 tmfdk333 self-assigned this Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant