diff options
author | Simon Glass <sjg@chromium.org> | 2019-07-20 12:23:28 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-07-29 09:38:05 -0600 |
commit | a8adb6dfebad9a08c2df9d9ee8f79b9518e57496 (patch) | |
tree | f066493ebd23d3b83574393e29726b8ac8ad5292 /tools/binman/state.py | |
parent | a8573c4c8fb07fbd7cc8db9828aae90fcfd5145d (diff) |
binman: Convert GetFdtSet() to use a dict
At present this function returns a set of device-tree filenames. It has no
way of returning the actual device-tree object. Change it to a dictionary
so that we can add this feature in a future patch.
Also drop fdt_set since it is no-longer used.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/state.py')
-rw-r--r-- | tools/binman/state.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/binman/state.py b/tools/binman/state.py index 382bda32219..5b9e005df96 100644 --- a/tools/binman/state.py +++ b/tools/binman/state.py @@ -22,11 +22,8 @@ entry_args = {} # ftest.py) use_fake_dtb = False -# Set of all device tree files references by images -fdt_set = set() - -# Same as above, but excluding the main one -fdt_subset = set() +# Dict of device trees, keyed by filename, but excluding the main one +fdt_subset = {} # The DTB which contains the full image information main_dtb = None @@ -140,11 +137,12 @@ def Prepare(images, dtb): main_dtb = dtb fdt_files.clear() fdt_files['u-boot.dtb'] = dtb - fdt_subset = set() + fdt_subset = {} if not use_fake_dtb: for image in images.values(): - fdt_subset.update(image.GetFdtSet()) - fdt_subset.discard('u-boot.dtb') + fdt_subset.update(image.GetFdts()) + if 'u-boot.dtb' in fdt_subset: + del fdt_subset['u-boot.dtb'] for other_fname in fdt_subset: infile = tools.GetInputFilename(other_fname) other_fname_dtb = fdt_util.EnsureCompiled(infile) |