<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Habchab</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Habchab"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Habchab"/>
	<updated>2026-04-26T11:04:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=32147</id>
		<title>Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Raspberry_Pi&amp;diff=32147"/>
		<updated>2026-03-05T15:08:38Z</updated>

		<summary type="html">&lt;p&gt;Habchab: /* Serial ports &amp;amp; console */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
Raspberry Pi devices are well supported on Alpine Linux by default. This page enlightens few specific information like [[#Preparing_for_the_installation| install media creation]], [[#Post_Installation| post-install]] customization and [[#Troubleshooting| troubleshooting]]. &lt;br /&gt;
&lt;br /&gt;
== Compatibility list ==&lt;br /&gt;
&lt;br /&gt;
Refer to the information regarding Raspberry Pi models in the below table when choosing image/file to download from [https://alpinelinux.org/downloads/ Downloads] page for your device. [[Installation#Verifying_downloaded_image|Verify]] the downloaded image before proceeding further.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; align=&amp;quot;center&amp;quot; style=&amp;quot;width:100%; border:1px #0771a6 solid; background:#f9f9f9; text-align:left; border-collapse:collapse;&amp;quot;&lt;br /&gt;
!Port !!  Raspberry Pi Models &lt;br /&gt;
|-&lt;br /&gt;
|armhf ||  Pi 1, Zero, ZeroW, cm1 &amp;lt;br&amp;gt;([https://www.raspberrypi.com/documentation/computers/processors.html#bcm2835 BCM2835] devices with [https://www.raspberrypi.com/documentation/computers/configuration.html#kernel-files-img v6] kernel and [https://www.raspberrypi.com/documentation/computers/linux_kernel.html#native-build-configuration bcmrpi_defconfig])&lt;br /&gt;
|-&lt;br /&gt;
|armv7 || Pi 2, 3, 3+, Zero2W, cm0, cm3, cm3+ &amp;lt;br&amp;gt;([https://www.raspberrypi.com/documentation/computers/processors.html#bcm2836 BCM2836] and [https://www.raspberrypi.com/documentation/computers/processors.html#bcm2837 BCM2837A/B0, RP3A0] devices with [https://www.raspberrypi.com/documentation/computers/configuration.html#kernel-files-img v7] kernel and [https://www.raspberrypi.com/documentation/computers/linux_kernel.html#native-build-configuration bcm2709_defconfig])&lt;br /&gt;
|-&lt;br /&gt;
| aarch64 || Pi 2 (rev 1.2+), 3, 3+, Zero2W, cm0, cm3, cm3+, 4, 400, cm4, 5, 500, 500+, cm5 &amp;lt;br&amp;gt;([https://www.raspberrypi.com/documentation/computers/processors.html#bcm2837 BCM2837A/B0, RP3A0], [https://www.raspberrypi.com/documentation/computers/processors.html#bcm2711 BCM2711] and [https://www.raspberrypi.com/documentation/computers/processors.html#bcm2712 BCM2712] devices with [https://www.raspberrypi.com/documentation/computers/configuration.html#kernel-files-img v8] kernel and [https://www.raspberrypi.com/documentation/computers/linux_kernel.html#native-build-configuration bcm2711_defconfig])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Fine-tuned support ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;linux-rpi&amp;lt;/code&amp;gt; packaged kernels are the &#039;&#039;&#039;&#039;&#039;supported kernels&#039;&#039;&#039;&#039;&#039; shipped within Alpine&#039;s &#039;&#039;Raspberrypi install releases&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
These kernels are built with &#039;&#039;Pi Foundation&#039;s downstream patches and [https://gitlab.alpinelinux.org/alpine/aports/-/blob/9ad68e613f9fa26d184f5b8d21fa679fca15e8e0/main/linux-rpi/APKBUILD#L68-70 defconfigs]&#039;&#039; files (with few [https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/linux-rpi/common-changes.config minor deviations]): therefore user should expect features parity with PiOS shipped kernels.&lt;br /&gt;
&lt;br /&gt;
Other available [[Kernels|generic kernels]] like &amp;lt;code&amp;gt;linux-lts&amp;lt;/code&amp;gt; are built from upstream with &#039;&#039;Alpine&#039;s distro [https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/main/linux-lts generic defconfigs]&#039;&#039;: &amp;lt;code&amp;gt;armv7&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;aarch64&amp;lt;/code&amp;gt; instances may be used with related Pi devices. However, they may not fully support all expected Pi device features, and may require different/additional configurations steps and are &#039;&#039;&#039;unsupported&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The {{pkg|linux-firmware|arch=}} package bundles {{pkg|linux-firmware-brcm|arch=}}  containing &#039;&#039;downtream Pi Foundation&#039;s&#039;&#039; shipping [https://github.com/RPi-Distro/firmware-nonfree wifi] and [https://github.com/RPi-Distro/bluez-firmware bluetooth] firmware files for Pi devices: it ensures optimal support for wireless connectivity (on par with PiOS community).&lt;br /&gt;
&lt;br /&gt;
Several Pi-specific {{pkg|raspberrypi-*|arch=}} packages are provided to further tune support: some are installed by default within supported Pi releases, some others are optional from &amp;lt;code&amp;gt;community&amp;lt;/code&amp;gt; repo.&lt;br /&gt;
&lt;br /&gt;
== Preparing the installation media ==&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Imager ===&lt;br /&gt;
&lt;br /&gt;
[https://www.raspberrypi.com/news/raspberry-pi-imager-imaging-utility Raspberry Pi Imager] is a GUI utility for creating distributions install media for Pi devices in few clicks: it takes care of downloading, partitioning and formatting. Pre-built binaries are available for [https://github.com/raspberrypi/rpi-imager/releases Linux/macOS/Windows].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alpine Linux is listed under &#039;&#039;&#039;Other general-purpose OS&#039;&#039;&#039; section from &#039;&#039;&#039;Choose OS&#039;&#039;&#039; tab.&lt;br /&gt;
&lt;br /&gt;
This utility can also be used from an Alpine linux system: install the {{pkg|rpi-imager}} package from [[Repositories#Using_testing_repository|testing]] repository. To launch the utility in graphical mode issue the command: {{Cmd|rpi-imager}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;--cli&#039;&#039;&#039; option is also available. For complete usage guide, check out the &amp;lt;code&amp;gt;rpi-imager(1)&amp;lt;/code&amp;gt; manpages, which you can [[install]] with the {{Pkg|rpi-imager-doc}} package. &lt;br /&gt;
&lt;br /&gt;
=== Manual method === &lt;br /&gt;
&lt;br /&gt;
Alternatively, the Alpine Linux image/tarball for Raspberry Pi may be [https://alpinelinux.org/downloads/ downloaded], and SD card install media can be prepared.  Use the [[#Compatibility list|compatibility list]] above when choosing image/tarball to download. &lt;br /&gt;
&lt;br /&gt;
{{Tip|To reduce SD wear risk, it is advised to keep at least 10% of capacity as unallocated space. If partitioned  previously at full capacity, run &amp;lt;code&amp;gt;blkdiscard /dev/mmcblk0&amp;lt;/code&amp;gt; to ensure [https://man7.org/linux/man-pages/man8/blkdiscard.8.html device sectors are discarded] before re-partitioning.}}&lt;br /&gt;
&lt;br /&gt;
* For image file i.e &#039;&#039;img.gz&#039;&#039;, follow the regular [[Installation#Preparing installation media|installation media preparation steps]] to create a SD card which can be used as a [[Create a Bootable Device|customizable boot device]]. &lt;br /&gt;
&lt;br /&gt;
* For tarball i.e &#039;&#039;tar.gz&#039;&#039;, the SD card needs to be prepared i.e partitioned and formatted first.&lt;br /&gt;
&lt;br /&gt;
# Create a &#039;&#039;&#039;FAT32&#039;&#039;&#039; partition and format it using a graphical partitioning tool such as [https://en.wikipedia.org/wiki/GNOME_Disks gnome-disks] or [https://gparted.org gparted]: just make sure the partition type is &amp;lt;code&amp;gt;W95 FAT32 (LBA)&amp;lt;/code&amp;gt;. (The current type can be found in the &amp;quot;Type&amp;quot; column in the output of &amp;lt;code&amp;gt;fdisk -l&amp;lt;/code&amp;gt;.)&lt;br /&gt;
#: {{warning|Do not use the volume label &amp;lt;code&amp;gt;boot&amp;lt;/code&amp;gt; for the FAT partition. Due to an upstream firmware [https://github.com/raspberrypi/firmware/issues/1529 bug], kernel/initramfs cannot be loaded from subdirectory with same name as volume label. Since kernel is installed to &amp;lt;code&amp;gt;boot/&amp;lt;/code&amp;gt; folder in Alpine Linux, do not use the volume label &amp;lt;code&amp;gt;boot&amp;lt;/code&amp;gt; for the FAT partition.}}&lt;br /&gt;
#:For example with {{pkg|sfdisk}} and {{pkg|dosfstools}}: {{Cmd|&amp;lt;nowiki&amp;gt;echo &#039;start=2048, size=300M, type=c, bootable&#039; | doas sfdisk /dev/mmcblk0&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;doas mkfs.vfat -n PIBOOT -F 32 /dev/mmcblk0p1}}&lt;br /&gt;
# Extract the tarball to the root of the bootable FAT32 partition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Using image file (manually or with Raspberry Pi Imager) will create a minimum-sized FAT16 partition. While enough for most use-cases, it may prove insufficient if using same media for Diskless/Data-disk Modes with many large add-on packages: one may then want to [[#Resize partition created with image file|grow that partition]] for more ample packages cache storage, or follow the tarball [[#Manual method|Manual method]] and allocate optimal partition size.}}&lt;br /&gt;
&lt;br /&gt;
== Considerations for choosing install modes ==&lt;br /&gt;
&lt;br /&gt;
The installation procedure for Alpine Linux &#039;&#039;&#039;requires basic understanding of the three modes&#039;&#039;&#039; i.e [[Installation#Installation_Overview|diskless/data disk/system disk]]. &lt;br /&gt;
&lt;br /&gt;
[[Diskless Mode|Diskless mode]] may be preferable on a pi with SD Card as the only storage device, as running the entire system from memory will improve performance (by avoiding the slow SD card) and improve the SD card life (by reducing the writes to the card, as all logging will happen in RAM). This mode is suitable for scenarios where there is not expected to be significant changes to disk after setup (like running a static HTTP server)&lt;br /&gt;
&lt;br /&gt;
[[Classic install or sys mode on Raspberry Pi|System disk]] mode installation may be more appropriate for the following use cases:&lt;br /&gt;
&lt;br /&gt;
* There will be constant changes to the disk after initial setup (for example, if you expect people to login and save files to their home directories)&lt;br /&gt;
* Logs should persist across reboots&lt;br /&gt;
* Plan to install packages which consume more space than can be loaded into RAM&lt;br /&gt;
* Plan to install kernel modules (such as ZFS)&lt;br /&gt;
&lt;br /&gt;
System disk mode with [[OverlayFS#Immutable_root_with_tmpfs_overlay|Immutable root option]] can also be a solution to keep whole system on read-only media (lower RAM requirement than diskless mode which loads whole system in RAM) while avoiding SD wear as runtime files are mapped to &#039;&#039;tmpfs&#039;&#039; in RAM (check limitations).&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
{{Tip|To install Alpine Linux on a Pi without keyboard, mouse &amp;amp; display, additional preparatory steps for install media are available at [[Installation on a headless host|headless Installation]] page.}}&lt;br /&gt;
&lt;br /&gt;
Once [[#Preparing the installation media|install media is prepared]], proceed to perform [[Installation#Base_configuration|standard procedures]] for actual install and initial base setup.&amp;lt;br&amp;gt;&lt;br /&gt;
(As most Pi devices do not have RTC, make sure to add a NTP service during &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; or set date manually beforehand).&lt;br /&gt;
&lt;br /&gt;
After install and reboot, check notes below for further customization and [[#Troubleshooting| troubleshooting]].&lt;br /&gt;
&lt;br /&gt;
== Post Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Customize &#039;&#039;config.txt&#039;&#039; and &#039;&#039;usercfg.txt&#039;&#039; ===&lt;br /&gt;
&lt;br /&gt;
Instead of the BIOS found on a conventional PC, Raspberry Pi devices use a configuration file called &#039;&#039;&#039;config.txt&#039;&#039;&#039;. The GPU reads &#039;&#039;&#039;config.txt&#039;&#039;&#039; before the Arm CPU and Linux initialise. &lt;br /&gt;
It is recommended to create a custom &#039;&#039;&#039;usercfg.txt&#039;&#039;&#039; file on boot partition to configure low-level system settings, as &#039;&#039;&#039;config.txt&#039;&#039;&#039; may be replaced during bootloader/system upgrades. However, few [https://www.raspberrypi.com/documentation/computers/config_txt.html#include settings] can only be set within &#039;&#039;&#039;config.txt&#039;&#039;&#039;, and will have no effect when specified in &#039;&#039;&#039;usercfg.txt&#039;&#039;&#039; (e.g. &amp;lt;code&amp;gt;gpu_mem&amp;lt;/code&amp;gt;). All available settings information can be found [https://www.raspberrypi.com/documentation/computers/config_txt.html here].&amp;lt;br&amp;gt;&lt;br /&gt;
Some noteworthy settings include:&lt;br /&gt;
* &amp;lt;code&amp;gt;dtparam=audio=on&amp;lt;/code&amp;gt; to enable audio support with &amp;lt;code&amp;gt;snd_bcm2835&amp;lt;/code&amp;gt; driver for onboard audio jack and legacy hdmi audio mode.&lt;br /&gt;
* By default system will use &#039;&#039;legacy video driver&#039;&#039;: some [https://www.raspberrypi.com/documentation/computers/legacy_config_txt.html#legacy-video-options options] may be used to adjust displays modes (e.g. if you see black edges around your screen after booting the Pi, you can add &amp;lt;code&amp;gt;disable_overscan=1&amp;lt;/code&amp;gt;). Alternatively, better supported &#039;&#039;Linux DRM-KMS driver&#039;&#039; may be used (see setup[[#Linux_Kernel_Graphics_Modes| below]]).&lt;br /&gt;
* To maximize available CPU memory if not requiring extra GPU features (i.e. headless/CLI use-cases), cut-down bootloader may be installed with {{Pkg|raspberrypi-bootloader-cutdown|arch=}} package, and activated by adding &amp;lt;code&amp;gt;gpu_mem=16&amp;lt;/code&amp;gt; in &#039;&#039;&#039;config.txt&#039;&#039;&#039; (setting may be wiped after bootloader package update).&lt;br /&gt;
* To use a camera, Pi firmware can try to load adequate driver overlay if [https://www.raspberrypi.com/documentation/computers/config_txt.html#camera_auto_detect &amp;lt;code&amp;gt;camera_auto_detect=1&amp;lt;/code&amp;gt;] is set. If failing, set &amp;lt;code&amp;gt;camera_auto_detect=0&amp;lt;/code&amp;gt; and explicitly add [https://www.raspberrypi.com/documentation/computers/camera_software.html#configuration relevant overlay for camera].&lt;br /&gt;
* If you plan to install on a Pi Computer Module 4 with I/O board, you may need to add: &amp;lt;code&amp;gt;otg_mode=1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update the System ===&lt;br /&gt;
&lt;br /&gt;
After installation, [[Alpine_Package_Keeper#Upgrade_a_Running_System|check and apply updates]] to keep your system secure.&lt;br /&gt;
&lt;br /&gt;
=== Linux Kernel Graphics Modes ===&lt;br /&gt;
&lt;br /&gt;
By default system configuration will use legacy video driver: while it may remain well suited for [https://forums.raspberrypi.com/viewtopic.php?t=310315#p1856052 lower-ram devices] (i.e. Pi Zero/1), this driver has some limitations and is now lacking support.&amp;lt;br&amp;gt;&lt;br /&gt;
Linux DRM-KMS driver is [https://forums.raspberrypi.com/viewtopic.php?t=317511#p1900440 recommended for most devices]: it is enabled by adding the following to &#039;&#039;&#039;usercfg.txt&#039;&#039;&#039;:&lt;br /&gt;
 # Enable DRM VC4 V3D driver&lt;br /&gt;
 dtoverlay=vc4-kms-v3d&lt;br /&gt;
 max_framebuffers=2&lt;br /&gt;
 &lt;br /&gt;
 # Don&#039;t have the firmware create an initial video= setting in cmdline.txt.&lt;br /&gt;
 # Use the kernel&#039;s default instead.&lt;br /&gt;
 disable_fw_kms_setup=1&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;code&amp;gt;vc4-kms-v3d&amp;lt;/code&amp;gt; overlay:&lt;br /&gt;
* ignores legacy video [https://www.raspberrypi.com/documentation/computers/legacy_config_txt.html#legacy-video-options options] from &#039;&#039;&#039;usrcfg.txt&#039;&#039;&#039; / &#039;&#039;&#039;config.txt&#039;&#039;&#039;.&lt;br /&gt;
* enables Linux HDMI audio support by [https://www.raspberrypi.com/documentation/computers/config_txt.html#hdmi-audio default]. Eventual onboard audio jack still needs legacy &amp;lt;code&amp;gt;snd_bcm2835&amp;lt;/code&amp;gt; driver through &amp;lt;code&amp;gt;dtparam{{=}}audio{{=}}on&amp;lt;/code&amp;gt; option in &#039;&#039;&#039;usrcfg.txt&#039;&#039;&#039;.&lt;br /&gt;
* enables HDMI cec device within &amp;lt;code&amp;gt;/sys/class/rc&amp;lt;/code&amp;gt;, supported through standard {{pkg|libcec|arch=}}.}}&lt;br /&gt;
&lt;br /&gt;
3D Mesa drivers may be also added for [https://docs.mesa3d.org/drivers/vc4.html vc4] (Pi Zero-3) or [https://docs.mesa3d.org/drivers/v3d.html v3d] (Pi 4-5) devices:{{cmd|apk add {{pkg|mesa-dri-gallium|arch=}}}}&lt;br /&gt;
[https://forums.raspberrypi.com/viewtopic.php?t=363368#p2179572 vc4 devices limitations] in memory management may require regular reboots.&lt;br /&gt;
&lt;br /&gt;
=== Wireless drivers ===&lt;br /&gt;
&lt;br /&gt;
As of Alpine 3.17, Wifi and Bluetooth drivers are available within install image: they are part of &amp;lt;code&amp;gt;linux-firmware-brcm&amp;lt;/code&amp;gt; (and linked dependencies). Since kernel 6.1.25 (i.e. Alpine 3.18), onboard bluetooth is enabled &amp;amp; autoprobed by default. This may be disabled by setting [https://github.com/raspberrypi/rpi-firmware/tree/master/overlays krnbt] off).&lt;br /&gt;
&lt;br /&gt;
Adding the following file to disable roaming and few other &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver features [https://github.com/RPi-Distro/firmware-nonfree/commit/e1e78b65b350c799cb7cac49713e21c79fcf993d may improve wifi stability].&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;$cat /etc/modprobe.d/brcmfmac.conf&amp;lt;br&amp;gt;&lt;br /&gt;
options brcmfmac roamoff=1 feature_disable=0x282000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Alternatively&#039;&#039; same parameters may be passed all-in-one-line to kernel from &#039;&#039;&#039;cmdline.txt&#039;&#039;&#039; as:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;brcmfmac.roamoff=1 brcmfmac.feature_disable=0x282000&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|On Alpine 3.22.0, aforementioned &amp;lt;code&amp;gt;brcmfmac&amp;lt;/code&amp;gt; driver options &#039;&#039;&#039;must&#039;&#039;&#039; be applied to circumvent an issue due to [https://gitlab.alpinelinux.org/alpine/aports/-/issues/17195 shipping &amp;lt;code&amp;gt;wpa_supplicant&amp;lt;/code&amp;gt;]. This is fixed from 3.22.1.}}&lt;br /&gt;
&lt;br /&gt;
=== USB-gadget ===&lt;br /&gt;
&lt;br /&gt;
Pi Zeros/A/A+/3A+/4B/400/5/500/CMs may be configured in various [https://trac.gateworks.com/wiki/linux/OTG#USBDeviceMode USB-gadget roles] (or a composite combination thereof) connected to host via USB: such roles may be serial-gadget (i.e. console access for setup), ethernet-gadget for networking, mass-storage (appear as USB disk), webcam, keyboard, etc... (check [https://pip-assets.raspberrypi.com/categories/685-app-notes-guides-whitepapers/documents/RP-009276-WP-1-Using%20OTG%20mode%20on%20Raspberry%20Pi%20SBCs.pdf whitepaper] for detailed info)&lt;br /&gt;
&lt;br /&gt;
This may be achieved by loading relevant drivers &amp;amp; options in early boot sequence: in any case &amp;lt;code&amp;gt;dtoverlay=dwc2,dr_mode=peripheral&amp;lt;/code&amp;gt; must be added to &#039;&#039;&#039;usercfg.txt&#039;&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Then, for instance, serial gadget may be enabled with &amp;lt;code&amp;gt;echo &amp;quot;g_serial&amp;quot; | tee -a /etc/modules-load.d/gadget.conf&amp;lt;/code&amp;gt; (or adding &amp;lt;code&amp;gt;modules=g_serial&amp;lt;/code&amp;gt; in &#039;&#039;&#039;cmdline.txt&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
{{Tip|community &amp;lt;code&amp;gt;{{pkg|xg_multi|arch=}}&amp;lt;/code&amp;gt; package may ease setup for serial/ethernet/mass-storage composite gadget, while ensuring interoperability across most host OS.}}&lt;br /&gt;
&lt;br /&gt;
=== Serial ports &amp;amp; console ===&lt;br /&gt;
&lt;br /&gt;
Depending on Pi devices and &#039;&#039;&#039;usercfg.txt&#039;&#039;&#039; configurations, different &#039;&#039;UART&#039;&#039;s may be configured: refer to [https://www.raspberrypi.com/documentation/computers/configuration.html#configure-uarts devices documentation] for details.&amp;lt;br&amp;gt;&lt;br /&gt;
Usually &amp;lt;code&amp;gt;/dev/ttyAMA0&amp;lt;/code&amp;gt; maps into first &amp;lt;code&amp;gt;PL011&amp;lt;/code&amp;gt; (on GPIOs), and if activated, &amp;lt;code&amp;gt;/dev/ttyS0&amp;lt;/code&amp;gt; into so-called [https://www.raspberrypi.com/documentation/computers/configuration.html#mini-uart-and-cpu-core-frequency &amp;lt;code&amp;gt;mini UART&amp;lt;/code&amp;gt;] (has some limitations).&lt;br /&gt;
&lt;br /&gt;
Alpine does not setup [https://github.com/RPi-Distro/raspberrypi-sys-mods/blob/pios/trixie/usr/lib/udev/rules.d/99-com.rules PiOS&#039;s specific symlinks] &amp;lt;code&amp;gt;/dev/serial0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/dev/serial1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Change &amp;lt;code&amp;gt;console=&amp;lt;/code&amp;gt; parameter from &#039;&#039;&#039;cmdline.txt&#039;&#039;&#039; to desired serial port to set it as kernel console (may block or delay boot if improperly set).&lt;br /&gt;
&lt;br /&gt;
The boot process may be interrupted if there is UART traffic going to the Pi upon power up. This may be because U-Boot sees this as a keypress, stopping the autoboot process to give a prompt and wait forever for a command. To disable this behavior, add [https://docs.u-boot.org/en/latest/usage/environment.html &amp;lt;code&amp;gt;bootdelay=-2&amp;lt;/code&amp;gt;] to &#039;&#039;&#039;usercfg.txt&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Camera ===&lt;br /&gt;
&lt;br /&gt;
With camera enabled in [[#Customize_config.txt_and_usercfg.txt| &#039;&#039;&#039;usercfg.txt&#039;&#039;&#039;]] file, the command {{Codeline|$ libcamera-hello --list-cameras}} from the {{pkg|rpicam-apps|arch=}} package in the [[Repositories#Testing|testing]] repository can be used to check camera availability.&lt;br /&gt;
&lt;br /&gt;
=== Resize partition created with image file ===&lt;br /&gt;
&lt;br /&gt;
Since Alpine 3.23, media created from image file (manually or with [[#Raspberry Pi Imager|Raspberry Pi Imager]]) can have partitions seamlessly resized with &amp;lt;code&amp;gt;parted&amp;lt;/code&amp;gt;-based tools (mind a [https://gitlab.gnome.org/GNOME/gparted/-/issues/298 &amp;lt;code&amp;gt;gparted&amp;lt;/code&amp;gt; bug] if partition gets converted into FAT32 in the process).&lt;br /&gt;
&lt;br /&gt;
On pre-3.23 releases, media can &#039;&#039;&#039;cautiously&#039;&#039;&#039; be grown up-to maximum 128MB (as base image is created as [https://www.pctechguide.com/hard-disks/file-systems-fat-fat8-fat16-fat32-and-ntfs-explained FAT16 with 2k clusters]) with &amp;lt;code&amp;gt;[https://serverfault.com/questions/994448/extend-linux-partition-size-without-losing-any-data-techniques fdisk]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;parted&amp;lt;/code&amp;gt;-based tools may fail doing so).&amp;lt;br&amp;gt;&lt;br /&gt;
Proceed with care to delete &amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;, and then &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; recreate primary partition of desired size-1MB (will start at sector 2048 by default), change it to &amp;lt;code&amp;gt;06&amp;lt;/code&amp;gt; (FAT16) with &amp;lt;code&amp;gt;t&amp;lt;/code&amp;gt; command, and go to &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; extra menu and then &amp;lt;code&amp;gt;b&amp;lt;/code&amp;gt; (move beginning of data in a partition to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; -- mind this increases size by 2048 sectors=1MB). Finally return &amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt; and write &amp;lt;code&amp;gt;w&amp;lt;/code&amp;gt; new partition table.&amp;lt;br&amp;gt;&lt;br /&gt;
Then filesystem needs to be resized accordingly with &amp;lt;code&amp;gt;fatresize&amp;lt;/code&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
This should not destroy existing data, e.g. with following script (128MB size):&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;printf &#039;%s\n&#039; d n p 1 2048 +127M t 06 x b 0 r w | doas fdisk /dev/mmcblk0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
doas fatresize -n 1 -s 128M /dev/mmcblk0}}&lt;br /&gt;
&lt;br /&gt;
== Custom installation instructions ==&lt;br /&gt;
&lt;br /&gt;
* [[Classic_install_or_sys_mode_on_Raspberry_Pi#Convert diskless to sys mode|Convert diskless to sys mode]]. &lt;br /&gt;
* An alternate approach [[OverlayFS#Loopback image with overlayfs|using loopback image with overlayfs]] for memory constrained Raspberry Pi models (3A+,Pi Zero) with only 512M of RAM running Diskless mode.&lt;br /&gt;
* [[Netbooting Raspberry Pi]] device&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;raspinfo&amp;lt;/code&amp;gt; utility from the {{Pkg|raspberrypi-utils-raspinfo|arch=}} package can be used as a first step to diagnose issues: it will make a log report of essential Pi system configuration, and is often used as a reference to submit questions or bug reports within Raspberry Pi community (Forums, Github, etc).&lt;br /&gt;
&lt;br /&gt;
After booting, you may find less system memory available than you expect, as default CPU/GPU RAM split depends on Pi models and activated settings (audio, camera, video drivers, etc). To find out how your system is actually split, use &amp;lt;Code&amp;gt;vcgencmd&amp;lt;/Code&amp;gt; utility from the {{pkg|raspberrypi-utils-vcgencmd|arch=}} package as follows:{{Cmd|&amp;lt;nowiki&amp;gt;# vcgencmd get_mem gpu&lt;br /&gt;
# vcgencmd get_mem arm&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To modify the memory allocation refer to &#039;&#039;legacy&#039;&#039; [https://www.raspberrypi.com/documentation/computers/legacy_config_txt.html#gpu_mem gpu_mem] parameter information for &#039;&#039;&#039;config.txt&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Long boot time when running headless ===&lt;br /&gt;
&lt;br /&gt;
If no peripherals are connected, the system might hang for an exceptionally long period of time while it attempts to accumulate entropy.&lt;br /&gt;
&lt;br /&gt;
If this is the case, simply plugging in any USB device should work around this issue, since it increases the amount of entropy available to the kernel via interrupts.&lt;br /&gt;
&lt;br /&gt;
=== apk indicating &#039;No space left on device&#039; ===&lt;br /&gt;
&lt;br /&gt;
While running Raspberry Pi models with only 512M of RAM (i.e. Zero, 3A+), a fresh Alpine Linux installation in Diskless mode will only leave around 200M for tmpfs root. Such allocation may be [[Diskless_Mode#Modifying_root_filesystem_size| tuned]] or alternative install modes shall be [[#Considerations_for_choosing_install_modes| considered]].&lt;br /&gt;
&lt;br /&gt;
=== Clock-related error messages ===&lt;br /&gt;
&lt;br /&gt;
During the booting time, you might notice errors related to the hardware clock.  Many Raspberry Pi do not have a hardware clock, or may have one without battery, in which case the behaviour depends on whether you physically cut power or not. &lt;br /&gt;
&lt;br /&gt;
Also, &amp;lt;code&amp;gt;setup-alpine&amp;lt;/code&amp;gt; will adapt the installation to the type of Raspberry Pi you use, which means for example that on a RPI5, you will see &amp;lt;code&amp;gt;hwclock&amp;gt;&amp;lt;/code&amp;gt; service, whereas on a RPI4 it will use &amp;lt;code&amp;gt;swclock&amp;lt;/code&amp;gt;. In doubt, make sure to do the installation on the target hardware.&lt;br /&gt;
&lt;br /&gt;
If you still experience clock errors, add the following line to &#039;&#039;&#039;/etc/chrony/chrony.conf&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;makestep 0.1 3&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Wireless support with older Alpine images ===&lt;br /&gt;
&lt;br /&gt;
In Alpine 3.14, the WiFi drivers for the Raspberry Pi were moved from &amp;lt;code&amp;gt;linux-firmware-brcm&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;linux-firmware-cypress&amp;lt;/code&amp;gt; package (source?). Since the images seem to be an outdated version of the former, Wi-Fi will work during installation, but after the first update it will break.&lt;br /&gt;
Use the ethernet interface to download the required packages:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add {{pkg|linux-firmware-cypress|arch=a*}}}}&lt;br /&gt;
&lt;br /&gt;
And reboot.&lt;br /&gt;
&lt;br /&gt;
If you need Wi-Fi, you&#039;ll need to [https://github.com/RPi-Distro/firmware-nonfree/tree/master/brcm download] the latest Broadcom drivers to your SD card.&lt;br /&gt;
(Replace /mnt/sdcard with the correct mount point.)&lt;br /&gt;
&lt;br /&gt;
  git clone --depth 1 https://github.com/RPi-Distro/firmware-nonfree.git&lt;br /&gt;
  cp firmware-nonfree/brcm/* /mnt/sdcard/firmware/brcm&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Classic install or sys mode on Raspberry Pi]] &lt;br /&gt;
* [[Raspberry Pi 3 - Setting Up Bluetooth]]&lt;br /&gt;
* [[Raspberry Pi 3 - Configuring it as wireless access point -AP Mode]]&lt;br /&gt;
* [[Raspberry Pi 3 - Browser Client]]&lt;br /&gt;
* [[Linux Router with VPN on a Raspberry Pi]]&lt;br /&gt;
* [[Netbooting Raspberry Pi]]&lt;br /&gt;
* [[Create a bootable SDHC from a Mac]]&lt;br /&gt;
* [[OverlayFS‎‎]]&lt;br /&gt;
* Build custom Raspberry Pi images based on Alpine via [https://github.com/tolstoyevsky/pieman Pieman]&lt;br /&gt;
* [[Tutorials and Howtos#Raspberry Pi]]&lt;br /&gt;
* Raspberry Pi technical [https://www.raspberrypi.com/documentation/ documentation] and [https://pip.raspberrypi.com/categories/685-app-notes-guides-whitepapers whitepapers]&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category: Raspberry]]&lt;/div&gt;</summary>
		<author><name>Habchab</name></author>
	</entry>
</feed>