binman: Make a start on an iMX8 test

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>
This commit is contained in:
Simon Glass
2024-08-26 13:11:43 -06:00
parent a96dda1a70
commit ac0876c890
3 changed files with 23 additions and 1 deletions

View File

@@ -27,7 +27,8 @@ class Entry_nxp_imx8mimage(Entry_mkimage):
def __init__(self, section, etype, node): def __init__(self, section, etype, node):
super().__init__(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): def ReadNode(self):
super().ReadNode() super().ReadNode()

View 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', self.assertIn('Symbol-writing: no value for /binman/section/u-boot',
out) out)
def testNxpImx8Image(self):
"""Test that binman can produce an iMX8 image"""
self._DoTestFile('339_nxp_imx8.dts')
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()

View File

@@ -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>;
};
};
};