ci: publish u-boot artifacts to OpenIPC/firmware on master - #12
Merged
Conversation
After both matrix builds succeed on a push to master, upload u-boot-hi3516av200-universal.bin and u-boot-hi3519v101-universal.bin (1 MiB-padded, matching build.sh output) to the 'latest' release in OpenIPC/firmware via gh release upload --clobber. Build step now also produces the 1 MiB-padded universal binary so the CI artifact name and contents match the published asset name. Requires repo secret FIRMWARE_RELEASE_TOKEN: a fine-grained PAT scoped to OpenIPC/firmware with Contents: read and write. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Document the failure modes a future debugger will hit first: missing/ expired/under-scoped FIRMWARE_RELEASE_TOKEN, deleted 'latest' tag in OpenIPC/firmware, and missing build artifacts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The hi3516av200 release asset becomes the raw mini-boot.bin (~199 KB). Padding to NAND erase-block size happens in defib (the recovery tool that consumes this asset) so we don't bake a flash-geometry assumption into the boot image. hi3519v101 keeps the 1 MiB padding it had. Apply the same change to build.sh so local builds match the published artifact byte-for-byte. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Apply the consumer-pads principle to hi3519v101 too, not just
hi3516av200. Both u-boot-${soc}-universal.bin assets are now the raw
LZMA self-extractor output; the recovery tool (defib) is responsible
for padding to the target flash erase-block size before writing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
widgetii
added a commit
that referenced
this pull request
May 5, 2026
## Summary - The first `publish` run after PR #12 merged failed because the GitHub Releases API returned a 502 "Unicorn!" page on the very first `gh release upload` call. A manual re-run worked. Add retry to make this self-heal. - Wrap `gh release upload` in a 5-attempt loop with linear backoff (10s, 20s, 30s, 40s — ~100s total before giving up). Real auth/scope failures still fail the job; they just take longer to surface. ## Test plan - [ ] PR build (no publish) stays green. - [ ] After merge, normal master push uploads both assets on the first attempt as before. - [ ] Manual sanity: temporarily point the upload at a bogus release tag; confirm 5 attempts then fail. Co-authored-by: john-1 <john-1@users.noreply.github.com> 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
master, uploadu-boot-hi3516av200-universal.binandu-boot-hi3519v101-universal.bin(1 MiB-padded, matchingbuild.shoutput) to thelatestrelease inOpenIPC/firmware.dd ... bs=1M conv=syncpadding so the CI artifact's contents and name match what gets published. Previously the artifact was namedu-boot-<soc>-universalbut contained rawmini-boot.bin.publishjob is gated topushevents onrefs/heads/master, so PR builds don't try to publish.Required setup before merge
Create a fine-grained PAT scoped to
OpenIPC/firmwarewithContents: Read and write, then add it to this repo's Actions secrets asFIRMWARE_RELEASE_TOKEN:OpenIPC· Repository access: Only select repositories →OpenIPC/firmware· Permissions → Repository permissions → Contents: Read and writegh secret set FIRMWARE_RELEASE_TOKEN -R OpenIPC/u-boot-hi3519v101 --body '<token>'Without the secret, the
publishjob fails fast (gh: 401) butbuildstill passes.Test plan
build (hi3516av200)andbuild (hi3519v101)are green and produce a ~1 MiBu-boot-<soc>-universal.binartifact each.publishjob is skipped on this PR (event_name == pull_request).publishruns once both builds finish; the two assets inOpenIPC/firmwarelatestrelease get replaced (--clobber) with fresh, identically-named binaries.publishfails clearly without affecting build status of master.