diff options
author | Simon Glass <sjg@chromium.org> | 2020-09-01 14:13:57 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-09-22 21:50:43 +0300 |
commit | 8795898a53dae112857f06b49e58cfe94a731dfa (patch) | |
tree | 579b751122fd0b3e4648b1580acdb61f0a9f1fb7 /tools/binman/entry.py | |
parent | 211cfa503f6cf850ccbd79b1082f9234b603e635 (diff) | |
download | u-boot-8795898a53dae112857f06b49e58cfe94a731dfa.tar.xz |
binman: Move 'external' support into base class
At present we have an Entry_blob_ext which implement a blob which holds an
external binary. We need to support other entry types that hold external
binaries, e.g. Entry_blob_named_by_arg. Move the support into the base
Entry class to allow this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r-- | tools/binman/entry.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py index c17a98958b..0f128c4cf5 100644 --- a/tools/binman/entry.py +++ b/tools/binman/entry.py @@ -57,6 +57,10 @@ class Entry(object): 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 + missing: True if this entry is missing its contents + allow_missing: Allow children of this entry to be missing (used by + subclasses such as Entry_section) + external: True if this entry contains an external binary blob """ def __init__(self, section, etype, node, name_prefix=''): # Put this here to allow entry-docs and help to work without libfdt @@ -83,6 +87,8 @@ class Entry(object): self._expand_size = False self.compress = 'none' self.missing = False + self.external = False + self.allow_missing = False @staticmethod def Lookup(node_path, etype): @@ -813,3 +819,11 @@ features to produce new behaviours. """ if self.missing: missing_list.append(self) + + def GetAllowMissing(self): + """Get whether a section allows missing external blobs + + Returns: + True if allowed, False if not allowed + """ + return self.allow_missing |