]> git.baikalelectronics.ru Git - uboot.git/commit
binman: Don't reset offset/size if image doesn't allow repacking
authorAlper Nebi Yasak <alpernebiyasak@gmail.com>
Sun, 27 Mar 2022 15:31:46 +0000 (18:31 +0300)
committerTom Rini <trini@konsulko.com>
Mon, 25 Apr 2022 14:11:05 +0000 (10:11 -0400)
commit963b46bfb34adf0e2199ec27ecc77550cddc21cb
tree645f1bb4f77477f1d3956f5a25ec9b323e8d969f
parent583be4bf35edca6be9fdb5f4da3d3f74afb0c183
binman: Don't reset offset/size if image doesn't allow repacking

When an image has the 'allow-repack' property, binman includes the
original offset and size properties from the image description in the
fdtmap. These are later used as the packing constraints when replacing
entries in an image, so other unconstrained entries can be freely
positioned.

Replacing an entry in an image without 'allow-repack' (and therefore the
original offsets) follows the same logic and results in entries being
merely concatenated. Instead, skip resetting the calculated offsets and
sizes to the missing originals for these images so that every entry is
constrained to its existing offset/size.

Add tests that replace an entry with smaller or equal-sized data, in an
image that doesn't allow repacking. Attempting to do so with bigger-size
data is already an error that is already being tested.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/binman/control.py
tools/binman/ftest.py