[PATCH v2 2/2] binman: expand test coverage to nxp_imx8mcst

Simon Glass sjg at chromium.org
Mon Oct 14 23:06:55 CEST 2024


Hi Brian,

On Thu, 10 Oct 2024 at 05:25, Brian Ruley <brian.ruley at gehealthcare.com> wrote:
>
> Add coverage for IMX8M code siging. Create PKI tree and other assets
> required by `cst' using `hab4_pki_tree.sh' script and `srktool' in
> `cst_3.4.1' [1].
>
> [1] https://www.nxp.com/webapp/Download?colCode=IMX_CST_TOOL_NEW
>
> Signed-off-by: Brian Ruley <brian.ruley at gehealthcare.com>
> ---
> Changes for v2:
> - Added missing *.pem files
> - Rebased on top of "[PATCH v4 2/2] binman: add fast authentication
>   method for i.MX8M signing"
> - Included a test for fast authentication
>
>  tools/binman/ftest.py                         |  11 ++
>  tools/binman/test/340_nxp_imx8mcst.dts        |  58 +++++++++
>  .../test/341_nxp_imx8mcst_fast_auth.dts       |  18 +++
>  .../CSF1_1_sha256_4096_65537_v3_usr_crt.pem   | 121 ++++++++++++++++++
>  .../IMG1_1_sha256_4096_65537_v3_usr_crt.pem   | 121 ++++++++++++++++++
>  .../SRK1_sha256_4096_65537_v3_usr_crt.pem     | 121 ++++++++++++++++++
>  tools/binman/test/cst/crts/SRK_table.bin      | Bin 0 -> 531 bytes
>  .../test/cst/crts/SRK_table_fast_auth.bin     | Bin 0 -> 531 bytes
>  .../CSF1_1_sha256_4096_65537_v3_usr_key.pem   |  54 ++++++++
>  .../IMG1_1_sha256_4096_65537_v3_usr_key.pem   |  54 ++++++++
>  .../SRK1_sha256_4096_65537_v3_usr_key.pem     |  54 ++++++++
>  tools/binman/test/cst/keys/key_pass.txt       |   2 +
>  12 files changed, 614 insertions(+)
>  create mode 100644 tools/binman/test/340_nxp_imx8mcst.dts
>  create mode 100644 tools/binman/test/341_nxp_imx8mcst_fast_auth.dts
>  create mode 100644 tools/binman/test/cst/crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem
>  create mode 100644 tools/binman/test/cst/crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem
>  create mode 100644 tools/binman/test/cst/crts/SRK1_sha256_4096_65537_v3_usr_crt.pem
>  create mode 100644 tools/binman/test/cst/crts/SRK_table.bin
>  create mode 100644 tools/binman/test/cst/crts/SRK_table_fast_auth.bin
>  create mode 100644 tools/binman/test/cst/keys/CSF1_1_sha256_4096_65537_v3_usr_key.pem
>  create mode 100644 tools/binman/test/cst/keys/IMG1_1_sha256_4096_65537_v3_usr_key.pem
>  create mode 100644 tools/binman/test/cst/keys/SRK1_sha256_4096_65537_v3_usr_key.pem
>  create mode 100644 tools/binman/test/cst/keys/key_pass.txt
>

Thanks for doing this! When I run it I get:

inman test testNxpImx8mCstFastAuth
======================== Running binman tests ========================
E
======================================================================
ERROR: binman.ftest.TestFunctional.testNxpImx8mCstFastAuth
(subunit.RemotedTestCase)
binman.ftest.TestFunctional.testNxpImx8mCstFastAuth
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
ValueError: Error -11 running 'cst -i
/tmp/binman.lk6cfgwh/nxp.csf-config-txt.nxp-imx8mcst -o
/tmp/binman.lk6cfgwh/nxp.csf-output-blob.nxp-imx8mcst':


----------------------------------------------------------------------
Ran 1 test in 0.198s

FAILED (errors=1)

Another test fails too. Do you know why I see this and you don't?

Regards,
SImon


More information about the U-Boot mailing list