diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-28 20:34:50 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-01-05 12:26:35 -0700 |
commit | 192c111cfce0684fa1cbbd4a4bd3df03720ef7a6 (patch) | |
tree | 05ad27a45dc1fce7b6821a9b763bd91c09cd2e35 /tools/dtoc/main.py | |
parent | de846cbb307486a1533dcf4d5c28568412149ddb (diff) |
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/main.py')
-rwxr-xr-x | tools/dtoc/main.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/dtoc/main.py b/tools/dtoc/main.py index 7686c8784d8..244c184cedd 100755 --- a/tools/dtoc/main.py +++ b/tools/dtoc/main.py @@ -87,6 +87,10 @@ if __name__ != '__main__': parser = OptionParser() parser.add_option('-B', '--build-dir', type='string', default='b', help='Directory containing the build output') +parser.add_option('-c', '--c-output-dir', action='store', + help='Select output directory for C files') +parser.add_option('-C', '--h-output-dir', action='store', + help='Select output directory for H files (defaults to --c-output-di)') parser.add_option('-d', '--dtb-file', action='store', help='Specify the .dtb input file') parser.add_option('--include-disabled', action='store_true', @@ -111,4 +115,5 @@ elif options.test_coverage: else: dtb_platdata.run_steps(args, options.dtb_file, options.include_disabled, - options.output) + options.output, + [options.c_output_dir, options.h_output_dir]) |