Wireless network for Raspberry Pi 4 with Buildroot

Enable wireless network (and SSH access) on a minimal Linux for the Raspberry Pi 4.


On each board Buildroot ships configuration for, only eth0 is configured by default. The Raspberry Pi boards, on the other hand, are generally capable of wireless connectivity.
Trying to enable wlan0 proved not to be so straight forward, as many of the articles I’ve found are now a bit outdated. But eventually it boils down to few little settings.


Jump to the configuration file already: rpi4_wifi_defconfig

RPI firmware

TODO: On top of the default buildroot (2023.11) config, the following settings enabled the wifi:


The brcmfmac drivers alone however, will not get us quite there. If you try to build and run the system now, it will show no dmesg about the driver.

Enable MDEV

As described in this post the WiFi components on the Pi come up a little late, so we need to modprobe the WiFi driver brcmfmac, manually, or use an hotplug mechanism that would automate that: enter MDEV.

  • System Configurations -> /dev management -> Dynamic using Devtmpfs + mdev

will set the following value:


For some more insights refer to 6.2. /dev management.

Network packages

# network interfaces manager

# SSH support

Here iwd is preferred to the wpa_supplicant, since it works pretty much out-of-the-box with a simple rootfs overlay:

# /var/lib/iwd/<MyWifiSSID>.psk


Custom user

The Buildroot manual describes how to add custom users, besides “root”, in 9.6. Adding custom user accounts. A user(table) file that defines the standard Raspberry Pi user looks like this:

pi -1 pi -1 =raspberry /home/pi /bin/sh -

Then the user file must be added to the configuration:


Watch out! Each line MUST be terminated and MUST be terminated right, which is each line having a trailing \n, and the last line being an empty one.

Watch out! The user home folder like for example /home/pi is created automatically by Buildroot.

Watch out! To make sure the format is correct and no other character are injected, use nano, vi or another basic editor.