Make OTA the default K2 build path#33
Merged
Merged
Conversation
c834d27 to
eec3fbb
Compare
There was a problem hiding this comment.
Pull request overview
Makes the H7 MCUboot/OTA sysbuild the default for build.sh/build.ps1, sunsets F7 flags with a clear error, teaches the OTA helpers to discover the signed image via a build-h755-ota/*/zephyr/zephyr.signed.bin glob, and updates README/ETHERNET_OTA/comments/CMake messaging to frame Ethernet OTA as the normal update path and USB west flash as provisioning/recovery only.
Changes:
- Default build is now H7 OTA;
--otais a no-op,--no-otaopts into plain builds,--f7errors out. - OTA helpers (
tools/k2-ota.sh/.ps1) auto-locate the signed image underbuild-h755-ota/*/zephyr/zephyr.signed.bin, removing the hardcodedK2-Zephyrpath. - Docs, comments, and a new CMake status message reorient users toward Ethernet OTA, reserving
west flashfor first-time/recovery use.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| build.sh | Default to OTA, add --no-ota, reject --f7, robust workspace/venv paths, new flash guidance output. |
| build.ps1 | PowerShell mirror of the new defaults, flags, venv lookup, and flash guidance. |
| tools/k2-ota.sh | Compute project dir; glob-discover default signed image with clear multi/zero match errors. |
| tools/k2-ota.ps1 | Mirror discovery in PowerShell; default $Image from $env:IMAGE. |
| README.md | Document H7-only support, OTA-default build, USB flash as provisioning/recovery. |
| ETHERNET_OTA.md | Add provisioning section pointing to ./build.sh and one-time USB flash. |
| CMakeLists.txt | Emit a STATUS hint clarifying when to use west flash vs OTA helpers. |
| prj.conf | Update Ethernet comment to target H755 only. |
| src/main.c | Header comment now lists only the H755ZI-Q target. |
| .github/workflows/main.yml | Drop F7 from the release matrix. |
Comments suppressed due to low confidence (1)
ETHERNET_OTA.md:158
- These lines still hardcode
build-h755-ota/K2-Zephyr/zephyr/zephyr.signed.bin, which is inconsistent with the helper change in this PR that discovers the signed image underbuild-h755-ota/*/zephyr/zephyr.signed.bin. For users whose checkout directory is not literally namedK2-Zephyr(a sibling worktree, a fork rename, etc.), both the prose ("By default, the helper finds the signed image at ...") and the explicitmcumgr ... image upload ...example will be wrong. Consider documenting the wildcard path or explaining that the middle component is the source-directory name.
By default, the helper finds the signed image at
`build-h755-ota/K2-Zephyr/zephyr/zephyr.signed.bin`. To upload a different
signed image:
```bash
./tools/k2-ota.sh path/to/zephyr.signed.bin
On Windows:
.\tools\k2-ota.ps1Manual fallback:
mcumgr --conntype udp '--connstring=[10.77.0.2]:1337' image upload build-h755-ota/K2-Zephyr/zephyr/zephyr.signed.bin💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This updates the K2 build and flashing flow for #28.
The build wrappers now default to the H7 OTA sysbuild, keep --ota as an explicit no-op, and require --no-ota for a plain development build. F7 flags now fail clearly because F7 support is being sunset.
The OTA helpers now discover the signed image under build-h755-ota/*/zephyr/zephyr.signed.bin, so sibling worktrees and renamed checkouts do not break the default upload path. The README, Ethernet OTA guide, release matrix, and stale comments now document H7 and OTA as the supported path, with USB west flash reserved for first-time provisioning or recovery.
Validated with: