Skip to content

ci: gate publish on u-boot fitting 256 KiB boot partition - #15

Merged
widgetii merged 1 commit into
masterfrom
ci/partition-size-gate
May 8, 2026
Merged

ci: gate publish on u-boot fitting 256 KiB boot partition#15
widgetii merged 1 commit into
masterfrom
ci/partition-size-gate

Conversation

@widgetii

@widgetii widgetii commented May 8, 2026

Copy link
Copy Markdown
Member

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

  • CI `Check partition fit` step runs green on both matrix
    entries with output like `- u-boot-hi3519v101-universal.bin:
    [194KB/256KB]`.
  • All other jobs (`build`, `qemu_smoke`) unchanged.

🤖 Generated with Claude Code

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>
@widgetii
widgetii merged commit 4028654 into master May 8, 2026
5 checks passed
@widgetii
widgetii deleted the ci/partition-size-gate branch May 8, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants