diff options
author | Tom Rini <trini@konsulko.com> | 2020-07-23 22:56:06 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-23 22:56:06 +0300 |
commit | 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7 (patch) | |
tree | 5de77f2861f6856866c5bf4ffa7cab22d371ccf3 /tools/binman/control.py | |
parent | 56d37f1c564107e27d873181d838571b7d7860e7 (diff) | |
parent | 60e7fa8b3b8538aae1e644dac61d5e4076901edb (diff) | |
download | u-boot-5d3a21df6694ebd66d5c34c9d62a26edc7456fc7.tar.xz |
Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm
binman support for FIT
new UCLASS_SOC
patman switch 'test' command
minor fdt fixes
patman usability improvements
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r-- | tools/binman/control.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py index dc1dd2a7dc..343b0a0c35 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,13 @@ 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 + + Returns: + True if one or more external blobs are missing, False if all are present """ if get_contents: + image.SetAllowMissing(allow_missing) image.GetEntryContents() image.GetEntryOffsets() @@ -448,6 +453,12 @@ def ProcessImage(image, update_fdt, write_map, get_contents=True, image.BuildImage() if write_map: image.WriteMap() + missing_list = [] + image.CheckMissing(missing_list) + if missing_list: + tout.Warning("Image '%s' is missing external blobs and is non-functional: %s" % + (image.name, ' '.join([e.name for e in missing_list]))) + return bool(missing_list) def Binman(args): @@ -522,13 +533,17 @@ def Binman(args): images = PrepareImagesAndDtbs(dtb_fname, args.image, args.update_fdt) + missing = False for image in images.values(): - ProcessImage(image, args.update_fdt, args.map) + missing |= 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(): tools.WriteFile(dtb_item._fname, dtb_item.GetContents()) + if missing: + tout.Warning("Some images are invalid") finally: tools.FinaliseOutputDir() finally: |