1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-01 19:05:51 +01:00

binman: Allow external binaries to be missing

Sometimes it is useful to build an image even though external binaries are
not present. This allows the build system to continue to function without
these files, albeit not producing valid images.

U-Boot does with with ATF (ARM Trusted Firmware) today.

Add a new flag to binman to request this behaviour.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2020-07-09 18:39:38 -06:00
parent 894f635755
commit 5f850fb9a6
8 changed files with 66 additions and 8 deletions

View File

@@ -285,7 +285,7 @@ class TestFunctional(unittest.TestCase):
def _DoTestFile(self, fname, debug=False, map=False, update_dtb=False,
entry_args=None, images=None, use_real_dtb=False,
verbosity=None):
verbosity=None, allow_missing=False):
"""Run binman with a given test file
Args:
@@ -319,6 +319,8 @@ class TestFunctional(unittest.TestCase):
if entry_args:
for arg, value in entry_args.items():
args.append('-a%s=%s' % (arg, value))
if allow_missing:
args.append('-M')
if images:
for image in images:
args += ['-i', image]
@@ -3376,6 +3378,10 @@ class TestFunctional(unittest.TestCase):
self.assertIn("Filename 'missing-file' not found in input path",
str(e.exception))
def testExtblobMissingOk(self):
"""Test an image with an missing external blob that is allowed"""
self._DoTestFile('158_blob_ext_missing.dts', allow_missing=True)
if __name__ == "__main__":
unittest.main()