RPi Zero

The Raspberry Pi Zero/W/WH is compatible with
– armv6
– armhf

Getting information about the system:
lsb_release -a

Headless SetUp

System Information

systemctl status
systemctl list-unit-files

GPIO SetUp

tmux settings [GitHub]

Clean Python

Best way as of 2024-07-24:

sudo apt remove python -y
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
sudo apt install python3 -y
sudo ln -s /usr/bin/python3 /usr/bin/python


Compile for RPi Zero WH

Go

[Install Go on RPi] :go to Go-Lang Download Site download fitting package: 2022-07-05: go1.18.3.linux-armv6l.tar.gz

wget https://go.dev/dl/go1.22.5.linux-armv6l.tar.gz
# sudo tar -C /usr/local -xzf go1.18.3.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.22.5.linux-armv6l.tar.gz
# rm go1.18.3.linux-armv6l.tar.gz
rm go1.22.5.linux-armv6l.tar.gz

git clone https://github.com/xxxserxxx/gotop.git
cd gotop
# This ugly SOB gets a usable version from the git tag list
VERS="$(git tag -l --sort=-v:refname | sed 's/v\([^-].*\)/\1/g' | head -1 | tr -d '-' ).$(git describe --long --tags | sed 's/\([^-].*\)-\([0-9]*\)-\(g.*\)/r\2.\3/g' | tr -d '-')"
DAT=$(date +%Y%m%dT%H%M%S)
go build -o gotop \
-ldflags "-X main.Version=v${VERS} -X main.BuildDate=${DAT}" \
./cmd/gotop

cp gotop/gotop /usr/bin

nano ~/.profile
PATH=$PATH:/usr/local/go/bin
GOPATH=$HOME/golang

source ~/.profile

update go mod

go mod tidy
sudo apt install golang
go get -u golang.org/x/term

Install Lazygit

possible helpful LazyGit for RPi4 GitHub Issue:
$ env GOOS=linux GOARCH=arm GOARM=5
$ chmod +x lazygit
$ cp lazygit ~/.local/bin