1. General First steps ↓

How to prepare a fresh install on raspberry pi. Installations needed to run the main installer later

Update and upgrade the system (if you haven't done already so):

sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt update && sudo apt full-upgrade -y
sudo apt autoremove
sudo reboot now

Note: If you are in China, you might need to install a VPN in your raspbian to have quick handshakes with GitHub later. Recommendation for an easy to use cli base VPN would be express-vpn. 🤨

Next is to Install git:

sudo apt-get install git -y

Create a safer git up alias:

You might ask why? It's because, later we would be using our UI to get latest version of the cloned firmware. Manually if we have to do it we would use, git pull in the cloned repository. But this time we would be using the UI script and it is not recommended to use git pull from a script.

Explanation: here and here

git config --global alias.up '!git remote update -p; git merge --ff-only @{u}'

[TBD] Configure git to save your credentials:

[TBD] Setup in organisation's git account, ssh keys off all the pi's we want to install these on

Add a sourcing .bashrc

sudo nano ~/.bashrc

Append to the end of the file:

alias brc='source ~/.bashrc'

Now check python3 installation and install pip3:

If it is not installed, update to Python3

which python3
# /<PATH to Python3>/python3

On a first fresh install, if you run:

which pip3
# nothing

So install pip3 and setup-tools:

sudo apt-get install python3-pip -y
python3 -m pip install --upgrade pip
sudo pip3 install --upgrade setuptools

To have serial port access from scripts that are run by the current user, in linux, you need to add that user to dialout group:

sudo usermod -a -G dialout <USER>
# example: My usr is defualt pi
sudo usermod -a -G dialout pi

Finally:

sudo reboot

System is ready for next steps. 🤓

Install yq:

wget https://github.com/mikefarah/yq/releases/download/<$version>/yq_linux_arm.tar.gz
tar -xvzf yq_linux_arm.tar.gz
mv yq_linux_arm.tar.gz yq
sudo chmod +x yq
sudo cp yq /usr/local/bin/yq

Install some dependencies, may be required by PIL (Python Imaging Library) later:

sudo apt-get install libjpeg-dev -y
sudo apt-get install zlib1g-dev -y
sudo apt-get install libfreetype6-dev -y
sudo apt-get install liblcms1-dev -y
sudo apt-get install libopenjp2-7 -y
sudo apt-get install libtiff5 -y
sudo apt-get install build-essential -y

Enable Serial on pi

sudo raspi-config

Disable Console over HW serial

Enable HW serial

Last updated