Files
ForgeOS-ARM64/docs/ARCHITECTURE.md
T

67 lines
2.5 KiB
Markdown
Raw Normal View History

2026-06-17 12:16:09 -04:00
# ForgeOS ARM64 Architecture
2026-06-16 14:07:52 -04:00
## Goal
2026-06-17 12:16:09 -04:00
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.
2026-06-16 14:07:52 -04:00
2026-06-17 12:16:09 -04:00
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.
2026-06-16 14:07:52 -04:00
## Boot Model
1. The disk image contains a GPT.
2. Partition 1 is a FAT32 EFI System Partition labeled `FORGE_EFI`.
2026-06-17 12:16:09 -04:00
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`.
2026-06-16 14:07:52 -04:00
## Root Filesystem Model
2026-06-17 12:16:09 -04:00
The default rootfs is assembled in `staging/rootfs` from:
2026-06-16 14:07:52 -04:00
2026-06-17 12:16:09 -04:00
- 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`
2026-06-16 14:07:52 -04:00
2026-06-17 12:16:09 -04:00
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.
2026-06-16 14:07:52 -04:00
2026-06-17 12:16:09 -04:00
## QEMU Model
2026-06-16 14:07:52 -04:00
2026-06-17 12:16:09 -04:00
The run scripts use `qemu-system-aarch64` with:
2026-06-16 14:07:52 -04:00
2026-06-17 12:16:09 -04:00
- `-machine virt`
- `-cpu max`
- PL011 serial console through `ttyAMA0`
- AAVMF firmware for UEFI image boots
- virtio block, network, rng, and GPU devices where appropriate
2026-06-16 14:07:52 -04:00
## Known Gaps
2026-06-17 12:16:09 -04:00
- 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.
2026-06-16 14:07:52 -04:00
## Suggested Next Steps
2026-06-17 12:16:09 -04:00
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.