summaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-12-19 09:10:48 -0600
committerTom Rini <trini@konsulko.com>2024-12-19 09:14:34 -0600
commit078542c346347406cfacdec8adeac66ae6758880 (patch)
tree9f9595f90f31df739d496f2f460b7142d7f9d939 /tools/binman/control.py
parent337bfdce5aa52637b482b182db959b9bb058f4b7 (diff)
parente7d7d3307c6109f2bec5dd5ba779996dd891348d (diff)
Merge branch '2024-12-19-assorted-tooling-updates' into next
This brings in assortment of updates to our python tooling, from Paul HENRYS <paul.henrys_ext@softathome.com>
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index 542c2b45644..e73c598298c 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -526,7 +526,7 @@ def _RemoveTemplates(parent):
if node.name.startswith('template'):
node.Delete()
-def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt, use_expanded):
+def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt, use_expanded, indir):
"""Prepare the images to be processed and select the device tree
This function:
@@ -543,6 +543,7 @@ def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt, use_expanded):
use_expanded: True to use expanded versions of entries, if available.
So if 'u-boot' is called for, we use 'u-boot-expanded' instead. This
is needed if update_fdt is True (although tests may disable it)
+ indir: List of directories where input files can be found
Returns:
OrderedDict of images:
@@ -558,7 +559,9 @@ def PrepareImagesAndDtbs(dtb_fname, select_images, update_fdt, use_expanded):
# Get the device tree ready by compiling it and copying the compiled
# output into a file in our output directly. Then scan it for use
# in binman.
- dtb_fname = fdt_util.EnsureCompiled(dtb_fname)
+ if indir is None:
+ indir = []
+ dtb_fname = fdt_util.EnsureCompiled(dtb_fname, indir=indir)
fname = tools.get_output_filename('u-boot.dtb.out')
tools.write_file(fname, tools.read_file(dtb_fname))
dtb = fdt.FdtScan(fname)
@@ -846,7 +849,7 @@ def Binman(args):
state.SetThreads(args.threads)
images = PrepareImagesAndDtbs(dtb_fname, args.image,
- args.update_fdt, use_expanded)
+ args.update_fdt, use_expanded, args.indir)
if args.test_section_timeout:
# Set the first image to timeout, used in testThreadTimeout()