ci: gate publish on u-boot fitting 256 KiB boot partition - #15
Merged
Conversation
Mirrors OpenIPC/firmware's CHECK_SIZE pattern (Makefile:155) for kernel/rootfs. mtdparts in include/configs/hi-common.h declares 256k(boot) across every NOR/NAND/UBI variant; if u-boot grows past that it overflows into env at offset 0x40000 and bricks devices on upgrade. Hard-fail at build time so an oversized binary never reaches firmware/latest. Both current binaries are well under (~194 KiB), so this lands as a preventive guard. 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
Adds a `Check partition fit` step to the build job that fails CI
if `u-boot--universal.bin` exceeds 256 KiB — the size of
the `(boot)` partition declared in `include/configs/hi-common.h`
across every NOR/NAND/UBI mtdparts variant.
Mirrors `OpenIPC/firmware/Makefile` `CHECK_SIZE` macro (lines
155–161) which already gates kernel/rootfs sizes against per-SoC
flash limits. Without this, a future feature merge could push
u-boot past 256 KiB, the publish job would happily upload it, and
the next user upgrade would overflow into env at offset 0x40000
and brick the device.
Current binaries: `hi3516av200` 194 KiB, `hi3519v101` 194 KiB —
plenty of headroom, this lands as a preventive guard.
Test plan
entries with output like `- u-boot-hi3519v101-universal.bin:
[194KB/256KB]`.
🤖 Generated with Claude Code