Skip to content

sysupgrade: variant-aware manifest URL + model-aware platform key (1.0.51)#2130

Merged
widgetii merged 1 commit into
masterfrom
ci/sysupgrade-variant-aware-manifest
May 23, 2026
Merged

sysupgrade: variant-aware manifest URL + model-aware platform key (1.0.51)#2130
widgetii merged 1 commit into
masterfrom
ci/sysupgrade-variant-aware-manifest

Conversation

@widgetii
Copy link
Copy Markdown
Member

Summary

Phase 2 + Phase 3 of the mirror to OpenIPC/builder (companion plan: ~/.claude/plans/mirror-nightly-redesign-to-builder.md). Two coordinated changes in one PR because both surface in sysupgrade and the new rootfs_script.sh line is what makes them work together.

Phase 2 — variant-aware MANIFEST_URL

Static URL replaced with a runtime selector that mirrors the existing legacy-URL repo selector at download_firmware:

case "$osr" in lite|ultimate|neo) repo=firmware ;; esac
  • lite/ultimate/neo cameras read https://openipc.github.io/firmware/manifest.flat.
  • everything else (fpv, rubyfpv, apfpv, lte, venc, mini, …) reads https://openipc.github.io/builder/manifest.flat.
  • Pre-redesign cameras (no BUILD_OPTION field) default to "lite" → firmware manifest (safest default — firmware is the larger ecosystem).
  • Explicit MANIFEST_URL=... env override still wins.

Phase 3 — model-aware platform key

New BUILD_PLATFORM field emitted into /etc/os-release by general/scripts/rootfs_script.sh. Defaults to ${OPENIPC_SOC_MODEL}_${OPENIPC_VARIANT} (matches the existing coarse key for firmware-built rootfses), but accepts an env override — which OpenIPC/builder's master.yml (OpenIPC/builder#91) now exports as the matrix entry name (e.g. gk7205v200_fpv_caddx-fly).

sysupgrade --build=/--channel=/--list-builds lookups now prefer BUILD_PLATFORM over the computed ${soc}_${osr} when present, so a builder-built camera correctly filters its manifest to only its specific model — not all ~10 models sharing the same SoC+variant.

Backwards-compatible: cameras pre-dating BUILD_PLATFORM fall back to the coarse key. No flag day.

Verification

Routing simulated against synthetic /etc/os-release fragments:

BUILD_OPTION=fpv  → https://openipc.github.io/builder/manifest.flat
BUILD_OPTION=lite → https://openipc.github.io/firmware/manifest.flat

On-hardware verification after merge:

Dependencies

OpenIPC/builder#91 (PR-Bld-A): exports BUILD_PLATFORM=$matrix.platform env, which is the source-of-truth for the rich platform key. Already merged.

scr_version

Bumped 1.0.50 → 1.0.51 so self_update() activates the new script the next time a lite/ultimate/neo camera runs sysupgrade -k -r.

🤖 Generated with Claude Code

…0.51)

Phase 2 + Phase 3 of the mirror to OpenIPC/builder (see plan in
~/.claude/plans/mirror-nightly-redesign-to-builder.md). Two coordinated
changes in one PR because both surface in sysupgrade and the new
rootfs_script.sh line is what makes them work together.

**Phase 2 — variant-aware MANIFEST_URL.** Static URL replaced with a
runtime selector that mirrors the existing legacy-URL repo selector at
download_firmware:118 (`case "$osr" in lite|ultimate|neo) repo=firmware`).
Lite/ultimate/neo cameras come from OpenIPC/firmware and read its
manifest; everything else (fpv, rubyfpv, apfpv, lte, venc, mini, …) is
built by OpenIPC/builder and reads
https://openipc.github.io/builder/manifest.flat. Pre-redesign cameras
without BUILD_OPTION default to "lite" → firmware manifest (safest
default since firmware is the larger ecosystem). Explicit
`MANIFEST_URL=...` env override still wins.

**Phase 3 — model-aware platform key.** New `BUILD_PLATFORM` field
emitted into /etc/os-release by general/scripts/rootfs_script.sh.
Defaults to `${OPENIPC_SOC_MODEL}_${OPENIPC_VARIANT}` (matches the
existing coarse key for firmware-built rootfses), but accepts an env
override — which OpenIPC/builder's master.yml (PR #91) now exports as
the matrix entry name (e.g. `gk7205v200_fpv_caddx-fly`). sysupgrade's
`--build=`/`--channel=`/`--list-builds` lookups now prefer
BUILD_PLATFORM over the computed `${soc}_${osr}` when present, so a
builder camera correctly filters its manifest to ONLY its specific
model — not all ~10 models sharing the same SoC+variant.

Backwards-compatible: cameras pre-dating BUILD_PLATFORM fall back to
the coarse key via existing computation. No flag day.

Verified via simulated /etc/os-release fragments:
  BUILD_OPTION=fpv  → manifest at openipc.github.io/builder
  BUILD_OPTION=lite → manifest at openipc.github.io/firmware

scr_version bumped 1.0.50 → 1.0.51 so self_update activates the new
script the next time a lite/ultimate/neo camera runs `sysupgrade -k -r`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@widgetii widgetii merged commit d8c9c8c into master May 23, 2026
95 checks passed
@widgetii widgetii deleted the ci/sysupgrade-variant-aware-manifest branch May 23, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant