binman: Support reading an image with entry args
authorSimon Glass <sjg@chromium.org>
Thu, 7 Jan 2021 04:35:16 +0000 (21:35 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 30 Jan 2021 21:25:41 +0000 (14:25 -0700)
commit939d1062d05fb4990ca7898613bcc753574f7c56
tree7e7ac0cb10123e23424ec8c1acc8577806516f88
parent870a9ead569ce8ee1f9fc03d178b56e012465582
binman: Support reading an image with entry args

Normally when an entry is created, any entry arguments it has are required
to be provided, so it can actually generate its contents correctly.

However when an existing image is read, Entry objects are created for each
of the entries in the image. This happens as part of the process of
reading the image into binman.

In this case we don't need the entry arguments, since we do not intend to
regenerate the entries, or at least not unless requested. So there is no
sense in reporting an error for missing entry arguments.

Add a new property for the Image to handle this case. Update the error
reporting to be conditional on this property.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/entry.py
tools/binman/etype/section.py
tools/binman/ftest.py
tools/binman/image.py
tools/binman/test/188_image_entryarg.dts [new file with mode: 0644]