Message ID | 20220811140412.1671844-9-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
Series | binman: Enhancements to binman mkimage | expand |
Hi Simon, On 8/11/22 16:04, Simon Glass wrote: > Expand this a little to make things clearer. Also drop the invalid > entry arg. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > tools/binman/entries.rst | 28 +++++++++++++++++++++------- > tools/binman/etype/mkimage.py | 28 +++++++++++++++++++++------- > 2 files changed, 42 insertions(+), 14 deletions(-) > > diff --git a/tools/binman/entries.rst b/tools/binman/entries.rst > index a77e61800dd..8d7cbdc2e75 100644 > --- a/tools/binman/entries.rst > +++ b/tools/binman/entries.rst > @@ -1100,11 +1100,10 @@ Entry: mkimage: Binary produced by mkimage > ------------------------------------------ > > Properties / Entry arguments: > - - datafile: Filename for -d argument > - - args: Other arguments to pass > + - args: Arguments to pass > > -The data passed to mkimage is collected from subnodes of the mkimage node, > -e.g.:: > +The data passed to mkimage via the -d flag is collected from subnodes of the > +mkimage node, e.g.:: > > mkimage { > args = "-n test -T imximage"; > @@ -1113,9 +1112,24 @@ e.g.:: > }; > }; > > -This calls mkimage to create an imximage with u-boot-spl.bin as the input > -file. The output from mkimage then becomes part of the image produced by > -binman. > +This calls mkimage to create an imximage with `u-boot-spl.bin` as the data > +file, which mkimage being called like this:: "as if mkimage was being called like this::" ? > + > + mkimage -d <data_file> -n test -T imximage <output_file> > + > +The output from mkimage then becomes part of the image produced by > +binman. If you need to put mulitple things in the data file, you can use s/mulitple/multiple/ > +a section, or just multiple subnodes like this:: > + I think it is important to mention that those subnodes are concatenated by binman prior to being passed to mkimage, e.g. here we'll have one big temporary data file which is the concatenation of u-boot-spl and u-boot-tpl and passed to mkimage with -d tmp-data-file. It's not going to pass it like -d u-boot-spl:u-boot-tpl (hoping to have my series merged one day to support that though :) ). Cheers, Quentin
diff --git a/tools/binman/entries.rst b/tools/binman/entries.rst index a77e61800dd..8d7cbdc2e75 100644 --- a/tools/binman/entries.rst +++ b/tools/binman/entries.rst @@ -1100,11 +1100,10 @@ Entry: mkimage: Binary produced by mkimage ------------------------------------------ Properties / Entry arguments: - - datafile: Filename for -d argument - - args: Other arguments to pass + - args: Arguments to pass -The data passed to mkimage is collected from subnodes of the mkimage node, -e.g.:: +The data passed to mkimage via the -d flag is collected from subnodes of the +mkimage node, e.g.:: mkimage { args = "-n test -T imximage"; @@ -1113,9 +1112,24 @@ e.g.:: }; }; -This calls mkimage to create an imximage with u-boot-spl.bin as the input -file. The output from mkimage then becomes part of the image produced by -binman. +This calls mkimage to create an imximage with `u-boot-spl.bin` as the data +file, which mkimage being called like this:: + + mkimage -d <data_file> -n test -T imximage <output_file> + +The output from mkimage then becomes part of the image produced by +binman. If you need to put mulitple things in the data file, you can use +a section, or just multiple subnodes like this:: + + mkimage { + args = "-n test -T imximage"; + + u-boot-spl { + }; + + u-boot-tpl { + }; + }; To use CONFIG options in the arguments, use a string list instead, as in this example which also produces four arguments:: diff --git a/tools/binman/etype/mkimage.py b/tools/binman/etype/mkimage.py index f3b3df6fe04..28f7eb31343 100644 --- a/tools/binman/etype/mkimage.py +++ b/tools/binman/etype/mkimage.py @@ -15,11 +15,10 @@ class Entry_mkimage(Entry): """Binary produced by mkimage Properties / Entry arguments: - - datafile: Filename for -d argument - - args: Other arguments to pass + - args: Arguments to pass - The data passed to mkimage is collected from subnodes of the mkimage node, - e.g.:: + The data passed to mkimage via the -d flag is collected from subnodes of the + mkimage node, e.g.:: mkimage { args = "-n test -T imximage"; @@ -28,9 +27,24 @@ class Entry_mkimage(Entry): }; }; - This calls mkimage to create an imximage with u-boot-spl.bin as the input - file. The output from mkimage then becomes part of the image produced by - binman. + This calls mkimage to create an imximage with `u-boot-spl.bin` as the data + file, which mkimage being called like this:: + + mkimage -d <data_file> -n test -T imximage <output_file> + + The output from mkimage then becomes part of the image produced by + binman. If you need to put mulitple things in the data file, you can use + a section, or just multiple subnodes like this:: + + mkimage { + args = "-n test -T imximage"; + + u-boot-spl { + }; + + u-boot-tpl { + }; + }; To use CONFIG options in the arguments, use a string list instead, as in this example which also produces four arguments::
Expand this a little to make things clearer. Also drop the invalid entry arg. Signed-off-by: Simon Glass <sjg@chromium.org> --- tools/binman/entries.rst | 28 +++++++++++++++++++++------- tools/binman/etype/mkimage.py | 28 +++++++++++++++++++++------- 2 files changed, 42 insertions(+), 14 deletions(-)