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:
@@ -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()
|
||||||
|
@@ -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()
|
||||||
|
17
tools/binman/test/339_nxp_imx8.dts
Normal file
17
tools/binman/test/339_nxp_imx8.dts
Normal 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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
Reference in New Issue
Block a user