Browse Source

auto install default display on DietPI

dev
openoms 6 years ago
parent
commit
7313437e83
  1. 26
      build_sdcard.sh
  2. 8
      dietpi/dietpi.display.sh

26
build_sdcard.sh

@ -596,9 +596,31 @@ echo ""
echo "IMPORTANT IF WANT TO MAKE A RELEASE IMAGE FROM THIS BUILD:" echo "IMPORTANT IF WANT TO MAKE A RELEASE IMAGE FROM THIS BUILD:"
echo "login once after reboot without HDD and run 'XXprepareRelease.sh'" echo "login once after reboot without HDD and run 'XXprepareRelease.sh'"
echo "" echo ""
echo "to continue reboot with sudo shutdown -r now and login with admin"
# install LCD only on an rPI running Raspbian # install default LCD on DietPi without reboot to allow automatic build
if [ "${baseImage}" = "dietpi" ]; then
echo "Installing the default display available from Amazon"
# based on https://www.elegoo.com/tutorial/Elegoo%203.5%20inch%20Touch%20Screen%20User%20Manual%20V1.00.2017.10.09.zip
cd /home/admin/
# sudo apt-mark hold raspberrypi-bootloader
git clone https://github.com/goodtft/LCD-show.git
sudo chmod -R 755 LCD-show
sudo chown -R admin:admin LCD-show
cd LCD-show/
# sudo ./LCD35-show
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
sudo mkdir /etc/X11/xorg.conf.d
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
sudo cp -rf ./usr/99-calibration.conf-35 /etc/X11/xorg.conf.d/99-calibration.conf
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/
sudo cp ./usr/cmdline.txt /DietPI/
sudo cp ./usr/inittab /etc/
sudo cp ./boot/config-35.txt /DietPi/config.txt
echo "to continue reboot with \`sudo shutdown -r now \` and login with admin"
fi
# ask about LCD only on Raspbian
if [ "${baseImage}" = "raspbian" ]; then if [ "${baseImage}" = "raspbian" ]; then
echo "Press ENTER to install LCD and reboot ..." echo "Press ENTER to install LCD and reboot ..."
read key read key

8
dietpi/dietpi.display.sh

@ -101,7 +101,7 @@ if [ "${baseImage}" = "dietpi" ]; then
echo "Installing the default display available from Amazon" echo "Installing the default display available from Amazon"
# based on https://www.elegoo.com/tutorial/Elegoo%203.5%20inch%20Touch%20Screen%20User%20Manual%20V1.00.2017.10.09.zip # based on https://www.elegoo.com/tutorial/Elegoo%203.5%20inch%20Touch%20Screen%20User%20Manual%20V1.00.2017.10.09.zip
cd /home/admin/ cd /home/admin/
#sudo apt-mark hold raspberrypi-bootloader #sudo apt-mark hold raspberrypi-bootloader
git clone https://github.com/goodtft/LCD-show.git git clone https://github.com/goodtft/LCD-show.git
sudo chmod -R 755 LCD-show sudo chmod -R 755 LCD-show
@ -116,7 +116,7 @@ if [ "${baseImage}" = "dietpi" ]; then
sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/ sudo cp -rf ./usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/
sudo cp ./usr/cmdline.txt /DietPI/ sudo cp ./usr/cmdline.txt /DietPI/
sudo cp ./usr/inittab /etc/ sudo cp ./usr/inittab /etc/
sudo cp ./boot/config-35.txt /DietPi/config.tx sudo cp ./boot/config-35.txt /DietPi/config.txt
echo "***" echo "***"
echo "reboot with \`sudo reboot\` to have the LCD working" echo "reboot with \`sudo reboot\` to have the LCD working"
echo "***" echo "***"
@ -127,7 +127,7 @@ if [ "${baseImage}" = "dietpi" ]; then
echo "Installing the 3.5\" HDMI display from Aliexpress" echo "Installing the 3.5\" HDMI display from Aliexpress"
# based on http://www.lcdwiki.com/3.5inch_HDMI_Display-B # based on http://www.lcdwiki.com/3.5inch_HDMI_Display-B
git clone https://github.com/goodtft/LCD-show.git git clone https://github.com/goodtft/LCD-show.git
chmod -R 755 LCD-show chmod -R 755 LCD-show
cd LCD-show/ cd LCD-show/
#sudo ./MPI3508-show #sudo ./MPI3508-show
@ -137,7 +137,7 @@ if [ "${baseImage}" = "dietpi" ]; then
sudo cp ./usr/inittab /etc/ sudo cp ./usr/inittab /etc/
sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf
sudo mkdir -p /etc/X11/xorg.conf.d sudo mkdir -p /etc/X11/xorg.conf.d
sudo cp -rf ./usr/99-calibration.conf-3508 /etc/X11/xorg.conf.d/99-calibration.con sudo cp -rf ./usr/99-calibration.conf-3508 /etc/X11/xorg.conf.d/99-calibration.conf
echo "***" echo "***"
echo "reboot with \`sudo reboot\` to have the LCD working" echo "reboot with \`sudo reboot\` to have the LCD working"
echo "***" echo "***"

Loading…
Cancel
Save