1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-22 10:31:56 +02:00

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>
This commit is contained in:
Simon Glass
2019-07-20 12:23:46 -06:00
parent c6bd6e235a
commit c5ad04b721
4 changed files with 23 additions and 5 deletions

View File

@@ -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()