summaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-01-10 06:14:09 +0300
committerSimon Glass <sjg@chromium.org>2022-01-25 22:36:11 +0300
commit4f9ee83ba96c6c4e5e647f26eb4a124544ce61d7 (patch)
tree74410fffbe77c7e1ae6d9286e9038abb19f5d496 /tools/binman/entry.py
parent359e431cbc1d956b65b6b6bc86b7f3f88fc15927 (diff)
downloadu-boot-4f9ee83ba96c6c4e5e647f26eb4a124544ce61d7.tar.xz
binman: Plumb in support for missing bintools
Bintools can be missing, in which case binman continues operation but reports an invalid image. Plumb in support for this and add tests for entry types which use bintools. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index b4323d5147..08770ec5f0 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -77,6 +77,7 @@ class Entry(object):
available. This is mainly used for testing.
external: True if this entry contains an external binary blob
bintools: Bintools used by this entry (only populated for Image)
+ missing_bintools: List of missing bintools for this entry
"""
def __init__(self, section, etype, node, name_prefix=''):
# Put this here to allow entry-docs and help to work without libfdt
@@ -109,6 +110,7 @@ class Entry(object):
self.allow_missing = False
self.allow_fake = False
self.bintools = {}
+ self.missing_bintools = []
@staticmethod
def FindEntryClass(etype, expanded):
@@ -1015,6 +1017,24 @@ features to produce new behaviours.
"""
return self.allow_missing
+ def record_missing_bintool(self, bintool):
+ """Record a missing bintool that was needed to produce this entry
+
+ Args:
+ bintool (Bintool): Bintool that was missing
+ """
+ self.missing_bintools.append(bintool)
+
+ def check_missing_bintools(self, missing_list):
+ """Check if any entries in this section have missing bintools
+
+ If there are missing bintools, these are added to the list
+
+ Args:
+ missing_list: List of Bintool objects to be added to
+ """
+ missing_list += self.missing_bintools
+
def GetHelpTags(self):
"""Get the tags use for missing-blob help