From ae4cbc5ae30a2149df872ab2a47fe86ebea3ac26 Mon Sep 17 00:00:00 2001 From: openoms Date: Wed, 27 Mar 2019 12:56:55 +0000 Subject: [PATCH 1/2] update font in console-setup --- dietpi/dietpi.display.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/dietpi/dietpi.display.sh b/dietpi/dietpi.display.sh index 86548ae..37a9fdb 100644 --- a/dietpi/dietpi.display.sh +++ b/dietpi/dietpi.display.sh @@ -119,8 +119,14 @@ if [ "${baseImage}" = "dietpi" ]; then sudo cp ./usr/cmdline.txt /DietPi/ sudo cp ./usr/inittab /etc/ sudo cp ./boot/config-35.txt /DietPi/config.txt + + # revert font change + # based on https://www.raspberrypi-spy.co.uk/2014/04/how-to-change-the-command-line-font-size/ + sudo sed -i 's/FONTFACE="TerminusBold"/FONTFACE="Fixed"/' /etc/default/console-setup + sudo sed -i 's/FONTSIZE="12x24"/FONTSIZE="8x16"/' /etc/default/console-setup + echo "***" - echo "reboot with \`sudo reboot\` to have the LCD working" + echo "reboot with \`sudo reboot\` to make the LCD work" echo "***" exit @@ -130,7 +136,7 @@ if [ "${baseImage}" = "dietpi" ]; then # based on http://www.lcdwiki.com/3.5inch_HDMI_Display-B git clone https://github.com/goodtft/LCD-show.git - chmod -R 755 LCD-show + sudo chmod -R 755 LCD-show cd LCD-show/ #sudo ./MPI3508-show sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf @@ -140,8 +146,13 @@ if [ "${baseImage}" = "dietpi" ]; then 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 cp -rf ./usr/99-calibration.conf-3508 /etc/X11/xorg.conf.d/99-calibration.conf + + # based on https://www.raspberrypi-spy.co.uk/2014/04/how-to-change-the-command-line-font-size/ + sudo sed -i 's/FONTFACE="Fixed"/FONTFACE="TerminusBold"/' /etc/default/console-setup + sudo sed -i 's/FONTSIZE="8x16"/FONTSIZE="12x24"/' /etc/default/console-setup + echo "***" - echo "reboot with \`sudo reboot\` to have the LCD working" + echo "reboot with \`sudo reboot\` to make the LCD work" echo "***" exit @@ -152,6 +163,12 @@ if [ "${baseImage}" = "dietpi" ]; then # based on http://www.raspberrypiwiki.com/index.php/3.5_inch_TFT_800x480@60fps echo "--> LCD ALTERNATIVE" + + # revert font change + # based on https://www.raspberrypi-spy.co.uk/2014/04/how-to-change-the-command-line-font-size/ + sudo sed -i 's/FONTFACE="TerminusBold"/FONTFACE="Fixed"/' /etc/default/console-setup + sudo sed -i 's/FONTSIZE="12x24"/FONTSIZE="8x16"/' /etc/default/console-setup + cd /DietPi sudo wget http://www.raspberrypiwiki.com/download/RPI-HD-35-INCH-TFT/dt-blob-For-3B-plus.bin sudo mv dt-blob-For-3B-plus.bin dt-blob.bin From 78da20c46bf0ba7013dde05a0f75ddb3905fbbf5 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 31 Mar 2019 12:58:10 +0100 Subject: [PATCH 2/2] make LCD screen rotation correct on DietPi --- build_sdcard.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 8924c95..001ef98 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -532,6 +532,15 @@ if [ "${baseImage}" = "raspbian" ]; then sudo bash -c 'echo "SCRIPT=/home/admin/00infoLCD.sh" >> /home/pi/.bashrc' sudo bash -c 'echo "# replace shell with script => logout when exiting script" >> /home/pi/.bashrc' sudo bash -c 'echo "exec \$SCRIPT" >> /home/pi/.bashrc' + + # create /home/admin/setup.sh - which will get executed after reboot by autologin pi user + cat > /home/admin/setup.sh <> /home/dietpi/.bashrc' fi -# create /home/admin/setup.sh - which will get executed after reboot by autologin pi user -cat > /home/admin/setup.sh <