ci: gate publish on u-boot fitting 256 KiB boot partition - #3
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. All current binaries fit well under (~120-247 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 fitstep to the build job that fails CIif
u-boot-<soc>-universal.binexceeds 256 KiB — the size ofthe
(boot)partition declared ininclude/configs/hi-common.hacross every NOR/NAND/UBI mtdparts variant.
Mirrors
OpenIPC/firmware/MakefileCHECK_SIZEmacro (lines155–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.
All current binaries fit well under the limit — this lands as
a preventive guard.
Test plan
Check partition fitstep runs green on every matrixentry with output like
- u-boot-<soc>-universal.bin: [<size>KB/256KB].🤖 Generated with Claude Code