Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/image-dependency-snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ Retained outputs last 90 days:
- `signed-image-dependencies-<run>-<attempt>`: selected package archives and detached signatures, original repository database and signature, signed manifest.

An image consumer must pin the manifest checksum, authenticate its signature against the independently pinned public key, verify every archive's hash and signature, and reject candidate-name substitutions or missing/extra packages. It must combine this set with the separately verified five-package candidate and pinned Arch Linux ARM/Asahi inputs, then resolve and test the complete dependency transaction. A successful capture/sign run alone does not establish a complete or bootable image. Do not upload these signatures to live edge as a shortcut: `Optional TrustAll` clients still need the signing public key, and live edge has a separate coordinated trust transition.

## Experimental Limine profile

Local `seal` and `verify` accept `--boot-profile limine` for the coordinated schema-4 candidate. This writes dependency schema 2 with `boot_profile: limine` and `candidate_schema: 4`. Its fixed exclusion set is the complete thirteen-package candidate plus the replaced `omarchy-apple-boot` and `omarchy-first-boot` packages. Capture still freezes every original database member; filtering occurs only after validating the complete capture. Callers cannot supply arbitrary exclusion names.

The default remains schema 1 with the original five exclusions, and the existing workflow still selects that default. A schema-2 snapshot requires explicit profile selection for verification. The image consumer must also match the independently authenticated candidate profile, reject candidate/dependency/platform overlap, and require the separately authenticated ALARM Limine package before enabling assembly. This profile does not select an image build or change installed-system trust.
7 changes: 7 additions & 0 deletions docs/quattro-boot-ownership-2026-09-23.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Coordinated boot helper ownership

The hardware package remains kernel-neutral. `omarchy-mac-boot` now additionally stages runtime boot helpers and lifecycle modules from `packages/omarchy-mac/boot` at the recipe's pinned `_runtime_commit`. Its existing conversion/firmware/first-boot files, replacement metadata and configuration backups stay in this package repository.

The boot release increases from 9 to 10. Schema-4 candidates substitute their exact runtime commit, record both the recipe revision and runtime revision, and require the exact desktop package version. Admission checks require every transferred command/module to have exactly one owner, `omarchy-mac-boot`. A mixed old boot/new desktop candidate is rejected. Schema 3 remains the default; no workflow enables the new profile or publishes packages.

The source tests exercise staging, replacement metadata, marker/first-boot behavior, provenance and ownership rejection. A real package transaction and new-image boot qualification are required before deployment. Future existing-quattro migration must additionally test old installed ownership, source-shadowing files, configuration/migration history and old factory roots; see the companion runtime migration assessment. No migration or repository-trust change is introduced here.
43 changes: 43 additions & 0 deletions docs/quattro-encryption-limine-integration-2026-09-22.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Package encryption/Limine integration preparation

Base: tested nine-package recipe source `5b41ff12fbf97c7fc86a161e58763ebc97e4e2d9`. Upstream destination main was `78bf4a2d659187c10c722d8d0e8c41dd9e5e3726` at inventory time; compare its later changes separately before an eventual merge. Existing package worktrees are untouched.

Prepare a separate boot package from pinned `omarchy-mac-boot 20260921-9`, plus ARM64 `limine-mkinitcpio-hook 1.36.0-3`, `limine-snapper-sync 1.30.1-1`, `uboot-asahi 2026.07.asahi2-3`, and ARM64 settings-menu retention. The central inventory records source commits #155/#170/#182/#185/#186/#190. Resolve ALARM Limine and the full authenticated binary closure before admitting a build.

Keep `omarchy-mac` kernel-neutral. The proposed boot package owns conversion, vendor firmware/HID ordering, first-boot services and boot hooks, and replaces `omarchy-apple-boot`/`omarchy-first-boot`. Review every installed path and removal hook across the complete transaction, including the existing add-on/settings/runtime. The upstream first-boot script imports and locally signs Marcelo's key `C81AC3E2A99556F9B21D5FEA3DD49BC9F8360BDC`; exclude that key and adapt the lifecycle without changing target repository policy or installing candidate trust.

Extend `scripts/build-quattro-image-inputs.py`, signing/verification and the explicit candidate schema together with the image importer. Preserve source attribution, nine-package receipts, disjoint dependency snapshots, paired desktop/settings and immutable manifests. Boot tests to port are `test/omarchy-mac-boot`, `test/omarchy-mac-encrypt`, `test/omarchy-mac-first-boot`, and `test/omarchy-mac-hid-initramfs`; image activation checks belong to the image builder. Run focused fixture tests and `scripts/self-test.sh` after implementation, then validate ownership in a disposable full transaction. Do not alter edge publishing workflows or production trust.

This branch now contains the draft boot package, ARM64 Limine/U-Boot recipes and opt-in schema-4 candidate producer/signer. The initial checkpoint had no native package build or full installation transaction evidence; the later integration qualification is recorded below. The complete dependency inventory and 168-file disposition map are in the desktop repository, branch `integrate/quattro-encryption-limine`, under `docs/quattro-encryption-limine-{integration,sources,files}-2026-09-22.{md,json,json}` (three separate files). The local desktop worktree is `/home/scott/code/omarchy-worktrees/quattro-encryption-limine`.

The proposed runtime source ceiling is `maralcbr/omarchy-mx-mac` PR #220 at `d418ab7f95e8ba447df4fb368ddd838a5ffc7943`, including merged #219 at `5e7a409fae1ddc17433d9408e15153b4fe813f7b`. The package/image reference is `maralcbr/omarchy-pkgs` PR #194 at `68a61cef1aba768c6aae20a0feda2a42e19de6e8`. These heads were verified with GitHub API on September 22. Both PRs were subsequently observed merged on September 22 with these exact heads unchanged. Preserve pins and original attribution; merged source is not a qualified downloadable candidate.

Keep candidate packages/images private and signed under the existing build-input policy. Preserve the active desktop, unrelated dirty worktrees, installed-user feed and repository trust. No publication, remote update, physical disk operation or boot-policy change is part of this preparation.

## Source checkpoint

The imported payload is adapted from the pinned package head above. Exclusions: embedded `omarchy-arm-repository.key`, `mac-image-finalize` and its compatibility links, and the old GRUB snapshot-menu hook. First boot uses the distilled runtime Limine leaf and existing platform keyring population, with no added/locally signed repository certificate. `cryptsetup` is explicit. Recipe staging preserves symlinks; ARM64 settings-template retention is opt-in. Existing package workflows and the nine-package default are unchanged.

Run `bash test/boot-source` for offline payload, state/retry and firmware/HID checks. It explicitly disables Docker/block test lanes. These checks passed, as did 92 existing publisher self-tests, 16 candidate ownership checks and 13 signing checks (disposable fixture keys, both schemas). Exact pinned settings recipes were checked after their baseline preparation. At that source checkpoint, reencryption, initramfs assembly, native compilation and legacy-package replacement were unqualified. Later native and focused replacement evidence below does not qualify reencryption or a bootable image.

The image repository can authenticate schema 4 but refuses to assemble it until its dependency snapshot and finalization contract are integrated. A complete signed platform closure, build prerequisites (including the recipes' native build dependencies), first-boot/factory state and VM boot evidence are still required. Do not treat these source recipes as ready-to-install artifacts. See the central runtime `docs/quattro-encryption-limine-source-port-2026-09-22.md` for the remaining work and verification ledger.

## Review follow-up

The central runtime source-port record now explicitly names `/var/lib/omarchy/mac-first-boot/deferred-steps` (paired with `mac-first-boot/pending`) and `/var/lib/omarchy/limine.enabled` as missing builder outputs, plus the separate owner `provisioning/pending` marker. Their creation belongs to coordinated image finalization and artifact inspection, including factory-state cleanup; neither is supplied by importing the excluded monorepo helper or touching a placeholder. The schema-4 image guard remains in place and the default schema-3 image is unchanged.

The conversion hook has a documented local deviation: a Limine marker with missing defaults/updater fails before the first boot-file rewrite, and a failed updater cannot mark conversion configured. A device-free fixture covers both missing prerequisites, update failure, successful Limine completion and the plain GRUB path. Recipe metadata keeps literal versions for the candidate parser, but U-Boot's source tag is derived from that literal and the Limine entry recipe's unused duplicate version variables are removed. `cryptsetup` is an explicit dependency because the boot package owns encryption conversion.

## Package integration qualification

Implementation checkpoint: `c71c8c93180d05c1c96e6d560dcfb4b35c627bb6`. Dependency sealing and verification now accept an explicit Limine profile: schema 2, `boot_profile: limine`, `candidate_schema: 4`, and exactly fifteen exclusions (all thirteen candidate packages plus both replaced legacy boot packages). The schema-1 default and workflows are unchanged. First boot validates the builder's exact `install/hardware/apple/limine-boot.sh\n` deferred-step record while continuing to allow marker-free reset. It executes the fixed leaf, never a file-supplied path.

All four boot recipes compiled on native ARM64 in a disposable container limited to 6 GiB and two CPUs. Source and patch checksums passed, including the architecture-specific Gradle/GraalVM archives. The final package metadata and shell-hook changes were repackaged from those outputs; the compiled Java/U-Boot sources did not change. Declared make dependencies now cover U-Boot's Python/setuptools/SWIG/OpenSSL/GnuTLS host tooling and GraalVM's zlib linkage. Inspection of both native Limine binaries showed a dynamic dependency on `libz.so.1`, so both recipes now declare runtime `zlib` too. Schema-4 builds check their make dependencies before beginning the desktop suite.

The real pacman replacement transaction exposed another inherited defect: Limine reads its ESP defaults before executing boot pre-hooks, so the original opt-in gate could not prevent errors on an unactivated image. A second local Limine patch checks a package-owned readiness helper before that initialization. A dormant Apple install delegates the original target stream to stock mkinitcpio; dormant removal/deploy succeeds without editing Limine. An armed marker with missing or invalid defaults fails. Generic installations without the Apple helper retain the upstream path. The existing pre-hook uses the same readiness helper.

The focused replacement transaction then passed with real archives and package hooks in a disposable container: customized legacy configuration survives as `.pacsave`, new initcpio and first-boot gates retain correct ownership, pending migrates without granting fresh-image conversion, and old first-boot payload/key paths are removed. The transition and dormant install/deploy/removal paths report no hook errors. This fixture has no installed kernel or ESP; a separate run including U-Boot records the expected `update-m1n1` failure for that missing environment. Container setup also records an unrelated systemd modules-load failure separately from the successful reviewed transaction. Neither result qualifies the complete thirteen-package image transaction or boot behavior.

Evidence is retained at [`encryption-limine-packages-integration-20260922`](/home/scott/code/omarchy-integration-evidence/encryption-limine-packages-integration-20260922/evidence.json), including source recipes, native build logs, package archives, `.BUILDINFO`-bound recipe hashes, signature-verified ALARM Limine origin bytes, focused transaction logs, and exact file hashes. The six locally built archives include two legacy fixtures and are unsigned qualification artifacts, not signed candidate inputs or an installer for distribution. The ALARM Limine archive is `12.9.0-1`, SHA256 `abadb32ec9fb6dfa70ba224f3b90435b93ea39db91dc2e838862c620f33fd266`, authenticated by the existing ALARM keyring signer `68B3537F39A313B3E574D06777193F152BDBE6A6`; image-side pinning belongs to the separate Limine platform lock.

Validation passed: the offline boot-source suite including the new gate regression, 92 publisher self-tests, 17 candidate ownership/prerequisite tests, 13 candidate signing tests, and 7 dependency snapshot tests. Signing used disposable fixture keys only. The full schema-4 candidate, authenticated aggregate dependency transaction, finalized-image verification, VM conversion/second boot, and physical model qualification remain later coordinated boundaries. No workflows select schema 4 and no candidate/image guard is removed by this package work.
6 changes: 6 additions & 0 deletions docs/quattro-image-inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,9 @@ This does not edit the two rolling recipes, `packages.json`, or edge publication
Schema 3 binds exactly nine archives: the desktop trio, both video dependencies, `asdcontrol`, `tobi-try`, `qemu-user-static`, and `qemu-user-static-binfmt`. The full image resolver found those last four missing from our 50-package dependency snapshot. The additional recipes have recorded upstream origins in [quattro-extra-dependencies.md](quattro-extra-dependencies.md); their generated candidates carry this package repository's exact revision. The QEMU split recipe builds once and produces two separately verified archives. `tobi-try` retains architecture `any`, and `asdcontrol` retains its version epoch.

These additions are artifact-only. They do not enter `packages.json`, the rolling updater, or edge. The independently signed 50-package snapshot remains unchanged and supplies the other custom dependencies. Image consumers must reject overlapping names between the two sets. Source builds, signing, and image transaction checks remain distinct pieces of evidence.

## Native boot prerequisites

The opt-in `--boot-profile limine` build checks the four boot recipes' native make dependencies with `pacman -T` before running the desktop suite. Provision these in the disposable native ARM builder; the producer does not install host packages. U-Boot requires `bc`, `imagemagick`, `python`, `python-setuptools`, `swig`, `openssl`, and `gnutls` in addition to base-devel. Its bundled device-tree compiler is built from the pinned source. Both GraalVM recipes require `git` and `zlib`, with the compiler and C library headers supplied by base-devel. Gradle and GraalVM remain the architecture-specific archives pinned by the recipes. Runtime dependencies are resolved by the separate installation transaction.

These make-dependency declarations are local adaptations to the pinned Marcelo recipes. They cover the pylibfdt Python extension, EFI signing host tools, and GraalVM's zlib link; they do not change the U-Boot patches or Limine program sources. The existing nine-package workflow stays unchanged and does not select the boot profile.
5 changes: 5 additions & 0 deletions pkgbuilds/limine-mkinitcpio-hook/.omarchy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"source": "aur",
"sync": false,
"upstream_commit": "5a5616fc6cc3a935b25d2d80aa4f1f9a6a782ef4"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
diff --git a/src/main/java/org/limine/entry/tool/Main.java b/src/main/java/org/limine/entry/tool/Main.java
index 434de01..91c5976 100644
--- a/src/main/java/org/limine/entry/tool/Main.java
+++ b/src/main/java/org/limine/entry/tool/Main.java
@@ -280,8 +280,8 @@ public class Main {
}

private static void addUki(String kernelName, String comment, EntryOptions kernelEntryOptions, String ukiFilePath) throws IOException {
- if (!Utility.isSystemAmd64()) {
- exitWithError("Your system is not using x86_64 architecture");
+ if (!Utility.isSystemUefiCapable()) {
+ exitWithError("Your system is not using x86_64 or aarch64 architecture");
}
if (!Utility.isSystemEfi()) {
exitWithError("Your system is not using EFI mode");
@@ -311,8 +311,8 @@ public class Main {
}

private static void addEfi(String efiName, String comment, EntryOptions kernelEntryOptions, String efiFilePath, boolean shouldCheckDevice) throws IOException {
- if (shouldCheckDevice && !Utility.isSystemAmd64()) {
- exitWithError("Your system is not using x86_64 architecture");
+ if (shouldCheckDevice && !Utility.isSystemUefiCapable()) {
+ exitWithError("Your system is not using x86_64 or aarch64 architecture");
return;
}
if (shouldCheckDevice && !Utility.isSystemEfi()) {
diff --git a/src/main/java/org/limine/entry/tool/processes/Utility.java b/src/main/java/org/limine/entry/tool/processes/Utility.java
index d89f674..2394038 100644
--- a/src/main/java/org/limine/entry/tool/processes/Utility.java
+++ b/src/main/java/org/limine/entry/tool/processes/Utility.java
@@ -592,6 +592,15 @@ public class Utility {
return arch.equals("x86_64") || arch.equals("amd64");
}

+ /**
+ * Architectures whose UKI and EFI entries this tool writes: x86_64 and
+ * aarch64 (UEFI provided by U-Boot on Apple Silicon).
+ */
+ public static boolean isSystemUefiCapable() {
+ String arch = System.getProperty("os.arch").toLowerCase();
+ return isSystemAmd64() || arch.equals("aarch64");
+ }
+

/**
* Validates if the given path is a valid boot partition using FAT32.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
--- a/install/arch-linux/limine-mkinitcpio-hook/usr/share/libalpm/scripts/limine-mkinitcpio-install
+++ b/install/arch-linux/limine-mkinitcpio-hook/usr/share/libalpm/scripts/limine-mkinitcpio-install
@@ -1,4 +1,16 @@
#!/usr/bin/env bash
+
+# Omarchy's Apple boot package opts in only after image activation. An absent
+# helper keeps the generic Limine behavior. Check before loading ESP defaults.
+if [[ -x /usr/lib/omarchy/mac-boot/limine-ready ]]; then
+ omarchy_gate_status=0
+ /usr/lib/omarchy/mac-boot/limine-ready || omarchy_gate_status=$?
+ case $omarchy_gate_status in
+ 0) ;;
+ 100) exec /usr/share/libalpm/scripts/mkinitcpio install ;;
+ *) exit "$omarchy_gate_status" ;;
+ esac
+fi


# Import functions and environment variables
--- a/install/arch-linux/limine-mkinitcpio-hook/usr/share/libalpm/scripts/limine-mkinitcpio-remove
+++ b/install/arch-linux/limine-mkinitcpio-hook/usr/share/libalpm/scripts/limine-mkinitcpio-remove
@@ -1,4 +1,16 @@
#!/usr/bin/env bash
+
+# Omarchy's Apple boot package opts in only after image activation. An absent
+# helper keeps the generic Limine behavior. Check before loading ESP defaults.
+if [[ -x /usr/lib/omarchy/mac-boot/limine-ready ]]; then
+ omarchy_gate_status=0
+ /usr/lib/omarchy/mac-boot/limine-ready || omarchy_gate_status=$?
+ case $omarchy_gate_status in
+ 0) ;;
+ 100) cat >/dev/null; exit 0 ;;
+ *) exit "$omarchy_gate_status" ;;
+ esac
+fi
# Handles cleanup of Limine boot entries when kernels are removed or upgraded

# Import functions and environment variables
--- a/install/arch-linux/limine-entry-tool/usr/bin/limine-install
+++ b/install/arch-linux/limine-entry-tool/usr/bin/limine-install
@@ -1,4 +1,16 @@
#!/usr/bin/env bash
+
+# Omarchy's Apple boot package opts in only after image activation. An absent
+# helper keeps the generic Limine behavior. Check before loading ESP defaults.
+if [[ -x /usr/lib/omarchy/mac-boot/limine-ready ]]; then
+ omarchy_gate_status=0
+ /usr/lib/omarchy/mac-boot/limine-ready || omarchy_gate_status=$?
+ case $omarchy_gate_status in
+ 0) ;;
+ 100) exit 0 ;;
+ *) exit "$omarchy_gate_status" ;;
+ esac
+fi

# Default values
EFI_REGISTER=yes
Loading
Loading