Last active
March 24, 2020 01:28
-
-
Save NickEngmann/50a1d32769dadc01b8aadfd6089e300d to your computer and use it in GitHub Desktop.
Raspberry Pi Zero W Install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Copyright 2020 Achim Pieters | StudioPieters® | |
# | |
# More information on https://Studiopieters.nl | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all | |
# copies or substantial portions of the Software. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
# FITNESS FOR A PARTICULAR PURPOSE AND NO NINFRINGEMENT. IN NO EVENT SHALL THE | |
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
# | |
echo 'Downloading MagicMirror Raspberry Pi Zero W installation files' | |
git clone --recursive https://github.com/AchimPieters/MagicZeroMirror.git | |
echo 'Updating Pi' | |
sudo apt-get update; | |
echo 'Upgrading Pi' | |
sudo apt-get upgrade; | |
sudo apt-get upgrade --fix-missing; | |
echo 'Downloading node v10.16.0' | |
sudo wget https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-armv6l.tar.xz; | |
echo 'Extracting node v11.6.0' | |
tar xvf node-v10.16.0-linux-armv6l.tar.xz; | |
cd node-v10.16.0-linux-armv6l; | |
sudo cp -R * /usr/local/; | |
echo 'Installing Magic Mirror Dependencies' | |
cd ~; | |
sudo apt install npm -y; | |
sudo apt install git; | |
echo 'Cloning the latest version of Magic Mirror2' | |
git clone https://github.com/MichMich/MagicMirror; | |
echo 'Installing Magic Mirror Dependencies' | |
cd MagicMirror; | |
npm install --arch=armv7l; | |
sudo apt install chromium-browser -y; | |
sudo apt-get install xinit -y; | |
sudo apt install xorg -y; | |
sudo apt install matchbox -y; | |
sudo apt install unclutter -y; | |
echo 'Loading default config' | |
cp config/config.js.sample config/config.js; | |
echo 'Set the splash screen to be magic mirror' | |
THEME_DIR="/usr/share/plymouth/themes" | |
sudo mkdir $THEME_DIR/MagicMirror; | |
sudo cp ~/MagicMirror/splashscreen/splash.png $THEME_DIR/MagicMirror/splash.png && sudo cp ~/MagicMirror/splashscreen/MagicMirror.plymouth $THEME_DIR/MagicMirror/MagicMirror.plymouth && sudo cp ~/MagicMirror/splashscreen/MagicMirror.script $THEME_DIR/MagicMirror/MagicMirror.script; | |
sudo plymouth-set-default-theme -R MagicMirror; | |
echo 'Module Install Scripts' | |
cd /tmp; | |
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz; | |
tar zxvf bcm2835-1.60.tar.gz; | |
cd bcm2835-1.60/; | |
sudo ./configure; | |
sudo make; | |
sudo make check; | |
sudo make install; | |
cd /tmp; | |
wget https://project-downloads.drogon.net/wiringpi-latest.deb; | |
sudo dpkg -i wiringpi-latest.deb; | |
gpio -v; | |
sudo apt-get update; | |
sudo apt-get install python-pip python-pil python-numpy python3-pip python3-pil python3-numpy; | |
sudo pip install RPi.GPIO spidev; | |
sudo pip3 install RPi.GPIO spidev; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment