mirror of
https://github.com/blazblue547-afk/ForgeOS-ARM64.git
synced 2026-12-02 14:44:17 -05:00
feat: add systemd Nix rootfs
This commit is contained in:
1 parent
9e86817361
commit
1c3099dbac
38 files changed
+735
-1190
No files matched your search
@@ -1,29 +1,34 @@
|
||||
# ForgeOS ARM64
|
||||
|
||||
ForgeOS ARM64 is the 64-bit ARM/AArch64 flavor of ForgeOS. It keeps the ForgeOS
|
||||
UEFI disk-image flow, Linux kernel build, Nix integration, default `forge` user,
|
||||
and optional GNOME image path, but targets ARM64 firmware and hardware instead
|
||||
of x86_64.
|
||||
ForgeOS ARM64 is a 64-bit ARM/AArch64 OS image assembled by this repository.
|
||||
The target now boots systemd as PID 1 and uses Nix as the core package manager.
|
||||
BusyBox is retained as a static early-boot and rescue utility layer, not as the
|
||||
init system.
|
||||
|
||||
As of `2026-06-17`, this flavor defaults to:
|
||||
|
||||
- Linux kernel `7.1`
|
||||
- systemd `256`
|
||||
- Nix `2.34.0` using the official `aarch64-linux` binary tarball
|
||||
- BusyBox `1.36.1` as static rescue utilities
|
||||
- ARM64 / AArch64 only
|
||||
- 64-bit only
|
||||
- UEFI boot through `EFI/BOOT/BOOTAA64.EFI`
|
||||
- Debian `arm64` console rootfs using `trixie`
|
||||
- Nix `2.34.0` using the official `aarch64-linux` binary tarball
|
||||
- GPT disk image with an EFI system partition and ext4 root partition
|
||||
- serial console on `ttyAMA0`
|
||||
- optional Debian GNOME desktop rootfs
|
||||
|
||||
## What This Repository Produces
|
||||
|
||||
- a ForgeOS ARM64 build pipeline
|
||||
- a systemd-managed root filesystem with:
|
||||
- login prompts on `tty1` and `ttyAMA0`
|
||||
- systemd-networkd DHCP networking
|
||||
- systemd-resolved and systemd-timesyncd
|
||||
- nix-daemon and a boot-time Nix store registration service
|
||||
- a bootable GPT disk image with:
|
||||
- an EFI system partition
|
||||
- an ext4 root partition
|
||||
- a direct QEMU smoke-test path using `qemu-system-aarch64`
|
||||
- an optional GNOME ARM64 image flavor
|
||||
|
||||
## Quick Start
|
||||
|
||||
@@ -35,9 +40,7 @@ make run
|
||||
```
|
||||
|
||||
The default console accounts are `forge` and `root`; both use the password
|
||||
`forge`. Nix is staged into the rootfs as the package manager, with
|
||||
`nix-daemon` enabled after the bootstrap service registers the bundled store
|
||||
closure.
|
||||
`forge`.
|
||||
|
||||
To build a bootable ARM64 UEFI disk image:
|
||||
|
||||
@@ -50,38 +53,44 @@ make run-image
|
||||
|
||||
The disk image is written to `out/forgeos-arm64-7.1.img`.
|
||||
|
||||
To build the optional ARM64 GNOME image:
|
||||
|
||||
```bash
|
||||
cd ForgeOS-ARM64
|
||||
make gnome-image
|
||||
make run-gnome
|
||||
```
|
||||
|
||||
## Build Notes
|
||||
|
||||
- The kernel is built with Linux `ARCH=arm64` and defaults to the ARM64
|
||||
`defconfig` plus ForgeOS options for EFI, virtio, PL011 serial, ext4, vfat,
|
||||
initramfs, and common QEMU `virt` devices.
|
||||
- On non-AArch64 hosts, the build defaults to `CROSS_COMPILE=aarch64-linux-gnu-`.
|
||||
- The console rootfs is bootstrapped from Debian `arm64` packages with
|
||||
`mmdebstrap` or root-run `debootstrap`; this avoids pretending the original
|
||||
x86_64-native source-built PAM/systemd/D-Bus path can cross-build safely.
|
||||
initramfs, framebuffer console, and common QEMU `virt` devices.
|
||||
- On non-AArch64 hosts, the build defaults to
|
||||
`CROSS_COMPILE=aarch64-linux-gnu-`.
|
||||
- systemd is built with Meson/Ninja and installed into the target rootfs through
|
||||
`DESTDIR`.
|
||||
- Nix is staged from the official ARM64 binary tarball, then registered at first
|
||||
boot by `forgeos-nix-bootstrap.service`.
|
||||
- BusyBox is still built statically to provide `/bin/sh`, `switch_root`,
|
||||
`getty`, diagnostics helpers, and rescue tools needed before Nix is available.
|
||||
- GRUB is built for `arm64-efi` and installed at `EFI/BOOT/BOOTAA64.EFI`.
|
||||
- The ARM64 Linux `Image` is also copied to `EFI/BOOT/FORGEOS.EFI` for GRUB to
|
||||
load through the EFI stub.
|
||||
- The default QEMU path uses `qemu-system-aarch64 -machine virt`.
|
||||
- Nix `2.34.0` is staged from the official `aarch64-linux` binary tarball.
|
||||
|
||||
## Systemd Build Requirements
|
||||
|
||||
The rootfs script can build systemd from upstream source, but systemd is not a
|
||||
single static binary. The build needs ARM64 development libraries visible through
|
||||
pkg-config and runtime libraries available for staging. Override these when
|
||||
using a custom sysroot:
|
||||
|
||||
```bash
|
||||
SYSTEMD_PKG_CONFIG_LIBDIR=/path/to/sysroot/usr/lib/pkgconfig \
|
||||
SYSTEMD_RUNTIME_LIB_DIRS=/path/to/sysroot/lib:/path/to/sysroot/usr/lib \
|
||||
make rootfs
|
||||
```
|
||||
|
||||
## Current Limits
|
||||
|
||||
- ARM64 UEFI only; BIOS and 32-bit ARM are not supported.
|
||||
- The default rootfs is Debian-bootstrapped rather than source-built.
|
||||
- Cross-host bootstrap of Debian `arm64` packages may require `qemu-user-static`
|
||||
and binfmt support on the host.
|
||||
- Secure Boot still requires enrolling your generated local signing certificate.
|
||||
- No desktop environment or graphical login is built by this repository.
|
||||
- Hardware support beyond the QEMU `virt` platform depends on kernel config work
|
||||
for the target board or machine.
|
||||
- Secure Boot still requires enrolling your generated local signing certificate.
|
||||
|
||||
More detail is in [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
|
||||
Installer usage is documented in [docs/INSTALLER.md](docs/INSTALLER.md).
|
||||
Reference in new issue
Block a user