diff options
author | wdenk <wdenk> | 2003-11-17 21:14:37 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-11-17 21:14:37 +0000 |
commit | 5bb226e821ea3c10c52d768ffab7952204b0f816 (patch) | |
tree | 51eb8e2b0c55cd3a441fb5bee5b2a9fcbee92928 /common/cmd_bootm.c | |
parent | 5cf9da4821db0b6d86d8bbb74af86a0303063201 (diff) |
* Use "-fPIC" instead of "-mrelocatable" to prevent problems with
recent tools
* Add checksum verification to 'imls' command
* Add bd_info fields needed for 4xx Linux I2C driver
* Patch by Martin Krause, 4 Nov. 2003:
Fix error in cmd_vfd.c (TRAB board: "vfd /1" shows now only one Bitmap)
* Print used network interface when CONFIG_NET_MULTI is set
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r-- | common/cmd_bootm.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index e30d212b0c9..c4a8685ce33 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -1056,7 +1056,7 @@ int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) flash_info_t *info; int i, j; image_header_t *hdr; - ulong checksum; + ulong data, len, checksum; for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) { if (info->flash_id == FLASH_UNKNOWN) @@ -1079,7 +1079,15 @@ int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf ("Image at %08lX:\n", (ulong)hdr); print_image_hdr( hdr ); - putc ('\n'); + + data = (ulong)hdr + sizeof(image_header_t); + len = ntohl(hdr->ih_size); + + printf (" Verifying Checksum ... "); + if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) { + printf (" Bad Data CRC\n"); + } + printf ("OK\n"); next_sector: ; } next_bank: ; |