Alpine Linux on arm install Part 3

Step 3: Write U-Boot and Install Alpine Rootfs

Overview

Flash u-boot to the SD card, then mount the partitions and extract the Alpine Linux aarch64 rootfs.

Write u-boot to the SD card

Sunxi (Allwinner) boards expect u-boot at the 8KB offset:

sudo dd if=./result/u-boot-sunxi-with-spl.bin of=/dev/sdd bs=1024 seek=8

Mount the partitions

sudo mkdir -p /mnt/sdcard/{boot,root}
sudo mount /dev/sdd1 /mnt/sdcard/boot
sudo mount /dev/sdd2 /mnt/sdcard/root

Download and extract Alpine rootfs

The Orange Pi Zero 2W is AArch64 (Allwinner H618), so use the aarch64 u-boot tarball:

wget https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/aarch64/alpine-uboot-3.21.3-aarch64.tar.gz

Extract to the root partition:

sudo tar -xzf alpine-uboot-3.21.3-aarch64.tar.gz -C /mnt/sdcard/root

Populate the boot partition

Copy boot files (kernel, dtbs, extlinux config) to the FAT32 boot partition:

sudo cp -r /mnt/sdcard/root/boot/* /mnt/sdcard/boot/

Verify that the DTB sun50i-h618-orangepi-zero2w.dtb is present in the boot partition and referenced correctly in extlinux/extlinux.conf.

Unmount

sudo umount /mnt/sdcard/boot /mnt/sdcard/root

Comments