aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-08-26 13:11:34 -0600
committerSimon Glass <sjg@chromium.org>2024-09-26 12:40:30 +0200
commit52983ff54b3eca3485dcd54060bdb65423dac7ac (patch)
treedaade80ae68bc3c5607b40e8db7044c85409cb2a /tools
parent8498d550c59090f73ca4cc60c17a87dd2350f47e (diff)
downloadu-boot-52983ff54b3eca3485dcd54060bdb65423dac7ac.tar.gz
binman: Update fdt-list-dir to use the provided directory
Since the files are known to be in the provided directory, use that instead of requiring it to be added to the list of input directories. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/etype/fit.py10
-rw-r--r--tools/binman/ftest.py7
2 files changed, 14 insertions, 3 deletions
diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py
index f25226d3a73..51c82c55e4a 100644
--- a/tools/binman/etype/fit.py
+++ b/tools/binman/etype/fit.py
@@ -96,7 +96,10 @@ class Entry_fit(Entry_section):
can be provided as a directory. Each .dtb file in the directory is
processed, , e.g.::
- fit,fdt-list-dir = "arch/arm/dts
+ fit,fdt-list-dir = "arch/arm/dts";
+
+ In this case the input directories are ignored and all devicetree
+ files must be in that directory.
Substitutions
~~~~~~~~~~~~~
@@ -671,7 +674,10 @@ class Entry_fit(Entry_section):
# Generate nodes for each FDT
for seq, fdt_fname in enumerate(self._fdts):
node_name = node.name[1:].replace('SEQ', str(seq + 1))
- fname = tools.get_input_filename(fdt_fname + '.dtb')
+ if self._fdt_dir:
+ fname = os.path.join(self._fdt_dir, fdt_fname + '.dtb')
+ else:
+ fname = tools.get_input_filename(fdt_fname + '.dtb')
fdt_phase = None
with fsw.add_node(node_name):
for pname, prop in node.props.items():
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 6f515960c85..3f05559501d 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -7626,7 +7626,12 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
def testFitFdtListDir(self):
"""Test an image with an FIT with FDT images using fit,fdt-list-dir"""
- self.CheckFitFdt('333_fit_fdt_dir.dts', False)
+ old_dir = os.getcwd()
+ try:
+ os.chdir(self._indir)
+ self.CheckFitFdt('333_fit_fdt_dir.dts', False)
+ finally:
+ os.chdir(old_dir)
def testFitFdtCompat(self):
"""Test an image with an FIT with compatible in the config nodes"""