Hi Jassi,

On Tue, 18 Apr 2023 at 20:58, Jassi Brar <jaswinder.si...@linaro.org> wrote:
>
> On Tue, 18 Apr 2023 at 20:46, Simon Glass <s...@chromium.org> wrote:
> >
> > Hi,
> >
> > On Fri, 14 Apr 2023 at 07:53, Michal Simek <michal.si...@amd.com> wrote:
> > >
> > >
> > >
> > > On 4/10/23 06:25, Jassi Brar wrote:
> > > > On Wed, 29 Mar 2023 at 15:02, Simon Glass <s...@chromium.org> wrote:
> > > >>
> > > >> Hi,
> > > >>
> > > >> On Tue, 28 Mar 2023 at 10:16, <jassisinghb...@gmail.com> wrote:
> > > >>>
> > > >>> From: Masami Hiramatsu <masami.hirama...@linaro.org>
> > > >>>
> > > >>> Add 'mkfwumdata' tool to generate FWU metadata image for the meta-data
> > > >>> partition to be used in A/B Update imeplementation.
> > > >>>
> > > >>> Signed-off-by: Masami Hiramatsu <masami.hirama...@linaro.org>
> > > >>> Signed-off-by: Sughosh Ganu <sughosh.g...@linaro.org>
> > > >>> Signed-off-by: Jassi Brar <jaswinder.si...@linaro.org>
> > > >>> ---
> > > >>>   tools/Kconfig      |   9 ++
> > > >>>   tools/Makefile     |   4 +
> > > >>>   tools/mkfwumdata.c | 334 
> > > >>> +++++++++++++++++++++++++++++++++++++++++++++
> > > >>>   3 files changed, 347 insertions(+)
> > > >>>   create mode 100644 tools/mkfwumdata.c
> > > >>
> > > >> Can you please look at putting this in binman instead, since we would
> > > >> rather not have another tool with no tests.
> > > >>
> > > > Must I do that? I have no history with binman and it seems the
> > > > mkfwumdata.c would need to be rewritten in python?
> > >
> > > I think it is about calling this utility from python not about rewriting 
> > > it to
> > > python.
> >
> > Yes that's the question. If this tool is for creating firmware
> > updates, then how are they created? I would expect binman to handle
> > this when U-Boot is built. Then you can build in some tests in binman
> > perhaps?
> >
> The FWU meta-data format is specified in a standards document created
> by ARM and not tied to u-boot.
> U-Boot may not necessarily be the bootloader using the output of
> mkfwumdata. The u-boot/tools/ is more like a welcoming host.
>
> Ideally mkfwumdata should be a reference implementation, also created
> by ARM. But it is trivial enough that nobody thought there could be
> any confusion about the format, I guess.

OK

>
> > How does one know what parameters to pass? Is the documentation for
> > this tool elsewhere?
> >
> In the latest submission I also created a man-page for it.

Good

>
> >  Where are the tests?
> >
> I am open to learning what could be tested and how.

Well normally we would have a binman test which uses the tool to
create an image, then checks that it works. See ftest.py for some
examples.

>
> > It is also unfortunate that this seems to be inventing yet another
> > format (I recall that FIP was invented at one point also), when it
> > could use FIT.
> >
> Hopefully it won't be that bad of a predicament after my explanation above.

Regards,
Simon

Reply via email to