[U-Boot] [PATCH v2 13/31] binman: Add a return value to ProcessContentsUpdate()
sjg at google.com
sjg at google.com
Thu Jul 18 01:58:48 UTC 2019
At present if this function tries to update the contents such that the
size changes, it raises an error. We plan to add the ability to change
the size of entries after packing is completed, since in some cases it is
not possible to determine the size in advance.
An example of this is with a compressed device tree, where the values
of the device tree change in SetCalculatedProperties() or
ProcessEntryContents(). While the device tree itself does not change size,
since placeholders for any new properties have already bee added by
AddMissingProperties(), we cannot predict the size of the device tree
after compression. If a value changes from 0 to 0x1234 (say), then the
compressed device tree may expand.
As a first step towards supporting this, make ProcessContentsUpdate()
return a value indicating whether the content size is OK. For now this is
always True (since otherwise binman raises an error), but later patches
will adjust this.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2: None
tools/binman/bsection.py | 8 +++++++-
tools/binman/entry.py | 22 +++++++++++++++++++--
tools/binman/etype/_testing.py | 5 +++--
tools/binman/etype/blob_dtb.py | 2 +-
tools/binman/etype/fdtmap.py | 2 +-
tools/binman/etype/fmap.py | 2 +-
tools/binman/etype/image_header.py | 2 +-
tools/binman/etype/section.py | 5 +++--
tools/binman/etype/u_boot_with_ucode_ptr.py | 6 +++---
tools/binman/image.py | 5 ++++-
10 files changed, 44 insertions(+), 15 deletions(-)
Applied to u-boot-dm, thanks!
More information about the U-Boot
mailing list