[RFC Patch v2] binman: add support for creating dummy files for external blobs

Simon Glass sjg at chromium.org
Sun Jan 2 18:14:52 CET 2022


Hi Heiko,

On Thu, 2 Dec 2021 at 19:53, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Heiko,
>
> On Mon, 29 Nov 2021 at 02:48, Heiko Thiery <heiko.thiery at gmail.com> wrote:
> >
> > While converting to binman for an imx8mq board, it has been found that
> > building in the u-boot CI fails. This is because an imx8mq requires an
> > external binary (signed_hdmi_imx8m.bin). If this file cannot be found
> > mkimage fails.
> > To be able to build this board in the u-boot CI a binman option
> > (--fake-ext-blobs) is introduced that can be switched on via the u-boot
> > makefile option BINMAN_FAKE_EXT_BLOBS. With that the needed dummy files are
> > created.
> >
> > Signed-off-by: Heiko Thiery <heiko.thiery at gmail.com>
> > ---
> > v2:
> >  - pass allow_fake_blobs to ProcessImage()
> >  - set AllowAllowFakeBlob() to images/entries
> >  - create fake blob in Entry_blot.ObtainContents() when file is missing and
> >    creation is allowed
> >
> >  still missing:
> >   - unittest
> >   - option to set BINMAN_FAKE_EXT_BLOBS in Makefile via environment
> >         variable. With that we could simply set this env variable in the CI
> >         (gitlab-ci.yml) with adding support to buildman.
> >
> >  Makefile                       |  1 +
> >  tools/binman/cmdline.py        |  2 ++
> >  tools/binman/control.py        |  9 +++++++--
> >  tools/binman/entry.py          | 11 +++++++++++
> >  tools/binman/etype/blob.py     |  7 +++++++
> >  tools/binman/etype/blob_ext.py |  8 ++++++++
> >  tools/binman/etype/mkimage.py  |  9 +++++++++
> >  tools/binman/etype/section.py  |  9 +++++++++
> >  8 files changed, 54 insertions(+), 2 deletions(-)
>
> This looks good to me! The only thing is that instead of the warning
> you should just print a single line at the end saying which blobs were
> faked. See missing_list in ProcessImage() for how that could work. You
> can set self.fake_blob in your blob.ObtainContents() and then have a
> similar thing to CheckMissing() to actually collect the list of
> entries which were faked.
>
> Also, for the real version can you please add a test (so 'binman test
> -T' stays at 100% test coverage) and some docs in binman.rst ? You can
> use testMissingBlob() as a template.

Any word on this? I'd like to get this feature in and take a look at
missing vendor tools, too.

Also I think your feature should be on by default.

Regards,
Simon


More information about the U-Boot mailing list