[PATCH 15/15] binman: Make a start on an iMX8 test
Simon Glass
sjg at chromium.org
Mon Aug 26 21:11:43 CEST 2024
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 at chromium.org>
---
tools/binman/etype/nxp_imx8mimage.py | 3 ++-
tools/binman/ftest.py | 4 ++++
tools/binman/test/339_nxp_imx8.dts | 17 +++++++++++++++++
3 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 tools/binman/test/339_nxp_imx8.dts
diff --git a/tools/binman/etype/nxp_imx8mimage.py b/tools/binman/etype/nxp_imx8mimage.py
index 3585120b79b..8ad177b3b65 100644
--- a/tools/binman/etype/nxp_imx8mimage.py
+++ b/tools/binman/etype/nxp_imx8mimage.py
@@ -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()
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 6317e72e649..225b5639b58 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -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
index 00000000000..cb512ae9aa2
--- /dev/null
+++ b/tools/binman/test/339_nxp_imx8.dts
@@ -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>;
+ };
+ };
+};
--
2.34.1
More information about the U-Boot
mailing list