1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

fdt: Fix mkimage list to try every header type

Signed-off-by: Jordan Hand <jorhand@microsoft.com>
Tested-by: Vagrant Cascadian <vagrant@debian.org>
Tested-by: Alex Kiernan <alex.kiernan@gmail.com>
This commit is contained in:
Jordan Hand
2019-04-09 10:36:09 -07:00
committed by Simon Glass
parent 6539700d93
commit 73c02e5e4f

View File

@@ -403,14 +403,21 @@ int main(int argc, char **argv)
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
/* if (params.fflag) {
* scan through mkimage registry for all supported image types /*
* and verify the input image file header for match * Verifies the header format based on the expected header for image
* Print the image information for matched image type * type in tparams
* Returns the error code if not matched */
*/ retval = imagetool_verify_print_header_by_type(ptr, &sbuf,
retval = imagetool_verify_print_header_by_type(ptr, &sbuf, tparams, &params);
tparams, &params); } else {
/**
* When listing the image, we are not given the image type. Simply check all
* image types to find one that matches our header
*/
retval = imagetool_verify_print_header(ptr, &sbuf,
tparams, &params);
}
(void) munmap((void *)ptr, sbuf.st_size); (void) munmap((void *)ptr, sbuf.st_size);
(void) close (ifd); (void) close (ifd);