All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] WIP: binman: expand test coverage to nxpimx8mcst
@ 2024-10-07 13:01 Brian Ruley
  2024-10-09  1:55 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Brian Ruley @ 2024-10-07 13:01 UTC (permalink / raw)
  To: Tom Rini, Simon Glass, Alper Nebi Yasak; +Cc: ian.ray, Brian Ruley, u-boot

Add coverage for IMX8M code siging. Create PKI tree and other assets
required by `cst' using `hab4_pki_tree.sh' script 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@gehealthcare.com>
---
 tools/binman/ftest.py                   |  4 ++
 tools/binman/test/336_nxp_imx8mcst.dts  | 58 +++++++++++++++++++++++++
 tools/binman/test/cst/keys/key_pass.txt |  2 +
 3 files changed, 64 insertions(+)
 create mode 100644 tools/binman/test/336_nxp_imx8mcst.dts
 create mode 100644 tools/binman/test/cst/keys/key_pass.txt

diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 93f3d22cf5..f1c052a7f8 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -7690,6 +7690,10 @@ fdt         fdtmap                Extract the devicetree blob from the fdtmap
             # Make sure the other node is gone
             self.assertIsNone(dtb.GetNode('/node/other-node'))
 
+    def testNxpImx8mCst(self):
+        """Test that binman can sign an iMX8M image"""
+        self._DoTestFile('336_nxp_imx8mcst.dts')
+
 
 if __name__ == "__main__":
     unittest.main()
diff --git a/tools/binman/test/336_nxp_imx8mcst.dts b/tools/binman/test/336_nxp_imx8mcst.dts
new file mode 100644
index 0000000000..6cfefdae2a
--- /dev/null
+++ b/tools/binman/test/336_nxp_imx8mcst.dts
@@ -0,0 +1,58 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	binman {
+		nxp-imx8mcst {
+			args;	/* Needed by mkimage etype superclass */
+			filename = "test-fit.signed.bin";
+			nxp,loader-address = <0x10>;
+            nxp,srk-table = "tools/binman/test/cst/crts/SRK_table.bin";
+            nxp,img-crt = "tools/binman/test/cst/crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem";
+            nxp,csf-crt = "tools/binman/test/cst/crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem";
+
+            fit {
+                description = "test desc";
+			    filename = "test-fit.itb";
+                #address-cells = <1>;
+
+                images {
+                    u-boot {
+                        description = "test u-boot";
+                        type = "standalone";
+                        arch = "arm64";
+                        os = "u-boot";
+                        compression = "none";
+                        load = <00000000>;
+                        entry = <00000000>;
+
+                        u-boot-nodtb {
+                        };
+                    };
+
+                    fdt-1 {
+                        description = "test fdt";
+                        type = "flat_dt";
+                        compression = "none";
+
+                        u-boot-dtb {
+                        };
+                    };
+                };
+
+                configurations {
+                    default = "config-1";
+                    config-1 {
+                        description = "test config";
+                        fdt = "fdt-1";
+                        firmware = "u-boot";
+                    };
+                };
+            };
+        };
+	};
+};
diff --git a/tools/binman/test/cst/keys/key_pass.txt b/tools/binman/test/cst/keys/key_pass.txt
new file mode 100644
index 0000000000..dec2cbe1fa
--- /dev/null
+++ b/tools/binman/test/cst/keys/key_pass.txt
@@ -0,0 +1,2 @@
+test
+test
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-12-03 13:45 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 13:01 [PATCH] WIP: binman: expand test coverage to nxpimx8mcst Brian Ruley
2024-10-09  1:55 ` Simon Glass
2024-10-10 11:38   ` Brian Ruley
2024-10-10 11:24 ` [PATCH v2 1/2] binman: nxp_imx8mcst: read certificates from input path Brian Ruley
2024-10-10 11:24   ` [PATCH v2 2/2] binman: expand test coverage to nxp_imx8mcst Brian Ruley
2024-10-14 21:06     ` Simon Glass
2024-10-21  7:37       ` Brian Ruley
2024-10-21  7:37 ` [PATCH v3 1/2] binman: nxp_imx8mcst: read certificates from input path Brian Ruley
2024-10-21  7:37   ` [PATCH v3 2/2] binman: expand test coverage to nxp_imx8mcst Brian Ruley
2024-10-29 15:45     ` Simon Glass
2024-10-29 16:05       ` Fabio Estevam
2024-10-30  8:07   ` [PATCH v4 1/2] binman: nxp_imx8mcst: read certificates from input path Brian Ruley
2024-10-30  8:07     ` [PATCH v4 2/2] binman: expand test coverage to nxp_imx8mcst Brian Ruley
2024-10-30 12:23       ` Fabio Estevam
2024-11-04  8:33         ` Brian Ruley
2024-11-20 12:40           ` Simon Glass
2024-12-03 11:44             ` Brian Ruley
2024-12-03 13:45               ` Simon Glass
2024-10-30 12:40     ` [PATCH v4 1/2] binman: nxp_imx8mcst: read certificates from input path Rasmus Villemoes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.