3.2 KiB
ForgeOS ARM64 Architecture
Goal
ForgeOS ARM64 targets 64-bit ARM systems with UEFI firmware. The target image boots systemd as PID 1 and uses Nix as the core package manager.
The current stack is:
- Linux kernel source from kernel.org
- systemd source from the upstream systemd project
- BusyBox source from busybox.net for static rescue and early-boot tools
- official Nix
aarch64-linuxbinary tarball for the Nix store bootstrap - ForgeOS shell scripts, identity files, unit files, boot configuration, and image layout from this repository
Boot Model
- The disk image contains a GPT.
- Partition 1 is a FAT32 EFI System Partition labeled
FORGE_EFI. out/BOOTAA64.EFIis a standalone GRUB UEFI fallback loader built forarm64-efi.- The ARM64 Linux
Imagewith EFI stub support is copied toEFI/BOOT/FORGEOS.EFI. - UEFI firmware executes GRUB from
EFI/BOOT/BOOTAA64.EFI. - GRUB starts the kernel with
root=PARTLABEL=root. - The kernel mounts the ext4 root partition and executes
/sbin/init. /sbin/initpoints to/usr/lib/systemd/systemd.- systemd reaches
multi-user.target, starts console login units, networkd, resolved, timesyncd, the Nix bootstrap service, and nix-daemon.
The image also includes rootfs.cpio.gz on the EFI partition. The GRUB
initramfs entries can use /init and /sbin/forgeos-switch-root to locate and
switch to the real ext4 root partition before executing systemd.
Root Filesystem Model
The default rootfs is assembled in staging/rootfs from:
- a systemd
DESTDIRinstall tree - a statically linked ARM64 BusyBox utility tree
- generated
/etc/passwd,/etc/shadow,/etc/group,/etc/fstab,/etc/systemd/*, network, hostname, profile, and OS identity files - ForgeOS helper scripts from
overlay/rootfs - the official Nix ARM64 store closure plus registration metadata
- kernel modules from the ARM64 kernel build
- the ARM64 kernel image copied to
/boot
systemd units are enabled by creating .wants symlinks in
/etc/systemd/system, matching systemd's normal enablement model. Nix follows a
multi-user daemon layout: nixbld users are generated in /etc/passwd,
/etc/nix/nix.conf declares build-users-group = nixbld, and
nix-daemon.socket/nix-daemon.service are enabled under systemd.
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, and rng devices
Known Gaps
- The Nix payload is currently the official binary tarball rather than a source-built Nix closure.
- The systemd build depends on an ARM64 sysroot for target development and runtime libraries.
- No desktop environment or graphical login.
- No board-specific kernel profiles beyond QEMU
virt. - No Microsoft/shim-signed Secure Boot chain.
- No in-OS guided installer or update system.
Suggested Next Steps
- Add a first-class ARM64 sysroot recipe for systemd dependencies.
- Add a source-built Nix recipe or a reproducible closure generator.
- Add hardware profiles for common ARM64 laptops, SBCs, and servers.
- Add CI that builds
make kernel,make rootfs, andmake imageon an x86_64 host with the AArch64 cross toolchain.