mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 01:51:33 +00:00
[new uImage] Add new uImage format support for imls and iminfo commands
imls and iminfo can now recognize nad print out contents of the new (FIT) format uImages. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
This commit is contained in:
parent
9d25438fe7
commit
e32fea6adb
1 changed files with 11 additions and 5 deletions
|
@ -556,7 +556,13 @@ static int image_info (ulong addr)
|
||||||
#if defined(CONFIG_FIT)
|
#if defined(CONFIG_FIT)
|
||||||
case IMAGE_FORMAT_FIT:
|
case IMAGE_FORMAT_FIT:
|
||||||
puts (" FIT image found\n");
|
puts (" FIT image found\n");
|
||||||
fit_unsupported ("iminfo");
|
|
||||||
|
if (!fit_check_format (hdr)) {
|
||||||
|
puts ("Bad FIT image format!\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
fit_print_contents (hdr);
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
@ -601,9 +607,6 @@ int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||||
|
|
||||||
switch (genimg_get_format (hdr)) {
|
switch (genimg_get_format (hdr)) {
|
||||||
case IMAGE_FORMAT_LEGACY:
|
case IMAGE_FORMAT_LEGACY:
|
||||||
if (!image_check_magic (hdr))
|
|
||||||
goto next_sector;
|
|
||||||
|
|
||||||
if (!image_check_hcrc (hdr))
|
if (!image_check_hcrc (hdr))
|
||||||
goto next_sector;
|
goto next_sector;
|
||||||
|
|
||||||
|
@ -619,8 +622,11 @@ int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
#if defined(CONFIG_FIT)
|
#if defined(CONFIG_FIT)
|
||||||
case IMAGE_FORMAT_FIT:
|
case IMAGE_FORMAT_FIT:
|
||||||
|
if (!fit_check_format (hdr))
|
||||||
|
goto next_sector;
|
||||||
|
|
||||||
printf ("FIT Image at %08lX:\n", (ulong)hdr);
|
printf ("FIT Image at %08lX:\n", (ulong)hdr);
|
||||||
fit_unsupported ("imls");
|
fit_print_contents (hdr);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue