Raspberry Pi Zero W - Installation

From Alpine Linux

Write image to SD

tar -xzvf alpine-rpi-3.9.2-armhf.tar.gz -C /run/media/sodface/0AA7-5C18/

Edit cmdline.txt and add line for serial console

modules=loop,squashfs,sd-mod,usb-storage quiet dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200

Create usercfg.txt and edit

gpu_mem=16 dtparam=audio=off dtoverlay=pi3-disable-bt dtoverlay=w1-gpio enable_uart=1

Create cache folder and add rng-tools packages

mkdir /run/media/sodface/0AA7-5C18/cache

I copy pasted the following into the cache dir on sd card. I have another Alpine env to apk fetch packages from (chroot on Fedora)

rng-tools-6.3.1-r1.652a1399.apk rng-tools-openrc-6.3.1-r1.e9b063f8.apk sysfsutils-2.1.0-r8.apk

Boot pi with prepared sd card, login as root and add packages

localhost:~# setup-apkcache Enter apk cache directory (or '?' or 'none') [/var/cache/apk]: /media/mmcblk0p1/cache/ localhost:~# apk add --allow-untrusted /media/mmcblk0p1/cache/sysfsutils-2.1.0-r8.apk (1/1) Installing sysfsutils (2.1.0-r8) Executing busybox-1.29.3-r10.trigger OK: 8 MiB in 21 packages localhost:~# apk add --allow-untrusted /media/mmcblk0p1/cache/rng-tools-6.3.1-r1.652a1399.apk (1/1) Installing rng-tools (6.3.1-r1) Executing busybox-1.29.3-r10.trigger OK: 8 MiB in 22 packages localhost:~# apk add --allow-untrusted /media/mmcblk0p1/cache/rng-tools-openrc-6.3.1-r1.e9b063f8.apk (1/1) Installing rng-tools-openrc (6.3.1-r1) OK: 8 MiB in 23 packages

Start rngd service

localhost:~# service rngd start * Caching service dependencies ... [ ok ] * Starting rngd ... Initalizing available sources [ ok ]

Run setup-alpine wifi connection should setup ok with rngd running.

The setup process turns off the rngd service at some point but it's after wifi is connected

setup-alpine

Configure services, removing networking from boot results in it not being present in any stage which seems like the wrong fix but it still gets run by something and after rngd and wpa_supplicant which is what we want:

pet-protect:~# rc-update add rngd boot * service rngd added to runlevel boot pet-protect:~# rc-update add wpa_supplicant boot * service wpa_supplicant added to runlevel boot pet-protect:~# rc-update del networking boot * service networking removed from runlevel boot pet-protect:~# rc-update -u * Caching service dependencies ... [ ok ] pet-protect:~# lbu commit -d pet-protect:~# reboot