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>
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index e0850b7..3ced14b 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -5921,6 +5921,13 @@
         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()