* 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
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index e30d212..c4a8685 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -1056,7 +1056,7 @@
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 @@
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: ;