Skip to content

Raspberry Pi as a registered platform - #1

Draft
linyiru wants to merge 5 commits into
mac-platform-dispatch-basefrom
raspberry-pi-platform
Draft

linyiru wants to merge 5 commits into
mac-platform-dispatch-basefrom
raspberry-pi-platform

Conversation

@linyiru

@linyiru linyiru commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Adds Raspberry Pi as a registered platform (raspberrypi), built on the platform dispatch in omacom#13362. The base branch mac-platform-dispatch-base is that PR's head (606e33d), so this diff shows only the Pi work.

Draft. Not for upstream yet. It depends on omarchy-rpi-boot, which doesn't exist yet: once this lands, a Pi's required lifecycle operations stop with exit 3 and name that package. That is fail-closed by design, but upstream would reject a runtime that depends on an unpublished package (see omacom#9835).

Commits

  1. Detect Raspberry Pi as its own platform. omarchy-hw-platform now prints raspberrypi when a root compatible token has the raspberrypi, vendor prefix. Before, a Pi fell through to generic-aarch64, whose boot path is Limine + UKI, which a Pi doesn't have. Every place that lists platforms accepts the new name:

    • the image manifest
    • pkg-defaults
    • the pacman templates (the shared aarch64 ones, edge only) and default channel (edge, like other aarch64)
    • archlinuxarm-keyring
    • update-keyring

    Fixtures: generic-aarch64 becomes linux,dummy-virt. The Pi gets real trees: the Pi 4B (raspberrypi,4-model-b brcm,bcm2711, read from our Pi-hole), the 400 and the 5.

  2. Add the Raspberry Pi's default package additions. Adds install/omarchy-raspberrypi.packages with firmware-raspberrypi only. The kernel, firmware and boot partition come with the image.

  3. Register the Raspberry Pi's lifecycle operations. Boot operations go to /usr/lib/omarchy/rpi-boot (omarchy-rpi-boot), and setup and app-install hooks go to /usr/lib/omarchy/rpi (omarchy-rpi). As on a Mac, these are required: provision-*, reset-*, update-verify, update-takeover and setup-boot. luks-slots and migrate are optional.

  4. Unpack the bundled Node tarball built for the machine's architecture. Owner setup looked only for node-v*-linux-x64.tar.gz, so an aarch64 image's bundled arm64 tarball was never found.

The platform guard commit is gone: omacom#13362 dropped the pacman platform guard (d0b94d98).

Tests

  • ./test/shell: 7 of 318 files fail, the same 7 as on the base without these commits (config, kernel-headers-migration, omarchy-kernel-migration, passwordless-grant-lifecycle, snapper, unowned-system-paths, video-background). Every Pi-touched suite passes, including hw-platform, image-target-platform, lifecycle-dispatch, platform-packages, pacman-templates, channel-sudo-boundary, update-keyring, mkinitcpio-hooks and update-boot-verify.
  • ./test/cli: one failure, vscode generated theme references current theme file, also on the base.

Before this can go upstream

  • Device-tree fixtures for the Pi 5, 500 and CM5, read from real hardware
  • Check that firmware-raspberrypi is the right Arch Linux ARM package on a Pi 5
  • omarchy-rpi-boot: config.txt / cmdline.txt management, initramfs8 / initramfs_2712, the boot checks reading cmdline.txt (not /proc/cmdline, which the firmware prepends to), and a tryboot A/B rollback in place of limine-snapper-restore
  • omarchy-rpi: runtime setup and app-install hooks (no Hyprland defaults: Converge omarchy-mac and omarchy-mx-mac into upstream Omarchy omacom/omarchy#13362 dropped the platform Hyprland slots in a7273994)
  • An image build, and a full install → provision → update → factory reset run on a Pi 4 and a Pi 5
  • Open a Discussion upstream about a snapshot-restore operation, since Pi rollback has no Limine

@linyiru
linyiru force-pushed the raspberry-pi-platform branch 2 times, most recently from 848b50f to 6dc1379 Compare October 2, 2026 14:37
@linyiru
linyiru requested a balanced review from Copilot October 2, 2026 14:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Required lifecycle packages remain unpublished and absent from installation and repository preflight flows, while hardware validation is still pending.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Registers Raspberry Pi as an aarch64 platform with dedicated detection, packages, lifecycle dispatch, repositories, guards, documentation, and tests.

Changes:

  • Detects Raspberry Pi device trees as raspberrypi.
  • Adds Pi package, lifecycle, channel, keyring, and guard behavior.
  • Extends shell coverage and platform documentation.
File Description
bin/​omarchy-hw-platform Detects Raspberry Pi hardware.
bin/​omarchy-lifecycle-dispatch Registers Pi lifecycle handlers.
bin/​omarchy-pkg-defaults Composes Pi package defaults.
bin/​omarchy-update-keyring Updates ARM keyrings on Pi.
default/​libalpm/​scripts/​omarchy-platform-guard Accepts Pi image manifests.
docs/​file-layout.md Documents Pi platform layout.
docs/​lifecycle-dispatch.md Documents Pi lifecycle registration.
docs/​platform-guard.md Documents Pi manifest support.
install/​hardware/​platform-guard.sh Requires the guard on Pi.
install/​helpers/​image-target.sh Accepts Pi image targets.
install/​helpers/​pacman.sh Adds Pi channel handling.
install/​omarchy-raspberrypi.packages Defines Pi package additions.
install/​post-install/​pacman.sh Configures the ARM keyring.
test/​shell.d/​base-test.sh Adds a Pi fixture.
test/​shell.d/​channel-sudo-boundary-test.sh Covers Pi channel boundaries.
test/​shell.d/​hw-platform-test.sh Tests Pi detection.
test/​shell.d/​image-deferred-hardware-test.sh Covers deferred Pi setup.
test/​shell.d/​image-target-platform-test.sh Tests Pi image targets.
test/​shell.d/​lifecycle-dispatch-test.sh Tests Pi lifecycle routing.
test/​shell.d/​mkinitcpio-hooks-test.sh Covers Pi initramfs composition.
test/​shell.d/​pacman-arm-channel-test.sh Tests Pi channel behavior.
test/​shell.d/​platform-guard-test.sh Tests Pi guard behavior.
test/​shell.d/​platform-migration-test.sh Covers optional Pi migration.
test/​shell.d/​platform-packages-test.sh Tests Pi package composition.
test/​shell.d/​update-boot-verify-test.sh Adds the Pi update fixture.
test/​shell.d/​update-keyring-test.sh Tests Pi keyring updates.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1 to +4
# Raspberry Pi additions, composed after omarchy-base.packages and
# omarchy-aarch64.packages (omarchy-pkg-defaults raspberrypi). The kernel,
# firmware blobs and boot partition come with the Pi's image, as the kernel
# and bootloader do from the ISO on x86_64.
Comment thread install/helpers/pacman.sh Outdated
case ${1:-} in
generic) echo "stable rc edge" ;;
qualcomm | generic-aarch64) echo "edge" ;;
qualcomm | raspberrypi | generic-aarch64) echo "edge" ;;

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It has unresolved update and channel safety gaps and intentionally depends on an unpublished boot package.

Review effort: Balanced
Findings: 2 High severity · 1 Medium severity

Open (3)

Comment thread install/user/mise-work.sh
esac

# Node names its x86_64 build x64 and its 64-bit Arm build arm64.
case $(uname -m) in
A Pi has no Limine or UKI to boot, so it can't share generic-aarch64's
path. omarchy-hw-platform now prints raspberrypi for a device tree whose
root compatible carries the raspberrypi, vendor prefix, and every place
that lists platforms accepts it, treating it as generic-aarch64 until it
has packages of its own.
A Pi's firmware boots config.txt, the kernel and the initramfs from the
FAT boot partition, so the generic Limine path has nothing to drive
there. Its boot operations resolve in omarchy-rpi-boot and its setup
hooks in omarchy-rpi; until omarchy-rpi-boot is published, the required
operations stop on a Pi naming the package.
@linyiru
linyiru force-pushed the raspberry-pi-platform branch from ab0208e to 272ae82 Compare October 4, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants