summaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-20 21:23:46 +0300
committerSimon Glass <sjg@chromium.org>2019-07-29 18:38:06 +0300
commitc5ad04b72169c40e3646ed5bba28832eed2c5d4f (patch)
tree73fcbfba65313e721c03cb2256492e22ec66508b /tools/binman/entry.py
parentc6bd6e235ac6d6a35e9ad8f3db49db7ba27f7650 (diff)
downloadu-boot-c5ad04b72169c40e3646ed5bba28832eed2c5d4f.tar.xz
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.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index c4ddb43b31..ddf52d8e10 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()