[PATCH 1/2] tools: u_boot_pylib: Allow to append input directories to indir

Simon Glass sjg at chromium.org
Fri Dec 6 20:16:01 CET 2024


On Mon, 25 Nov 2024 at 11:17, Paul HENRYS
<paul.henrys_ext at softathome.com> wrote:
>
> 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 at softathome.com>
> ---
>  tools/u_boot_pylib/tools.py | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>


>
> diff --git a/tools/u_boot_pylib/tools.py b/tools/u_boot_pylib/tools.py
> index 187725b501..0499a75526 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.
>
> --
> 2.43.0
>


More information about the U-Boot mailing list