diff options
author | Paul HENRYS <paul.henrys_ext@softathome.com> | 2024-11-25 19:16:53 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-12-19 09:10:34 -0600 |
commit | c7896b3e4892c9b5b5fb723c7f042b9b28e73af0 (patch) | |
tree | 192e1c885abb0abff5cfa0466874c02cd925481d | |
parent | a4345b19347915adeb2de9e94ed747c8c038029c (diff) |
tools: u_boot_pylib: Allow to append input directories to indir
append_input_dirs() can be used to append a list of input directories to indir
global list.
Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | tools/u_boot_pylib/tools.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/u_boot_pylib/tools.py b/tools/u_boot_pylib/tools.py index 187725b5015..0499a75526f 100644 --- a/tools/u_boot_pylib/tools.py +++ b/tools/u_boot_pylib/tools.py @@ -123,6 +123,22 @@ def set_input_dirs(dirname): indir = dirname tout.debug("Using input directories %s" % indir) +def append_input_dirs(dirname): + """Append a list of input directories to the current list of input + directories + + Args: + dirname: a list of paths to input directories to use for obtaining + files needed by binman to place in the image. + """ + global indir + + for dir in dirname: + if dirname not in indir: + indir.append(dirname) + + tout.debug("Updated input directories %s" % indir) + def get_input_filename(fname, allow_missing=False): """Return a filename for use as input. |