Last active
March 21, 2025 17:06
-
-
Save kad/85a778e0b63fb023defa7887b4521179 to your computer and use it in GitHub Desktop.
Create ArchLinux ARM bootstrap image for RPi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir aarch64 | |
mount --bind aarch64 aarch64 | |
pacstrap -c -K -M aarch64 base archlinuxarm-keyring dhcpcd \ | |
net-tools openssh vi which \ | |
firmware-raspberrypi linux-rpi \ | |
iw ldns less openresolv \ | |
wireless-regdb wireless_tools wpa_supplicant | |
arch-chroot aarch64 sh -c "systemctl enable systemd-networkd" | |
arch-chroot aarch64 sh -c "systemctl enable systemd-resolved" | |
arch-chroot aarch64 sh -c "systemctl enable systemd-timesyncd" | |
arch-chroot aarch64 sh -c "systemctl enable sshd" | |
arch-chroot aarch64 sh -c "useradd alarm -G wheel -m" | |
arch-chroot aarch64 sh -c "echo "root" | passwd -s root" | |
arch-chroot aarch64 sh -c "echo "alarm" | passwd -s alarm" | |
arch-chroot aarch64 sh -c "echo "alarm" > /etc/hostname" | |
rm -rf aarch64/etc/pacman.d/gnupg | |
rm -rf aarch64/etc/machine-id | |
umount aarch64 |
Awesome gist! I was able to generate the image. Im now trying to user default archlinux docker image with qemu-XXXX-static and archlinuxarm pacman.conf...
On the other side... do you know why I do get wifi with dhcp on pi4 but not on pi3? how can it be fixed? Im using wpa_supplicant
it was some bug in the broadcom driver in upstream kernel or broadcom firmware, not sure. on some of my devices I was forced to use workaround:
$ cat /etc/modprobe.d/brcmfmac.conf
options brcmfmac roamoff=1 feature_disable=0x82000
Wow! Magic! Thank you!!! several days wasted to make wifi work on the pi02w and pi3!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works also with docker images.
e.g.: