sysupgrade: variant-aware manifest URL + model-aware platform key (1.0.51)#2130
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 insysupgradeand the newrootfs_script.shline 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:https://openipc.github.io/firmware/manifest.flat.https://openipc.github.io/builder/manifest.flat.BUILD_OPTIONfield) default to "lite" → firmware manifest (safest default — firmware is the larger ecosystem).MANIFEST_URL=...env override still wins.Phase 3 — model-aware platform key
New
BUILD_PLATFORMfield emitted into/etc/os-releasebygeneral/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'smaster.yml(OpenIPC/builder#91) now exports as the matrix entry name (e.g.gk7205v200_fpv_caddx-fly).sysupgrade --build=/--channel=/--list-buildslookups now preferBUILD_PLATFORMover 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_PLATFORMfall back to the coarse key. No flag day.Verification
Routing simulated against synthetic /etc/os-release fragments:
On-hardware verification after merge:
openipc-hi3520dv200.dlab(lite) —sysupgrade --list-buildscontinues to query the firmware manifest, unchanged.openipc-gk7205v200.dlab(fpv) —sysupgrade --list-buildsnow queries the builder manifest. Expected: empty result until ci/nightly: SHA-gate cron, publish dated nightly-* releases, BUILD_ID env builder#91-Some eye-candy for README page. #93 produce the first dated nightly (next cron at 03:00 UTC).Dependencies
OpenIPC/builder#91 (PR-Bld-A): exports
BUILD_PLATFORM=$matrix.platformenv, which is the source-of-truth for the rich platform key. Already merged.scr_version
Bumped
1.0.50 → 1.0.51soself_update()activates the new script the next time a lite/ultimate/neo camera runssysupgrade -k -r.🤖 Generated with Claude Code