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.
Configuring the SD-Card
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.
Setup
Login as root. Runt the normal setup-alpine script until the Disk & Install section. Here it displays, that No disks available and if it should try the boot media. Enter y for yes. Next, select your disk. In my case it is mmcblk0. This may vary in your setup. On the next step, I’ve chose sys. You might want to change this. The ? option is very useful for selecting the best option. Afterwards, confirm that you want to erase the disk. Enter y for yes. Afterwards reboot using reboot now. Now the Hackberry has Alpine installed, however, we again need to use another computer to configure the video output. This is documented in the Configuring the SD-Card section.