Files
ForgeOS-ARM64/docs/ARCHITECTURE.md
T
blazblue547-afk 9e86817361 feat: add ARM64 OS flavor
Use an ARM64 Debian rootfs bootstrap because the original source-built userspace path depends on native x86_64 host runtime libraries.
2026-06-17 12:16:09 -04:00

2.5 KiB

ForgeOS ARM64 Architecture

Goal

ForgeOS ARM64 is the AArch64 flavor of ForgeOS. It targets 64-bit ARM systems with UEFI firmware and keeps the ForgeOS image builder, boot layout, kernel configuration style, default user setup, and Nix integration.

The original x86_64 ForgeOS source-built userspace path depends on native host runtime libraries for PAM, systemd, D-Bus, and BusyBox. This ARM64 flavor uses a Debian arm64 rootfs bootstrap instead, which gives the architecture flavor a real ARM64 userspace while the source-built cross-sysroot work remains future work.

Boot Model

  1. The disk image contains a GPT.
  2. Partition 1 is a FAT32 EFI System Partition labeled FORGE_EFI.
  3. out/BOOTAA64.EFI is a standalone GRUB UEFI fallback loader built for arm64-efi.
  4. The ARM64 Linux Image with EFI stub support is copied to EFI/BOOT/FORGEOS.EFI.
  5. UEFI firmware executes GRUB from EFI/BOOT/BOOTAA64.EFI.
  6. GRUB starts the kernel with root=PARTLABEL=root.
  7. systemd starts from the ARM64 rootfs and launches console login on tty1 and serial login on ttyAMA0.

Root Filesystem Model

The default rootfs is assembled in staging/rootfs from:

  • Debian trixie ARM64 packages
  • ForgeOS identity, user, network, and systemd defaults
  • kernel modules from the ARM64 kernel build
  • the official Nix aarch64-linux binary tarball staged into /nix/store

The default package set is intentionally console-focused. It includes systemd, D-Bus, sudo, locales, CA certificates, kmod, iproute2, ping, procps, resolved, and timesyncd. The optional DESKTOP=gnome flavor uses the same ARM64 kernel and image flow with a larger Debian GNOME rootfs.

QEMU Model

The run scripts use qemu-system-aarch64 with:

  • -machine virt
  • -cpu max
  • PL011 serial console through ttyAMA0
  • AAVMF firmware for UEFI image boots
  • virtio block, network, rng, and GPU devices where appropriate

Known Gaps

  • Source-built ARM64 systemd/PAM/D-Bus userspace.
  • Board-specific kernel profiles beyond QEMU virt.
  • Microsoft/shim-signed Secure Boot chain.
  • Declarative NixOS-style system rebuilds and rollback management.
  • In-OS guided installer and update system.

Suggested Next Steps

  1. Add a cross-built ARM64 sysroot for source-built systemd, PAM, D-Bus, and BusyBox.
  2. Add hardware profiles for common ARM64 laptops, SBCs, and servers.
  3. Add CI that builds make kernel, make rootfs, and make image on an x86_64 host with the AArch64 cross toolchain.
  4. Add an ARM64 Secure Boot/shim story for real hardware deployment.