[PATCH 09/11] binman: Allow the image name to be the data file

Quentin Schulz quentin.schulz at theobroma-systems.com
Thu Aug 11 17:04:21 CEST 2022


Hi Simon,

On 8/11/22 16:04, Simon Glass wrote:
> Some image types use the -n parameter to pass in the data file. Add
> support for this, with a new property.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
>   tools/binman/entries.rst               | 15 +++++++++++++++
>   tools/binman/etype/mkimage.py          | 26 ++++++++++++++++++++++++--
>   tools/binman/ftest.py                  | 17 +++++++++++++++++
>   tools/binman/test/235_mkimage_name.dts | 18 ++++++++++++++++++
>   4 files changed, 74 insertions(+), 2 deletions(-)
>   create mode 100644 tools/binman/test/235_mkimage_name.dts
> 
> diff --git a/tools/binman/entries.rst b/tools/binman/entries.rst
> index 8d7cbdc2e75..1d38c513ffa 100644
> --- a/tools/binman/entries.rst
> +++ b/tools/binman/entries.rst
> @@ -1101,6 +1101,8 @@ Entry: mkimage: Binary produced by mkimage
>   
>   Properties / Entry arguments:
>       - args: Arguments to pass
> +    - data-to-imagename: Indicates that the -d data should be passed in as
> +      the image name also (-n)
>   
>   The data passed to mkimage via the -d flag is collected from subnodes of the
>   mkimage node, e.g.::
> @@ -1141,6 +1143,19 @@ this example which also produces four arguments::
>           };
>       };
>   
> +If you need to pass the input data in with the -n argument as well, then use
> +the 'data-to-imagename' property::
> +
> +    mkimage {
> +        args = "-T imximage";
> +        data-to-imagename';

Spurious quote.

> +
> +        u-boot-spl {
> +        };
> +    };
> +
> +That will pass the data to mkimage both as the data file (with -d) and as
> +the image name (with -n).
>   

What exactly is passed to -n here? If I read the code correctly, that 
would be "spl/u-boot-spl.bin"?

I admittedly also have absolutely no clue what the mkimage -n option 
does, but I guess that's an issue more for mkimage than binman.

Cheers,
Quentin


More information about the U-Boot mailing list