We have the BINMAN_INDIRS for any external binaries, so they don't have
to be copied into the source/build directory of u-boot. This is
especially important for image builders like buildroot.

If it is an external binary and if it was not found, use the
get_input_filename() helper which will also look up the paths in
BINMAN_INDIRS.

Signed-off-by: Michael Walle <[email protected]>
---
This is somewhat redundant and get_input_filename() could probably be
used directly. But this is the least invasive change.
---
 tools/binman/etype/nxp_imx9image.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/binman/etype/nxp_imx9image.py 
b/tools/binman/etype/nxp_imx9image.py
index e0e806f2b7f..a82fe82da05 100644
--- a/tools/binman/etype/nxp_imx9image.py
+++ b/tools/binman/etype/nxp_imx9image.py
@@ -55,7 +55,9 @@ class Entry_nxp_imx9image(Entry_mkimage):
                     combined = ' '.join(map(str, value))
 
                     if file in external_files and not os.path.exists(value[1]):
-                        print(f"file '{image_path}' does not exist. flash.bin 
may be not-functional.")
+                        value[1] = tools.get_input_filename(file, 
allow_missing=True)
+                        if not value[1]:
+                            print(f"file '{image_path}' does not exist. 
flash.bin may be not-functional.")
                     else:
                         f.write(f'image {combined}\n')
                 elif isinstance(value, str):
-- 
2.47.3

Reply via email to