diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-29 06:34:50 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-01-05 22:26:35 +0300 |
commit | 192c111cfce0684fa1cbbd4a4bd3df03720ef7a6 (patch) | |
tree | 05ad27a45dc1fce7b6821a9b763bd91c09cd2e35 /tools/dtoc/dtb_platdata.py | |
parent | de846cbb307486a1533dcf4d5c28568412149ddb (diff) | |
download | u-boot-192c111cfce0684fa1cbbd4a4bd3df03720ef7a6.tar.xz |
dtoc: Allow providing a directory to write files to
At present dtoc writes only a single file on each invocation. U-Boot
writes the two files it needs by separate invocations of dtoc. Since dtoc
now scans all U-Boot driver source, this is fairly slow (about 1 second
per file).
It would be better if dtoc could write all the files at once.
In preparation for this, add a way to specify an output directory for the
files.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/dtb_platdata.py')
-rw-r--r-- | tools/dtoc/dtb_platdata.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py index 118b1a5f43..62a65d6214 100644 --- a/tools/dtoc/dtb_platdata.py +++ b/tools/dtoc/dtb_platdata.py @@ -757,8 +757,9 @@ class DtbPlatdata(): self.out(''.join(self.get_buf())) -def run_steps(args, dtb_file, include_disabled, output, warning_disabled=False, - drivers_additional=None): + +def run_steps(args, dtb_file, include_disabled, output, output_dirs, + warning_disabled=False, drivers_additional=None): """Run all the steps of the dtoc tool Args: @@ -766,6 +767,9 @@ def run_steps(args, dtb_file, include_disabled, output, warning_disabled=False, dtb_file (str): Filename of dtb file to process include_disabled (bool): True to include disabled nodes output (str): Name of output file (None for stdout) + output_dirs (tuple of str): + Directory to put C output files + Directory to put H output files warning_disabled (bool): True to avoid showing warnings about missing drivers drivers_additional (list): List of additional drivers to use during |