summaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-10 03:39:38 +0300
committerSimon Glass <sjg@chromium.org>2020-07-25 23:46:57 +0300
commit4f9f1056ecf2d9e54803b89fd0784240a8d89fd8 (patch)
tree11f385fc3a6d6d0938a3f690693500ec21afc020 /tools/binman/control.py
parent04e6a6b9ecdc75023edeebe73286f311c40b346b (diff)
downloadu-boot-4f9f1056ecf2d9e54803b89fd0784240a8d89fd8.tar.xz
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>
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index dc1dd2a7dc..8c6eae83f1 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -387,7 +387,7 @@ def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt):
def ProcessImage(image, update_fdt, write_map, get_contents=True,
- allow_resize=True):
+ allow_resize=True, allow_missing=False):
"""Perform all steps for this image, including checking and # writing it.
This means that errors found with a later image will be reported after
@@ -402,8 +402,10 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True,
the contents is already present
allow_resize: True to allow entries to change size (this does a re-pack
of the entries), False to raise an exception
+ allow_missing: Allow blob_ext objects to be missing
"""
if get_contents:
+ image.SetAllowMissing(allow_missing)
image.GetEntryContents()
image.GetEntryOffsets()
@@ -523,7 +525,8 @@ def Binman(args):
images = PrepareImagesAndDtbs(dtb_fname, args.image,
args.update_fdt)
for image in images.values():
- ProcessImage(image, args.update_fdt, args.map)
+ ProcessImage(image, args.update_fdt, args.map,
+ allow_missing=args.allow_missing)
# Write the updated FDTs to our output files
for dtb_item in state.GetAllFdts():