Christian Rotzoll
6 years ago
9 changed files with 462 additions and 379 deletions
@ -0,0 +1,40 @@ |
|||
# ⚡️ RaspiBlitz-on-DietPi ⚡️ |
|||
## Tested on the Raspberry Pi 3 B + |
|||
|
|||
### The automated building process: |
|||
|
|||
1) Download the DietPi image for the Raspberry Pi: |
|||
https://dietpi.com/downloads/images/DietPi_RPi-ARMv6-Stretch.7z |
|||
|
|||
2) Burn it to the SD card with [Etcher](https://www.balena.io/etcher/) |
|||
|
|||
3) Right click and download the following two files: [DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/dietpi.txt), [Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/Automation_Custom_Script.sh) |
|||
|
|||
4) Copy them to the /boot directory of the DietPi SDcard |
|||
|
|||
[DietPi.txt](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/dietpi.txt): Overwrites the default dietpi.txt. Modified the settings to automate the DietPi setup. (see the details [here](https://github.com/rootzoll/raspiblitz/tree/dev/dietpi#excerpts-from-the-customized-dietpitxt)) |
|||
|
|||
[Automation_Custom_Script.sh](https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/dietpi/boot/Automation_Custom_Script.sh): Runs after DietPi installation is completed. Contains the link to download and run the build_sdcard.sh from the dev branch of @rootzoll. |
|||
(Optionally open the file with a text editor and uncomment (remove the `#` from the front of) the line with the branch you want to build the SDcard from.) |
|||
|
|||
5) Assemble and boot the Raspberry Pi |
|||
|
|||
Insert the SDcard, connect the HDD, network cable and power supply to boot. |
|||
(The default LCD will be set up automatically) |
|||
|
|||
|
|||
The automated setup will continue and the Raspberry Pi will restart at least twice during the process. This will take up to an hour. |
|||
To follow the logs during the automated building process login with `root` and press CTRL+C. |
|||
`tail -n1000 -f /tmp/DietPi-Update/dietpi-update.log` - follow the dietpi-update process |
|||
`tail -n1000 -f /var/tmp/dietpi/logs/dietpi-automation_custom_script.log` follow the output of the build_sdcard.sh |
|||
|
|||
|
|||
6) When the setup is finished log in as `admin`: |
|||
`ssh admin@[IP-OF-RASPIBLITZ]` |
|||
password: `raspiblitz` |
|||
|
|||
The setup continues with the [RaspiBlitz Setup Process](https://github.com/rootzoll/raspiblitz/blob/master/README.md#setup-process-detailed-documentation) |
|||
|
|||
--- |
|||
### To build manually: |
|||
[Follow the generic DietPi install process.](https://github.com/rootzoll/raspiblitz/tree/dev/dietpi#general-guide-for-the-raspiblitz-on-dietpi) |
File diff suppressed because one or more lines are too long
@ -1 +1,14 @@ |
|||
wget https://raw.githubusercontent.com/openoms/raspiblitz/raspiblitz-dev/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh raspiblitz-dev openoms |
|||
# Use this format to build the SDcard with the Raspiblitz script: |
|||
# wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh [BRANCH] [GITHUB-USERNAME]` |
|||
# If you are working from a forked repo be aware of that the fork needs to be called `raspiblitz` for the git downloads to work. |
|||
|
|||
# Uncomment the line with the branch you want to build the SDcard from: |
|||
|
|||
# @rootzoll master branch: |
|||
# wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/build_sdcard.sh && sudo bash build_sdcard.sh |
|||
|
|||
# @rootzoll dev branch: |
|||
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh && sudo bash build_sdcard.sh dev |
|||
|
|||
# @openoms DietPi branch: |
|||
# wget https://raw.githubusercontent.com/openoms/raspiblitz/DietPi/build_sdcard.sh && sudo bash build_sdcard.sh DietPi openoms |
@ -0,0 +1,210 @@ |
|||
# To run this script on your RaspiBlitz, copy the following line to the ssh terminal (after the #): |
|||
# wget https://raw.githubusercontent.com/openoms/raspiblitz/DietPi/dietpi/dietpi.display.sh && sudo chmod +x dietpi.display.sh && ./dietpi.display.sh |
|||
|
|||
# keep in mind that DietPi for Raspberry is also a stripped down Raspbian |
|||
echo "Detect Base Image ..." |
|||
baseImage="?" |
|||
isDietPi=$(uname -n | grep -c 'DietPi') |
|||
isRaspbian=$(cat /etc/os-release 2>/dev/null | grep -c 'Raspbian') |
|||
if [ ${isRaspbian} -gt 0 ]; then |
|||
baseImage="raspbian" |
|||
fi |
|||
if [ ${isDietPi} -gt 0 ]; then |
|||
baseImage="dietpi" |
|||
fi |
|||
if [ "${baseImage}" = "?" ]; then |
|||
cat /etc/os-release 2>/dev/null |
|||
echo "!!! FAIL !!!" |
|||
echo "Base Image cannot be detected or is not supported." |
|||
exit 1 |
|||
else |
|||
echo "OK running ${baseImage}" |
|||
fi |
|||
|
|||
|
|||
if [ "${baseImage}" = "raspbian" ]; then |
|||
echo "Press ENTER to install LCD and reboot ..." |
|||
read key |
|||
|
|||
# give Raspi a default hostname (optional) |
|||
sudo raspi-config nonint do_hostname "RaspiBlitz" |
|||
|
|||
# *** Display selection *** |
|||
dialog --title "Display" --yesno "Are you using the default display available from Amazon?\nSelect 'No' if you are using the Swiss version from play-zone.ch!" 6 80 |
|||
defaultDisplay=$? |
|||
|
|||
if [ "${defaultDisplay}" = "0" ]; then |
|||
|
|||
# *** RASPIBLITZ / LCD (at last - because makes a reboot) *** |
|||
# based on https://www.elegoo.com/tutorial/Elegoo%203.5%20inch%20Touch%20Screen%20User%20Manual%20V1.00.2017.10.09.zip |
|||
|
|||
echo "--> LCD DEFAULT" |
|||
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 |
|||
|
|||
else |
|||
|
|||
# Download and install the driver |
|||
# based on http://www.raspberrypiwiki.com/index.php/3.5_inch_TFT_800x480@60fps |
|||
|
|||
echo "--> LCD ALTERNATIVE" |
|||
cd /boot |
|||
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 |
|||
cat <<EOF >> config.txt |
|||
|
|||
dtparam=spi=off |
|||
dtparam=i2c_arm=off |
|||
|
|||
# Set screen size and any overscan required |
|||
overscan_left=0 |
|||
overscan_right=0 |
|||
overscan_top=0 |
|||
overscan_bottom=0 |
|||
framebuffer_width=800 |
|||
framebuffer_height=480 |
|||
|
|||
|
|||
enable_dpi_lcd=1 |
|||
display_default_lcd=1 |
|||
dpi_group=2 |
|||
dpi_mode=87 |
|||
dpi_output_format=0x6f015 |
|||
|
|||
# set up the size to 800x480 |
|||
hdmi_timings=480 0 16 16 24 800 0 4 2 2 0 0 0 60 0 32000000 6 |
|||
|
|||
#rotate screen |
|||
display_rotate=3 |
|||
|
|||
dtoverlay=i2c-gpio,i2c_gpio_scl=24,i2c_gpio_sda=23 |
|||
fi |
|||
EOF |
|||
init 6 |
|||
fi |
|||
fi |
|||
|
|||
|
|||
if [ "${baseImage}" = "dietpi" ]; then |
|||
|
|||
OPTIONS=(GPIO "Install the default display available from Amazon" \ |
|||
HDMI "Install the 3.5\" HDMI display from Aliexpress" \ |
|||
SWISS "Install the Swiss version from play-zone.ch" |
|||
) |
|||
|
|||
CHOICE=$(dialog --backtitle "RaspiBlitz - Display Install" --clear --title "Display Install" --menu "Choose a your diplay:" 10 70 6 "${OPTIONS[@]}" 2>&1 >/dev/tty) |
|||
|
|||
if [ "${CHOICE}" = "GPIO" ]; 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 |
|||
|
|||
# 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 make the LCD work" |
|||
echo "***" |
|||
|
|||
exit |
|||
|
|||
elif [ "${CHOICE}" = "HDMI" ]; then |
|||
echo "Installing the 3.5\" HDMI display from Aliexpress" |
|||
|
|||
# based on http://www.lcdwiki.com/3.5inch_HDMI_Display-B |
|||
git clone https://github.com/goodtft/LCD-show.git |
|||
sudo chmod -R 755 LCD-show |
|||
cd LCD-show/ |
|||
#sudo ./MPI3508-show |
|||
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf |
|||
sudo cp -rf ./boot/config-35-480X320.txt /DietPi/config.txt |
|||
sudo cp ./usr/cmdline.txt /DietPi/ |
|||
sudo cp ./usr/inittab /etc/ |
|||
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 make the LCD work" |
|||
echo "***" |
|||
|
|||
exit |
|||
|
|||
elif [ "${CHOICE}" = "SWISS" ]; then |
|||
|
|||
# Download and install the driver |
|||
# 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 |
|||
cat <<EOF >> config.txt |
|||
|
|||
dtparam=spi=off |
|||
dtparam=i2c_arm=off |
|||
|
|||
# Set screen size and any overscan required |
|||
overscan_left=0 |
|||
overscan_right=0 |
|||
overscan_top=0 |
|||
overscan_bottom=0 |
|||
framebuffer_width=800 |
|||
framebuffer_height=480 |
|||
|
|||
|
|||
enable_dpi_lcd=1 |
|||
display_default_lcd=1 |
|||
dpi_group=2 |
|||
dpi_mode=87 |
|||
dpi_output_format=0x6f015 |
|||
|
|||
# set up the size to 800x480 |
|||
hdmi_timings=480 0 16 16 24 800 0 4 2 2 0 0 0 60 0 32000000 6 |
|||
|
|||
#rotate screen |
|||
display_rotate=3 |
|||
|
|||
dtoverlay=i2c-gpio,i2c_gpio_scl=24,i2c_gpio_sda=23 |
|||
fi |
|||
EOF |
|||
init 6 |
|||
fi |
|||
|
|||
else |
|||
echo "CANCEL" |
|||
exit |
|||
fi |
Loading…
Reference in new issue