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:
@@ -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
|
* Verifies the header format based on the expected header for image
|
||||||
* and verify the input image file header for match
|
* type in tparams
|
||||||
* Print the image information for matched image type
|
|
||||||
* 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, ¶ms);
|
tparams, ¶ms);
|
||||||
|
} 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, ¶ms);
|
||||||
|
}
|
||||||
|
|
||||||
(void) munmap((void *)ptr, sbuf.st_size);
|
(void) munmap((void *)ptr, sbuf.st_size);
|
||||||
(void) close (ifd);
|
(void) close (ifd);
|
||||||
|
Reference in New Issue
Block a user