From 192c111cfce0684fa1cbbd4a4bd3df03720ef7a6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 28 Dec 2020 20:34:50 -0700 Subject: 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 --- tools/dtoc/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/dtoc/main.py') diff --git a/tools/dtoc/main.py b/tools/dtoc/main.py index 7686c87..244c184 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]) -- cgit v1.1