[PATCH] binman: add CST backend selection for i.MX8M signing
Simon Glass
sjg at chromium.org
Fri Feb 13 21:20:03 CET 2026
Hi Marek,
On Fri, 13 Feb 2026 at 12:27, Marek Vasut <marex at nabladev.com> wrote:
>
> On 2/13/26 6:53 PM, Simon Glass wrote:
>
> Hello Simon,
>
> >> @@ -161,8 +165,14 @@ class Entry_nxp_imx8mcst(Entry_mkimage):
> >> with open(cfg_fname, 'w') as cfgf:
> >> config.write(cfgf)
> >>
> >> + # SSL is the default backend, PKCS11 backend is optional
> >> + if self.backend == "pkcs11":
> >> + cst_backend = "pkcs11"
> >> + else:
> >> + cst_backend = "ssl"
> >> +
> >> output_fname = tools.get_output_filename(f'nxp.csf-output-blob.{uniq}')
> >> - args = ['-i', cfg_fname, '-o', output_fname]
> >> + args = ['-i', cfg_fname, '-o', output_fname, '-b', cst_backend]
> >> if self.cst.run_cmd(*args) is not None:
> >> outdata = tools.read_file(output_fname)
> >> # fixme: 0x2000 should be CONFIG_CSF_SIZE
> >> --
> >> 2.51.0
> >>
> >
> > This should be documented somewhere, likely in the comment for this
> > entry type, so it ends up visible in the docs.
>
> I will send a V2 with documentation.
>
> > Also, this code path will need a test, please.
> How do you propose to test this ?
Extend or copy one of the existing imx8 tests, perhaps with a new .dts
- and I suppose set the env var and see that it works too?
Note that imx8 has basic test coverage but there is quite a bit missing:
tools/binman/btool/cst.py 18 4 78%
tools/binman/etype/nxp_imx8mcst.py 89 69 22%
tools/binman/etype/nxp_imx8mimage.py 38 6 84%
I shed a small tear whenever I see that :-)
Regards,
Simon
More information about the U-Boot
mailing list