binman: imx9image: respect BINMAN_INDIRS for external files
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Michael,
Quoted 9 lines · Michael Walle
binman: imx9image: respect
BINMAN_INDIRSfor external filesWe have the
BINMAN_INDIRSfor 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 inBINMAN_INDIRS.
This doesn't match the code: for external files the helper is now used unconditionally, not only when the file is missing from the output directory. That is fine (the Makefile passes '-I .' so the output directory is searched anyway) but please can you update the message to say what the code actually does.
Quoted 3 lines
In the append case, always use that helper as it seems to be only handle external files.
Please can you make this definite rather than 'seems to' - the only users in arch/arm/dts/imx9*-u-boot.dtsi pass AHAB container images, which are always external. Also 'to be only handle' -> 'to only handle'.
tools/binman/etype/nxp_imx9image.py class Entry_nxp_imx9image(Entry_mkimage): · line 53
Quoted 11 lines
Signed-off-by Michael Walle <[email protected]>
tools/binman/etype/nxp_imx9image.py| 22 ++++++++++++----------1 file changed, 12 insertions(+), 10 deletions(-)tools/binman/etype/nxp_imx9image.py +2
-0@@ -51,21 +51,23 @@ class Entry_nxp_imx9image(Entry_mkimage): + file_path = tools.get_input_filename(value, allow_missing=True) + if file_path: f.write(f'append {file_path}\n')
This changes the behaviour of testNxpImx9Image without the test noticing. It writes 'mx95b0-ahab-container.img' into the output directory (passed with -O) but the input directory is only tools/binman/test, so the file is no longer found and the 'append' line is silently dropped:
file 'mx95b0-ahab-container.img' does not exist. flash.bin may be
not-functional.
The test still passes because it never checks the generated .cfgout or the output. Please can you put the container in the input directory (e.g. with self._MakeInputFile()) and ideally check that the 'append' line appears in the config file, so this path is actually covered.
BTW get_input_filename() returns the bare filename when there are no input directories at all, even if it is missing, so the 'does not exist' message is skipped in that case. Probably not a problem in practice since the Makefile always passes -I, but worth knowing.
Regards,
Simon