Repository navigation
ci: stop assembling the two NOR images their u-boot has no room for - #2461
Conversation
The bounds checks #2448 added ran for the first time on 2026-09-19 and refused six images: hi3516cv6xx ultimate on all four DDR binnings, and hi3519dv500 ultimate on both. That is not a regression #2448 introduced -- it is the table disagreement the published images already carried, now reported instead of shipped -- but it leaves the job red on every run, and re-running against a fresh nightly does not clear it. That run assembled from nightly-20260918-49908b5, because the build had failed and the manifest never advanced, so cv6xx reported a FIT overflow from a blob predating #2447's kernel trim. Measured against the current nightly with create_hisi's own arithmetic, the error changes but does not go away: hi3516cv6xx_lite FIT 2048/2048 ok rootfs 5088/5120 ok hi3516cv6xx_ultimate FIT 2048/2048 ok rootfs 7096/5120 over by 1976 KiB hi3519dv500_ultimate FIT 5632/6144 ok rootfs 8820/8192 over by 628 KiB The cause is that there is one boot binary per DDR binning, not one per part size, and its compiled-in mtdparts is the same on an 8 MiB part and a 16 MiB one. Decompressing the gzip member inside the shipped u-boots (offset 40128 for cv610, 84768 for hi3519dv500) gives: cv610/cv608 256k(boot),64k(env),2048k(kernel),5120k(rootfs),7168k@0x50000(firmware) hi3519dv500 512k(boot),256k(env),6144k(kernel),8192k(rootfs),14336k@0xC0000(firmware) The cv6xx ultimate blob is 9152 KiB and the dv500 one 14464 KiB -- each larger than the whole firmware partition, never mind the rootfs slot inside it. FLASH_SIZE="16" buys them nothing, because the rest of the chip is rootfs_data. No trim closes a 1976 KiB gap, so until a u-boot ships whose table matches a 16 MiB part there is nothing to assemble. So emit cv6xx lite only, and drop the dv500 loop, which has no lite variant to fall back on. Both comments carry the partition numbers so restoring a loop is a two-line change. #2447 fits both cv6xx lite slots exactly (2048 in 2048, 5088 in 5120) and that image assembles and boots today. The .tgz for both variants still publishes from the build job, so sysupgrade is unaffected -- it splits the blob at the FIT boundary and writes each half to its own partition, and refuses an oversized half rather than mis-landing it.
PR Summary by QodoStop assembling unsupported HiSilicon NOR images
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
image is a fixed tag and Upload only adds or replaces the files a run produced, so dropping a target from the assembly loops leaves whatever it published last sitting on the release for good. Six such assets were still downloadable, all dated 2026-09-18: the four hi3516cv610/cv608 ultimate images and both hi3519dv500 ones. They are not merely stale. They were assembled before #2448 taught create_hisi to split the blob at the FIT boundary and measure each half against the partition it goes into, so they carry the layout that PR replaced -- a FIT running past the end of the kernel slot and a rootfs written over rootfs_data. Withdrawing the images from the loops without withdrawing them from the release would have left exactly the files this change exists to stop shipping. Delete them by name before Upload, tolerating an asset that is already absent so the step is idempotent and never fails a run. Drop a name from the list when its loop comes back (#2460).
Problem
The
imageworkflow (run 35462750911) refused six images and went red:That is the bounds check #2448 added, running for the first time — every
imagerun between it merging and this one wasskipped. #2448 predicted itin its own description. It is not a regression: it is the table disagreement
the published images already carried, now reported instead of shipped.
Two things the log does not say.
It assembled from a stale nightly.
nightly-20260918-49908b5, because thebuild had failed and the manifest never advanced. That is why cv6xx reports a
FIT overflow — that blob predates #2447's kernel trim.
Re-running on a fresh nightly does not clear it. Measured against the
current nightly with
create_hisi's own arithmetic (FIT size = the big-endianword at byte 4 rounded to 64 KiB; rootfs =
bytes_usedat superblock byte 40rounded to 4 KiB):
The error message changes; the failure does not.
The cause is that there is one boot binary per DDR binning, not one per part
size, and its compiled-in
mtdpartsis the same on an 8 MiB part and a 16 MiBone. Decompressing the gzip member inside the shipped u-boots (offset 40128 for
cv610, 84768 for hi3519dv500) and running
stringson the result:The cv6xx ultimate blob is 9152 KiB and the dv500 one is 14464 KiB — each
larger than the whole firmware partition, never mind the rootfs slot inside it.
BR2_OPENIPC_FLASH_SIZE="16"buys them nothing, because the rest of the chipis
rootfs_data. No trim closes a 1976 KiB gap, so until a u-boot ships whosetable matches a 16 MiB part there is nothing here to assemble.
So this emits cv6xx
liteonly and drops the dv500 loop, which has nolitevariant to fall back on. Both comments carry the partition numbers, so
restoring a loop is a two-line change once such a u-boot exists. Tracked
in #2460, which carries the tables, the measurements and what a fix needs.
#2447fits both cv6xx lite slots exactly, and that image assembles and bootstoday.
Stopping assembly is only half of it.
imageis a fixed tag andUploadonly adds or replaces the files a run produced, so dropping a target from the
loops leaves whatever it published last on the release for good. Six such
assets were still downloadable, all dated 2026-09-18 — the four cv610/cv608
ultimate images and both dv500 ones — and they are not merely stale: every one
predates #2448, so they carry the very layout it replaced, a FIT past the end
of the 2048 KiB kernel slot and a rootfs landing over
rootfs_data. Withdrawingthe targets while leaving those files up would have left exactly the images
this PR exists to stop shipping. A step before
Uploadnow deletes them byname, tolerating an asset that is already absent so it is idempotent and never
reddens a run; a name comes off the list when its loop comes back. The
.tgzfor both variants still publishes from the build job, sosysupgradeis unaffected: it splits the blob at the FIT boundary and writeseach half to its own partition, and
check_combined_fitsrefuses an oversizedhalf rather than mis-landing it.
Hardware tested on
None, and none is needed for this one — it is CI machinery that only
selects what to assemble. It ships nothing to a camera; the opposite, it stops
publishing two
.binfiles that could not boot on the u-boot they are pairedwith. Nothing that does reach a camera changes: the same build job publishes
the same
.tgzfor every variant it did before.Evidence
Before — the six refusals, from run 35462750911:
The partition tables, read back out of the shipped boot binaries rather than
assumed:
After —
create_hisi's measurement run against the current nightly blobs:so after this change the job assembles the four cv6xx lite images and nothing
that it would have to refuse.
Scope
general/package/all-patches/linux/(those go to OpenIPC/linux)general/overlay/or in a sharedload_<vendor>script hardcodes a value specific to my boardLD_PRELOAD, and no binaries that cannot be rebuilt from source