I have an old (version 3) Raspberry Pi from the era in which I worked on IoT. Here I tried to configure it with ArchLinux (aarch64 architecture). Also I bought a new Raspberry Pi (version 4) and I want to install ArchLinux on it (aarch64 as well).
The BCM2835 is the Broadcom chip used in the Raspberry Pi Model A, B, B+, the Compute Module, and the Raspberry Pi Zero. Datasheet
The Broadcom chip used in the Raspberry Pi 2 Model B. The underlying architecture in BCM2836 is identical to BCM2835. The only significant difference is the removal of the ARM1176JZF-S processor and replacement with a quad-core Cortex-A7 cluster.
This is the Broadcom chip used in the Raspberry Pi 3, and in later models of the Raspberry Pi 2. The underlying architecture of the BCM2837 is identical to the BCM2836. The only significant difference is the replacement of the ARMv7 quad core cluster with a quad-core ARM Cortex A53 (ARMv8) cluster. The ARM cores run at 1.2GHz, making the device about 50% faster than the Raspberry Pi 2. The VideoCore IV runs at 400MHz.
This is the Broadcom chip used in the Raspberry Pi 3B+ and 3A+. The underlying architecture of the BCM2837B0 is identical to the BCM2837 chip used in other versions of the Pi. The ARM core hardware is the same, only the frequency is rated higher. The ARM cores are capable of running at up to 1.4GHz, making the 3B+/3A+ about 17% faster than the original Raspberry Pi 3. The VideoCore IV runs at 400MHz. The ARM core is 64-bit, while the VideoCore IV is 32-bit. The BCM2837B0 chip is packaged slightly differently to the BCM2837, and most notably includes a heat spreader for better thermals. This allows higher clock frequencies, and more accurate monitoring and control of the chipβs temperature.
This is the Broadcom chip used in the Raspberry Pi 4 Model B. The architecture of the BCM2711 is a considerable upgrade on that used by the SoCs in earlier Raspberry Pi models. It continues the quad-core CPU design of the BCM2837, but uses the more powerful ARM A72 core. It has a greatly improved GPU feature set with much faster input/output, due to the incorporation of a PCIe link that connects the USB 2 and USB 3 ports, and a natively attached Ethernet controller. It is also capable of addressing more memory than the SoCs used before.
The ARM cores are capable of running at up to 1.5 GHz, making the Pi 4 about 50% faster than the Raspberry Pi 3B+. The new VideoCore VI 3D unit now runs at up to 500 MHz. The ARM cores are 64-bit, and while the VideoCore is 32-bit, there is a new Memory Management Unit, which means it can access more memory than previous versions.
The BCM2711 chip continues to use the heat spreading technology started with the BCM2837B0, which provides better thermal management.
- Processor: Quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5 GHz.
- Memory: Accesses up to 8GB LPDDR4-2400 SDRAM (depending on model)
- Caches: 32 KB data + 48 KB instruction L1 cache per core. 1MB L2 cache.
- Multimedia: H.265 (4Kp60 decode); H.264 (1080p60 decode, 1080p30 encode); OpenGL ES, 3.0 graphics
- I/O: PCIe bus, onboard Ethernet port, 2 Γ DSI ports (only one exposed on Raspberry Pi 4B), 2 Γ CSI ports (only one exposed on Raspberry Pi 4B), up to 6 Γ I2C, up to 6 Γ UART (muxed with I2C), up to 6 Γ SPI (only five exposed on Raspberry Pi 4B), dual HDMI video output, composite video output.
The Raspberry Pi uses a configuration file instead of the BIOS you would expect to find on a conventional PC. The system configuration parameters, which would traditionally be edited and stored using a BIOS, are stored instead in an optional text file named config.txt.
Raspberry Pi GPIO library for golang
Raspberry Pi Expansion Board, Miscellaneous Components, All-in-One read more
- CP2102: USB To UART Bridge
- DS3231: Extremely Accurate I2C-IntegratedRTC/TCXO/Crystal
- BMP180: Digital pressure sensor
- SSD1306: OEL Display Module
- PCF8591: 8-bit A/D and D/A converter
- PCF8574: Remote 8-bit I/O expander for I2C-bus
Arch Linux ARM on a Pi 4 is a great learning / tinkering platform, but it is not what I would pick for a device that needs to "just work" unattended:
- Rolling release + a smaller ARM testing base means breakage after a large
pacman -Syuis more common than on x86_64 Arch. Keyring drift (archlinux-keyring/archlinuxarm-keyring) can blockpacmanuntil fixed by hand β painful on a headless board. - There is no Pi-specific tuning out of the box (log2ram, zram, SD-friendly I/O defaults). You assemble it yourself.
- HAT overlays,
libcamera, and hardware video decode are documented almost exclusively against Raspberry Pi OS; Arch users are on their own. - Stick to the
linux-rpikernel (notlinux-aarch64) β it's the one actually maintained for Pi hardware.
If long-term stability is the priority, prefer one of:
- Raspberry Pi OS (64-bit, Trixie) β official, firmware-matched, boring in the good way.
- Ubuntu Server 24.04 LTS for Pi β 5-year Canonical support.
- Debian ARM64 β upstream Debian without the Pi skin.
- openSUSE MicroOS / Fedora IoT β transactional updates for appliance-style deployments.
The rest of this document focuses on Arch because that's the hobby track I'm on, but a Raspberry Pi OS quickstart is included below.
The officially supported path. Works on Pi 3, 4, 5, and Zero 2 W.
-
Download Raspberry Pi Imager from https://www.raspberrypi.com/software/ (the Imager is the recommended tool; do not hand-flash legacy
.imgfiles unless you know why). -
Launch the Imager, pick:
- Device: Raspberry Pi 4
- OS: "Raspberry Pi OS (64-bit)" β based on Debian Trixie as of 2026
- Storage: your SD card
-
Click the gear / "Edit settings" (or press
Ctrl+Shift+X) to pre-configure the image before flashing:- Set hostname (e.g.
pi.parham.home) - Create the initial user + password (the default
pi/raspberryaccount was removed in Bookworm; you must supply your own) - Enable SSH and paste your public key
- Configure Wi-Fi SSID / password and locale
- This populates a
firstrun.shthat executes on first boot.
- Set hostname (e.g.
-
Flash, insert the SD card, connect Ethernet (if available), and power on.
-
From your workstation:
ssh parham@pi.parham.home sudo apt update && sudo apt full-upgrade sudo rpi-update # only if you actually need bleeding-edge firmware
-
Useful first-run commands:
sudo raspi-config # interactive: enable I2C / SPI / camera / serial sudo apt install git vim tmux
Note: Raspberry Pi does not support in-place upgrades between major releases (e.g. Bookworm β Trixie). The supported path is to flash a fresh image and reinstall your applications.
-
Start
fdiskto partition the SD card -
At the
fdiskprompt, delete old partitions and create new ones:- Type o. This will clear out any partitions on the drive.
- Type p to list partitions. There should be no partitions left.
- Type n, then p for primary, 1 for the first partition on the drive, press ENTER to accept the default first sector, then type +200M for the last sector.
- Type t, then c to set the first partition to type W95 FAT32 (LBA).
- Type n, then p for primary, 2 for the second partition on the drive, and then press ENTER twice to accept the default first and last sector.
- Write the partition table and exit by typing w.
-
sudo pacman -Syu dosfstoolsto use FAT filesystem. -
Create and mount the ext4 filesystem:
mkfs.ext4 /dev/sdX2 mount /dev/sdX2 /mnt
-
create and mount the FAT filesystem:
mkfs.vfat /dev/sdX1 mkdir /mnt/boot mount /dev/sdX1 /mnt/boot
-
Download (https://archlinuxarm.org) and extract the root file system (as root, not via sudo):
# aarch64 (rpi3) aria2c http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz tar xvfz ArchLinuxARM-rpi-aarch64-latest.tar.gz -C /mnt# aarch64 (rpi4) β the rpi-aarch64 tarball supports both Pi 3 and Pi 4 aria2c http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz tar xvfz ArchLinuxARM-rpi-aarch64-latest.tar.gz -C /mnt -
Insert the SD card into the Raspberry Pi, connect Ethernet cable, and apply 5V power.
-
With models that has built-in Bluetooth support you need to apply following layout and kernel parameters to make the serial console work.
config.txt:
dtoverlay=miniuart-btcmdline.txt:
console=tty1 console=ttyAMA0,115200
-
Use the serial console or SSH to the IP address given to the board by your router.
- Login as the default user
alarmwith the passwordalarm. - The default
rootpassword isroot. - Change both passwords immediately with
passwd(asalarm) andpasswd(asroot) before exposing the device to any network.
- Login as the default user
-
Initialize the pacman keyring and populate the Arch Linux ARM package signing keys:
su pacman-key --init pacman-key --populate archlinuxarm pacman -Syu pacman -S --needed base-devel
su
useradd -m parham
# `wheel` is the conventional admin group on Arch; it already exists.
usermod -a -G wheel parham
passwd parham
# uncomment the `%wheel ALL=(ALL:ALL) ALL` line
EDITOR=vim visudowe use systemd-networkd for networking:
[Match]
Name=eth0
[Network]
Address=192.168.73.98/24
Gateway=192.168.73.254
DNS=192.168.73.254
DNS=8.8.8.8
Save the above configuration in /etc/systemd/network/20-wired.network. Then enable it with the following command:
sudo systemctl restart systemd-networkdFor Wi-Fi, netctl / wifi-menu has been removed from Arch Linux ARM β use
iwd instead, either standalone or as
a backend for systemd-networkd / NetworkManager.
sudo pacman -S iwd
sudo systemctl enable --now iwd.service
# interactive client
iwctl
# at the prompt:
# device list
# station wlan0 scan
# station wlan0 get-networks
# station wlan0 connect "Parham-Main"To combine iwd with the existing systemd-networkd setup, add a matching
.network file for wlan0 under /etc/systemd/network/ and let iwd handle
authentication.
First copy the ssh public key into the host and then install the following packages, after that you are ready for Ansible.
ssh-copy-idsudo pacman -Syu python inetutilsIn order to use AUR on ARM Arch, we can clone it and make it manually. For example:
git clone https://aur.archlinux.org/blocky.git
cd blocky
makepkg -siThe legacy /sys/class/gpio sysfs interface has been removed from modern
Linux kernels. The current best practice is libgpiod
with the gpioset / gpioget CLI tools.
sudo pacman -S libgpiod
# drive GPIO26 high, works across Pi 3/4/5 via the named line
gpioset GPIO26=1
# hold the line high for 2 seconds, then release
gpioset --hold-period 2s -t0 GPIO26=1The led.sh helper in this repo wraps gpioset with positional arguments.
modules-load.d/raspberrypi.conf lists kernel modules to autoload at boot
(IΒ²C, SPI, etc.). Copy it to /etc/modules-load.d/ on the target device.