[PATCH 3/7] binman: Don't reset offset/size if image doesn't allow repacking

Simon Glass sjg at chromium.org
Tue Apr 19 23:54:10 CEST 2022


On Sun, 27 Mar 2022 at 09:32, Alper Nebi Yasak <alpernebiyasak at gmail.com> wrote:
>
> 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 at gmail.com>
> ---
>
>  tools/binman/control.py |  2 +-
>  tools/binman/ftest.py   | 21 +++++++++++++++++++++
>  2 files changed, 22 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list