binman: allow user-defined filenames for mkimage entry

mkimage entry currently creates a file whose name is derived from the
section name containing said entry.

Let's allow the user to define a filename for the mkimage-generated
binary by using the 'filename' DT property.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Quentin Schulz
2022-09-02 15:10:49 +02:00
committed by Kever Yang
parent 4d91df0548
commit 6cc29dc854
3 changed files with 33 additions and 3 deletions

View File

@@ -5921,6 +5921,13 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
self.assertIn('Could not complete processing of contents',
str(exc.exception))
def testMkimageFilename(self):
"""Test using mkimage to build a binary with a filename"""
retcode = self._DoTestFile('254_mkimage_filename.dts')
self.assertEqual(0, retcode)
fname = tools.get_output_filename('mkimage-test.bin')
self.assertTrue(os.path.exists(fname))
if __name__ == "__main__":
unittest.main()