diff options
author | Simon Glass <sjg@chromium.org> | 2019-07-20 12:23:46 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-29 09:38:06 -0600 |
commit | c5ad04b72169c40e3646ed5bba28832eed2c5d4f (patch) | |
tree | 73fcbfba65313e721c03cb2256492e22ec66508b /tools/binman/entry.py | |
parent | c6bd6e235ac6d6a35e9ad8f3db49db7ba27f7650 (diff) | |
download | u-boot-c5ad04b72169c40e3646ed5bba28832eed2c5d4f.zip u-boot-c5ad04b72169c40e3646ed5bba28832eed2c5d4f.tar.gz u-boot-c5ad04b72169c40e3646ed5bba28832eed2c5d4f.tar.bz2 |
binman: Add a function to obtain the image for an Entry
At present we have an 'image' property in the entry for this purpose, but
this is not necessary and seems error-prone in the presence of
inheritance. Add a function instead. The Entry_section class overrides
this with a special version, since top-level sections are in fact images,
since Image inherits Entry_section.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r-- | tools/binman/entry.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py index c4ddb43..ddf52d8 100644 --- a/tools/binman/entry.py +++ b/tools/binman/entry.py @@ -700,3 +700,11 @@ features to produce new behaviours. data = self.ReadData(decomp) self.ProcessContentsUpdate(data) self.Detail('Loaded data size %x' % len(data)) + + def GetImage(self): + """Get the image containing this entry + + Returns: + Image object containing this entry + """ + return self.section.GetImage() |