This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
RedBoot - Fix 'fis load'
- From: Gary Thomas <gary at mlbassoc dot com>
- To: eCos patches <ecos-patches at ecos dot sourceware dot org>
- Date: Wed, 05 May 2004 04:45:55 -0600
- Subject: RedBoot - Fix 'fis load'
- Organization: MLB Associates
CRC checking was broken - the CDL option changed names, but the code did
not.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: redboot/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/ChangeLog,v
retrieving revision 1.194
diff -u -5 -p -r1.194 ChangeLog
--- redboot/current/ChangeLog 29 Apr 2004 07:13:26 -0000 1.194
+++ redboot/current/ChangeLog 5 May 2004 10:43:56 -0000
@@ -1,5 +1,10 @@
+2004-05-05 Gary Thomas <gary@mlbassoc.com>
+
+ * src/flash.c (fis_load): CRC check on load was broken (the CDL
+ option changed names)
+
2004-04-29 Jonathan Larmour <jifl@eCosCentric.com>
* doc/redboot_epilogue.sgml: Comment out </part> to reflect change
of 2004-04-19.
Index: redboot/current/src/flash.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/flash.c,v
retrieving revision 1.65
diff -u -5 -p -r1.65 flash.c
--- redboot/current/src/flash.c 23 Apr 2004 20:38:18 -0000 1.65
+++ redboot/current/src/flash.c 5 May 2004 10:42:44 -0000
@@ -981,15 +981,15 @@ fis_load(int argc, char *argv[])
struct fis_image_desc *img;
CYG_ADDRESS mem_addr;
bool mem_addr_set = false;
bool show_cksum = false;
struct option_info opts[3];
-#ifdef CYGPKG_REDBOOT_FIS_CRC_CHECK
+#if defined(CYGSEM_REDBOOT_FIS_CRC_CHECK)
unsigned long cksum;
#endif
int num_options;
-#ifdef CYGPRI_REDBOOT_ZLIB_FLASH
+#if defined(CYGPRI_REDBOOT_ZLIB_FLASH) || defined(CYGSEM_REDBOOT_FIS_CRC_CHECK)
bool decompress = false;
#endif
void *err_addr;
init_opts(&opts[0], 'b', true, OPTION_ARG_TYPE_NUM,
@@ -1064,11 +1064,11 @@ fis_load(int argc, char *argv[])
load_address = mem_addr;
load_address_end = mem_addr + img->data_length;
}
entry_address = (unsigned long)img->entry_point;
-#ifdef CYGPKG_REDBOOT_FIS_CRC_CHECK
+#ifdef CYGSEM_REDBOOT_FIS_CRC_CHECK
cksum = cyg_crc32((unsigned char *)mem_addr, img->data_length);
if (show_cksum) {
diag_printf("Checksum: 0x%08lx\n", cksum);
}
// When decompressing, leave CRC checking to decompressor