diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-11 16:10:14 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-01-18 14:55:40 -0700 |
commit | 62ef2f7bf3c442b6f717d2fbe823d579cf090dd8 (patch) | |
tree | 1a6739488ca8170a0bcd56d0f5ecbc05c66c0773 /tools/binman/etype/section.py | |
parent | 4331d66661566cd823086204636754f785bd5d45 (diff) |
binman: Add a null entry
It is sometimes useful to define an entry which does not have its own
contents but does appear in the image. The contents are set by the section
which contains it, even though it appears as an entry in the fdtmap.
Add support for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/etype/section.py')
-rw-r--r-- | tools/binman/etype/section.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index 85474f2411..28f04cb84a 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -320,6 +320,12 @@ class Entry_section(Entry): # earlier in the image description. See testCollectionSection(). if not required and entry_data is None: return None + + if entry_data is None: + pad_byte = (entry._pad_byte if isinstance(entry, Entry_section) + else self._pad_byte) + entry_data = tools.get_bytes(self._pad_byte, entry.size) + data = self.GetPaddedDataForEntry(entry, entry_data) # Handle empty space before the entry pad = (entry.offset or 0) - self._skip_at_start - len(section_data) |