]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: Make a start on an iMX8 test
authorSimon Glass <sjg@chromium.org>
Mon, 26 Aug 2024 19:11:43 +0000 (13:11 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 26 Sep 2024 10:40:31 +0000 (12:40 +0200)
This patch is for Marek, to provide a starting point.

To try it, use 'binman test -T' and see the missing coverage.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/etype/nxp_imx8mimage.py
tools/binman/ftest.py
tools/binman/test/339_nxp_imx8.dts [new file with mode: 0644]

index 3585120b79b7799b8c03e8668b8d156f21321ef1..8ad177b3b65e8c45e7f2fd74768b319930704e10 100644 (file)
@@ -27,7 +27,8 @@ class Entry_nxp_imx8mimage(Entry_mkimage):
 
     def __init__(self, section, etype, node):
         super().__init__(section, etype, node)
-        self.required_props = ['nxp,boot-from', 'nxp,rom-version', 'nxp,loader-address']
+        self.required_props = ['nxp,boot-from', 'nxp,rom-version',
+                               'nxp,loader-address']
 
     def ReadNode(self):
         super().ReadNode()
index 58f9d8256e8b4e562e30bc70b4f83d2554c3c240..e3f231e4bccbc3caaec8d67294654cbdc191419a 100644 (file)
@@ -7800,6 +7800,10 @@ fdt         fdtmap                Extract the devicetree blob from the fdtmap
         self.assertIn('Symbol-writing: no value for /binman/section/u-boot',
                       out)
 
+    def testNxpImx8Image(self):
+        """Test that binman can produce an iMX8 image"""
+        self._DoTestFile('339_nxp_imx8.dts')
+
 
 if __name__ == "__main__":
     unittest.main()
diff --git a/tools/binman/test/339_nxp_imx8.dts b/tools/binman/test/339_nxp_imx8.dts
new file mode 100644 (file)
index 0000000..cb512ae
--- /dev/null
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       binman {
+               nxp-imx8mimage {
+                       args;   /* TODO: Needed by mkimage etype superclass */
+                       nxp,boot-from = "sd";
+                       nxp,rom-version = <1>;
+                       nxp,loader-address = <0x10>;
+               };
+       };
+};