Setting Alpine linux-edge kernel on RPi zero W

2020-12-05

using serial console

(how to connect and use serial console is not described, there are a lot of guides how to do that on the net)

prerequisites

  • alpine linux armhf installed in sys mode on micro sd card

enable testing in /etc/apk/repositories

cp /usr/share/u-boot/rpi_0_w/u-boot.bin /boot/

vi config.txt

[pi0w]
kernel=u-boot.bin
[pi1]

prepare usercfg.txt for serial console

cat > /boot/usercfg.txt<<EOF
gpu_mem=16
dtparam=audio=off
dtoverlay=pi3-disable-bt
dtoverlay=w1-gpio
enable_uart=1
EOF

create u-boot menu config with linux-edge

mkdir -p /boot/extlinux
cat > /boot/extlinux/extlinux.conf<<'EOF'
TIMEOUT 50
PROMPT 1
DEFAULT edge

MENU TITLE RPi zero alpine

LABEL edge
MENU LABEL vmlinuz-edge
KERNEL /vmlinuz-edge
INITRD /initramfs-edge
FDTDIR /dtbs-edge
APPEND dwc_otg.lpm_enable=0 enable_uart=1 console=${console} root=/dev/mmcblk0p2 rw rootwait