Build a generic aarch64 ISO - #149
Conversation
test/all used to run every test serially under set -e, so one slow pty test held everything and a hung test hung the run forever. Replace the loop with test/run-manifest.py: - Two lanes. test/parallel-safe.tests lists tests that only touch their own throwaway directory and run in a thread pool; test/serial.tests lists tests that own something global (a pty, a port, the docker socket) and run one at a time afterwards. Each serial entry says what the global thing is. - Every file under test/unit/ must appear in exactly one manifest or the runner refuses to start (exit 2). A forgotten test is an error, not a silent skip. - Per-test wall-clock timeout (OMARCHY_TEST_TIMEOUT_SECONDS, 300 by default). Each test runs in its own session so a timeout or failure kills the whole process group, and a test that passes but leaves a background process behind is failed. - Python modules run one per process with test/unit on PYTHONPATH and fail closed when zero cases collect. - A JSON ledger (test-runs/unit-test-results.json) is written as "incomplete" before the run and finalised after, and a flock lease stops two runs from interleaving. Exit status: 0 all passed, 1 any failure/timeout/cancellation (fail-fast, as before), 2 the runner refused to start. Add a test workflow that runs test/all in an archlinux container on push and pull_request, since the tests reach for parted, util-linux script, bsdtar and localectl at the versions that ship on the ISO.
Implements the x86_64/pc and aarch64/generic targets from plans/aarch64-support.md. The default stays x86_64 and every new branch is gated on the target architecture, so x86_64 builds are unchanged. Architecture selection moves out of build-iso.sh into two sourced files: builder/architecture.sh validates OMARCHY_ARCH:OMARCHY_MEDIA_TARGET, exports the platform, boot backend, live kernel names and the mkarchiso command, and prepares the releng profile for aarch64 (packages.aarch64, a generated linux-aarch64 preset, no microcode/memdisk hooks, grub pointing at Image/initramfs-linux.img). builder/package-architecture.sh picks the keyring, the Node dist arch, the pacman config and the package lists per architecture, and filters x86-only packages (microcode, tzupdate) out of the shipped lists on aarch64. build-iso.sh stays one linear script and calls these. omarchy-iso-make gains --arch x86_64|aarch64. On aarch64 it runs the build in an Arch Linux ARM image under --platform linux/arm64, scopes the offline mirror cache per architecture and names the output *-aarch64.iso. The sudo-docker fallback is kept. profiledef.sh reads the arch from OMARCHY_ARCH, uses uefi.grub only on aarch64 and switches squashfs to xz there (the generic ARM kernel does not ship squashfs zstd). builder/archiso-aarch64.patch is applied to the submodule's mkarchiso for aarch64 builds. The installer becomes architecture-agnostic: the configurator picks the limine EFI binary from uname -m, detects linux-aarch64 as the kernel and guards ttfx behind command -v; the orchestrator derives the EFI binary names from the machine instead of hard-coding limine_x64.efi; keyboard selection reads the kbd catalog from the target instead of running localectl, which needs PID 1. omarchy-iso-test boots aarch64 ISOs with edk2-armvirt on a virt machine (HVF on macOS, KVM on Linux) and infers the guest arch from the ISO name. configs/pacman-online-arm.conf points [omarchy] at pkgs.omarchy.org for $arch; that tree does not exist for aarch64 yet (omacom/omarchy-pkgs#277, issue #199), so an aarch64 online install cannot complete until it is published. Verified by building on an Apple Silicon host and booting the ISO under QEMU virt with edk2-aarch64: the live system reaches the login prompt. Doing that surfaced four more differences from x86_64: - ALARM ships .pkg.tar.xz, so the offline mirror's repo-add and the local-source package copy now match *.pkg.tar.* minus signatures instead of only .zst. - ALARM's linux-aarch64 ships its own mkinitcpio preset, so the profile ships none (pacstrap would fail on the conflicting file) and instead adds a last-sorting mkinitcpio.conf.d drop-in that re-asserts archiso's hooks and resets MODULES, since omarchy-settings' drop-ins otherwise override them under the default config. - pacman 7 refuses to sync without Landlock, which Docker Desktop's kernel lacks. The builder detects that and disables the sandbox for the build container only; the media's pacman.conf is untouched. - 37 packages in the shared lists do not resolve for aarch64. builder/packages.aarch64-exclude lists them, split into x86-only hardware support and packages not built for aarch64 yet, and the package filter reads it on aarch64 only.
Build and boot evidenceBuilt from this branch on an Apple Silicon Mac (native arm64 Docker, no QEMU emulation) with Because Getting a real build through surfaced four things the first draft had wrong, all fixed here:
The tests for these are in |
f20a458 to
4897e8b
Compare
Chessing234
left a comment
There was a problem hiding this comment.
--arch flag with per-arch docker image/cache isolation looks correct.
Summary
Implements the
x86_64/pcandaarch64/generictargets fromplans/aarch64-support.md.omarchy-iso-make --arch aarch64builds a bootable generic ARM64 ISO in an Arch Linux ARM container. The default staysx86_64, and every new branch is gated on the architecture, so x86_64 builds are unchanged.Stacked on #148 (the new tests need manifest entries). Only the last commit is this PR.
What changed
Architecture selection moves out of
build-iso.shinto two sourced files.builder/architecture.shvalidatesOMARCHY_ARCH:OMARCHY_MEDIA_TARGET, exports the platform, boot backend, live kernel names and the mkarchiso command, and prepares the releng profile for aarch64:packages.aarch64, a generatedlinux-aarch64preset, no microcode or memdisk hooks, GRUB pointed atImageandinitramfs-linux.img.builder/package-architecture.shpicks the keyring, Node dist arch, pacman config and package lists per architecture, and filters x86-only packages (microcode,tzupdate) out of the shipped lists on aarch64, mappinglinuxtolinux-aarch64.build-iso.shstays one linear script and calls these. On x86_64 the new calls are no-ops.Build entry point.
omarchy-iso-makegains--arch. On aarch64 it runs the build under--platform linux/arm64in an Arch Linux ARM image, scopes the offline mirror cache per architecture (the x86_64 directory keeps its name) and picks up*-aarch64.iso. The sudo-docker fallback is kept.Profile.
profiledef.shreads the arch from the environment, usesuefi.grubonly on aarch64, and switches squashfs to xz there because the generic ARM kernel does not enable squashfs zstd.builder/archiso-aarch64.patchis applied to the submodule'smkarchisofor aarch64 builds.Installer made architecture-agnostic. The configurator picks the limine EFI binary from
uname -m, detectslinux-aarch64as the kernel and guardsttfxbehindcommand -v. The orchestrator derives the EFI binary names from the machine instead of hard-codinglimine_x64.efi. Keyboard selection reads the kbd catalog from the target instead of runninglocalectl, which needs PID 1.Test harness.
omarchy-iso-testboots aarch64 ISOs withedk2-armvirton avirtmachine (HVF on macOS, KVM on Linux) and infers the guest arch from the ISO name.What it does not do
configs/pacman-online-arm.confpoints[omarchy]atpkgs.omarchy.org/$arch. That tree does not exist for aarch64 yet (Make aarch64 a first-class architecture in the scheduled pipeline omarchy-pkgs#277, #199), so an aarch64 online install cannot complete until it is published. The offline mirror build path is unaffected.omarchy-iso-boot,omarchy-vmandomarchy-iso-releaseare not arch-aware yet; the status table inplans/aarch64-support.mdlists them.Testing
architecture-selector-test.sh(5),arm-profile-test.sh(10),test_arm_limine.py;test_keyboard.pyupdated. All pass locally;test/allin CI.builder/packages.aarch64-excludeis the list of packages that do not resolve on aarch64 today, split into x86-only hardware support and not-yet-built; it is the per-arch package list question in concrete form.mkarchiso.