ivanpollak.com

Alpine Linux on a Hackberry Pi

How I installed Alpine Linux on a Hackberry Pi handheld computer.


Why Alpine

I recently got into Alpine, mostly because of CI and then because of my home-labbing server. I really enjoy working and using this distribution because everything is so lightweight, even the init system.

Because it is so lightweight, it is a perfect fit for the Hackberry Pi Zero 2 W.

Installation

First, an SD-Card, a Computer with an SD-Card reader and a Raspberry Pi Zero 2 W is needed. To flash Alpine on the SD-Card, I used the Raspberry Pi Imager. In there, I've chose Raspberry Pi Zero 2 W>Other general-purpose OS>Alpine Linux>Alpine Linux (64 Bit). Afterwards, I chose my SD-Card and flashed the OS.

If the SD-Card is now inserted, no video output will be displayed. This is because the device tree's need to be loaded via the usercfg.txt file. This is a bit different from normal Raspberry Pi OS, because the config doesn't happen in config.txt.

So create a file, located at Path/To/Your/SD-Card/ (NOT /boot/usercfg.txt), called usercfg.txt. Add the following contents:

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Hackberry Pi
dtoverlay=vc4-kms-dpi-hyperpixel4sq

Now, insert the SD-Card into the Hackberry Pi, and boot it up. Wait until the LED on top is not blinking anymore, shut it down again and boot it up again.

Afterwards, the display should show the OpenRC boot process.

Sources


by ivanpollak