summaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorHeiko Thiery <heiko.thiery@gmail.com>2022-01-06 13:49:41 +0300
committerTom Rini <trini@konsulko.com>2022-01-07 20:10:55 +0300
commita89c8f2111bc647b697b776a40227673cfc713e3 (patch)
treee5169f24b432600613ff2dc1d4a78d5955627cb6 /tools/binman/entry.py
parenta14af7216a220fe8f1b2a5308ed632abe6f9f97f (diff)
downloadu-boot-a89c8f2111bc647b697b776a40227673cfc713e3.tar.xz
binman: add support for creating dummy files for external blobs
While converting to binman for an imx8mq board, it has been found that building in the u-boot CI fails. This is because an imx8mq requires an external binary (signed_hdmi_imx8m.bin). If this file cannot be found mkimage fails. To be able to build this board in the u-boot CI a binman option (--fake-ext-blobs) is introduced that can be switched on via the u-boot makefile option BINMAN_FAKE_EXT_BLOBS. With that the needed dummy files are created. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 70222718ea..401476fe76 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -70,6 +70,8 @@ class Entry(object):
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)
+ allow_fake: Allow creating a dummy fake file if the blob file is not
+ available. This is mainly used for testing.
external: True if this entry contains an external binary blob
"""
def __init__(self, section, etype, node, name_prefix=''):
@@ -98,8 +100,10 @@ class Entry(object):
self._expand_size = False
self.compress = 'none'
self.missing = False
+ self.faked = False
self.external = False
self.allow_missing = False
+ self.allow_fake = False
@staticmethod
def Lookup(node_path, etype, expanded):
@@ -898,6 +902,14 @@ features to produce new behaviours.
# This is meaningless for anything other than sections
pass
+ def SetAllowFakeBlob(self, allow_fake):
+ """Set whether a section allows to create a fake blob
+
+ Args:
+ allow_fake: True if allowed, False if not allowed
+ """
+ pass
+
def CheckMissing(self, missing_list):
"""Check if any entries in this section have missing external blobs
@@ -909,6 +921,17 @@ features to produce new behaviours.
if self.missing:
missing_list.append(self)
+ def CheckFakedBlobs(self, faked_blobs_list):
+ """Check if any entries in this section have faked external blobs
+
+ If there are faked blobs, the entries are added to the list
+
+ Args:
+ fake_blobs_list: List of Entry objects to be added to
+ """
+ # This is meaningless for anything other than blobs
+ pass
+
def GetAllowMissing(self):
"""Get whether a section allows missing external blobs