Skip to content

Decompose images/assemble-rootfs.sh into named sub-stages #43

Description

@loki666

Decompose images/assemble-rootfs.sh into named sub-stages — build-infra hygiene, no
behaviour change. At 733 lines it is ~2x the next-largest script (customize-base.sh, 418) and
is brushing our 800-line ceiling; it is also the pipeline's single coupling point, staging base
userspace + kernel/dtbs/modules + both firmware sets + fs-overlay/ + first-boot storage + offload
mounts + test-only Wi-Fi/SSH injection + debug capture + ownership normalization, then carving
var.img and baking rootfs.img. The structure is already there as comment banners (# 1.
base, # 2/2b/2c kernel/modules//efi, # 3/3b qcom + linux firmware, # 4/4b marker + overlay,
# 4g grow-home, # 4h offload, # 4c test-only, # 4d debug, # 4z chown, # 5 var carve,
# 6 btrfs bake) — the work is promoting each to a named function or sourced helper under
images/, keeping assemble-rootfs.sh as the entry point and the existing per-section rationale
comments intact. Payoff is that the test-only and debug injections become separable from the
release path by construction rather than by an if, which matters as RAUC lands. Only substantive
finding salvaged from the Copilot architecture-review PR (Nova-Deck/os-build#2, closed
2026-07-24 — its other four recommendations were already implemented: artifact paths are
centralized at Makefile:92-99, ROOTFS_MODE is already derived + stamped at Makefile:54, and
the stage README.mds already document per-script inputs/outputs/env). Relates to
[[folder-refactor-fs-overlay]], [[rootfs-build-approach]].


Migrated from TODO.md (line 416) on 2026-08-18. Long-form decision record for closed work: DONE.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Nice to have -- hygiene, polish, weak leadsarea/buildSubsystem: build

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions