binman: Expand docs and test for padding

Padding becomes part of the entry once the image is written out, but
within binman the entry contents does not include the padding. Add
documentation to make this clear, as well as a test.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-10-26 17:40:09 -06:00
parent ef439ed191
commit f90d906a27
3 changed files with 45 additions and 7 deletions

View File

@@ -51,9 +51,14 @@ class Entry(object):
align: Entry start offset alignment, or None
align_size: Entry size alignment, or None
align_end: Entry end offset alignment, or None
pad_before: Number of pad bytes before the contents, 0 if none
pad_after: Number of pad bytes after the contents, 0 if none
data: Contents of entry (string of bytes)
pad_before: Number of pad bytes before the contents when it is placed
in the containing section, 0 if none. The pad bytes become part of
the entry.
pad_after: Number of pad bytes after the contents when it is placed in
the containing section, 0 if none. The pad bytes become part of
the entry.
data: Contents of entry (string of bytes). This does not include
padding created by pad_before or pad_after
compress: Compression algoithm used (e.g. 'lz4'), 'none' if none
orig_offset: Original offset value read from node
orig_size: Original size value read from node