Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
waveshare committed Dec 27, 2018
1 parent 1879b87 commit d8d14d6
Show file tree
Hide file tree
Showing 266 changed files with 14,767 additions and 0 deletions.
7 changes: 7 additions & 0 deletions LCD-hdmi
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#sudo cp -rf ./etc/modules-HDMI /etc/modules
sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
sudo cp ./boot/config-nomal.txt /boot/config.txt
#sudo cp ./cmdline.txt /boot/
#sudo cp ./inittab /etc/
sudo cp -rf ./etc/rc.local /etc/rc.local
sudo reboot
81 changes: 81 additions & 0 deletions LCD101-1024x600-show
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
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 /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 /usr/share/X11/xorg.conf.d

fi

sudo cp -rf ./etc/rc.local /etc/rc.local
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 test "$1" = "0" -o "$#" = "0" -o "$2" = "0"; then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-101-1024x600 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-101-1024x600.txt /boot/config.txt
echo "LCD configrue 0"
elif test "$1" = "lite" -a "$#" = "1"; then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-101-1024x600 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-101-1024x600.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-101-1024x600-90 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-101-1024x600.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-101-1024x600-180 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-101-1024x600.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-101-1024x600-270 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-101-1024x600.txt-270 /boot/config.txt
echo "LCD configrue 270"
fi

#sudo cp ./cmdline.txt /boot/
#sudo cp ./inittab /etc/
#sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf


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:LCD101-1024x600-show [0] [90] [180] [270] [lite]"
fi
100 changes: 100 additions & 0 deletions LCD154-show
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
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/

sudo mkdir /usr/src/mk_arcade_joystick_rpi-0.1.5/
sudo mkdir /etc/modprobe.d/
sudo cp -a ./mk_arcade_joystick_rpi-master/* /usr/src/mk_arcade_joystick_rpi-0.1.5/
export MKVERSION=0.1.5
sudo -E dkms build -m mk_arcade_joystick_rpi -v 0.1.5
sudo -E dkms install -m mk_arcade_joystick_rpi -v 0.1.5
sudo cp -rf ./etc/modules /etc/modules
sudo cp -rf ./etc/modprobe.d/joystick.conf /etc/modprobe.d/

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 /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 /usr/share/X11/xorg.conf.d

fi

if test "$j" != "kali" ;then
if test "$1" != "lite" -a "$2" != "lite" ;then
sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
else
sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
else
sudo cp ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-kali /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi

sudo cp ./etc/modules /etc/


sudo cp -rf ./etc/rc.local-154 /etc/rc.local


if test "$1" = "0" -o "$#" = "0" -o "$2" = "0";then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-154 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-154.txt /boot/config.txt
echo "LCD configrue 0"
elif test "$1" = "lite" -a "$#" = "1" ;then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-154 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-154.txt /boot/config.txt
echo "LCD configrue 0"
elif test "$1" = "90" -o "$2" = "90";then
if test "$1" = "lite" -o "$2" = "lite" -o "$j" = "kali" ; then
sudo cp ./boot/config-154.txt /boot/config.txt
sudo cp -rf ./etc/rc.local-154-90 /etc/rc.local
else
sudo cp ./boot/config-154.txt-90 /boot/config.txt
fi
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-154-90 /usr/share/X11/xorg.conf.d/99-calibration.conf
echo "LCD configrue 90"
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:LCD154-show [0] [90] [180] [270] [lite]"
fi
107 changes: 107 additions & 0 deletions LCD28-show
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
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 /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 /usr/share/X11/xorg.conf.d

fi

if test "$j" != "kali" ;then
if test "$1" != "lite" -a "$2" != "lite" ;then
sudo cp -rf ./etc/rc.local-gpio /etc/rc.local
sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
else
sudo cp -rf ./etc/rc.local /etc/rc.local
sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi
else
sudo cp ./usr/share/X11/xorg.conf.d/99-fbturbo.conf-kali /usr/share/X11/xorg.conf.d/99-fbturbo.conf
fi

if test "$1" = "0" -o "$#" = "0" -o "$2" = "0";then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-32 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-32.txt /boot/config.txt
if test "$j" = "retropie"; then
sudo cp ./boot/config-32.txt-retropie /boot/config.txt
fi
echo "LCD configrue 0"
elif test "$1" = "lite" -a "$#" = "1" ;then
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-32 /usr/share/X11/xorg.conf.d/99-calibration.conf
sudo cp ./boot/config-32.txt /boot/config.txt
echo "LCD configrue 0"
elif test "$1" = "90" -o "$2" = "90";then
if test "$1" = "lite" -o "$2" = "lite" -o "$j" = "kali" ; then
sudo cp ./boot/config-32.txt-90-lite /boot/config.txt
else
sudo cp ./boot/config-32.txt-90 /boot/config.txt
fi
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-32-90 /usr/share/X11/xorg.conf.d/99-calibration.conf
echo "LCD configrue 90"
elif test "$1" = "180" -o "$2" = "180" ;then
if test "$1" = "lite" -o "$2" = "lite" -o "$j" = "kali" ; then
sudo cp ./boot/config-32.txt-180-lite /boot/config.txt
else
sudo cp ./boot/config-32.txt-180 /boot/config.txt
fi
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-32-180 /usr/share/X11/xorg.conf.d/99-calibration.conf
echo "LCD configrue 180"
elif test "$1" = "270" -o "$2" = "270"; then
if test "$1" = "lite" -o "$2" = "lite" -o "$j" = "kali" ; then
sudo cp ./boot/config-32.txt-270-lite /boot/config.txt
else
sudo cp ./boot/config-32.txt-270 /boot/config.txt
fi
sudo cp -rf ./etc/X11/xorg.conf.d/99-calibration.conf-32-270 /usr/share/X11/xorg.conf.d/99-calibration.conf
echo "LCD configrue 270"
fi

sudo cp ./waveshare32b-overlay.dtb /boot/overlays/waveshare32b.dtbo
sudo cp ./waveshare32b-overlay.dtb /boot/overlays/
#sudo cp -rf ./usr/share/X11/xorg.conf.d/99-fbturbo.conf /usr/share/X11/xorg.conf.d/
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:LCD28-show [0] [90] [180] [270] [lite]"
fi
Loading

0 comments on commit d8d14d6

Please sign in to comment.