summaryrefslogtreecommitdiff
path: root/tools/binman/image.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-01-31 09:26:54 -0500
committerTom Rini <trini@konsulko.com>2022-01-31 09:26:54 -0500
commit1047af5c65b00b822fd72d1750f3141615f7002d (patch)
treef659c1c5849407fca2d9596ede8bb4e356d77af3 /tools/binman/image.py
parentceefc660bae42e3fbd72390f039bec1463e01287 (diff)
parentfcc87efdf3772e6e8d060dc10d521442d7772ce9 (diff)
Merge tag 'dm-pull-30jan22' of https://source.denx.de/u-boot/custodians/u-boot-dm
moveconfig fix binman support for listing files with generated entries
Diffstat (limited to 'tools/binman/image.py')
-rw-r--r--tools/binman/image.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/binman/image.py b/tools/binman/image.py
index 0f0c1d29e80..cb5279c7ead 100644
--- a/tools/binman/image.py
+++ b/tools/binman/image.py
@@ -67,9 +67,13 @@ class Image(section.Entry_section):
does not exist in binman. This is useful if an image was created by
binman a newer version of binman but we want to list it in an older
version which does not support all the entry types.
+ generate: If true, generator nodes are processed. If false they are
+ ignored which is useful when an existing image is read back from a
+ file.
"""
def __init__(self, name, node, copy_to_orig=True, test=False,
- ignore_missing=False, use_expanded=False, missing_etype=False):
+ ignore_missing=False, use_expanded=False, missing_etype=False,
+ generate=True):
super().__init__(None, 'section', node, test=test)
self.copy_to_orig = copy_to_orig
self.name = 'main-section'
@@ -83,6 +87,7 @@ class Image(section.Entry_section):
self.use_expanded = use_expanded
self.test_section_timeout = False
self.bintools = {}
+ self.generate = generate
if not test:
self.ReadNode()
@@ -131,7 +136,7 @@ class Image(section.Entry_section):
# Return an Image with the associated nodes
root = dtb.GetRoot()
image = Image('image', root, copy_to_orig=False, ignore_missing=True,
- missing_etype=True)
+ missing_etype=True, generate=False)
image.image_node = fdt_util.GetString(root, 'image-node', 'image')
image.fdtmap_dtb = dtb