This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Redundant FIS compile fix
- From: Gary Thomas <gary at mlbassoc dot com>
- To: eCos Patches <ecos-patches at ecos dot sourceware dot org>
- Date: Fri, 21 Jul 2006 08:03:32 -0600
- Subject: Redundant FIS compile fix
From David Ho.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
Index: redboot/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/ChangeLog,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -5 -p -r1.246 -r1.247
--- redboot/current/ChangeLog 20 Jul 2006 20:27:47 -0000 1.246
+++ redboot/current/ChangeLog 21 Jul 2006 13:55:44 -0000 1.247
@@ -1,5 +1,10 @@
+2006-07-21 David Ho <davidkwho@gmail.com>
+
+ * src/flash.c (fis_start_update_directory): Fix build error when
+ redundant FIS selected and locking is not enabled/supported.
+
2006-05-24 Gary Thomas <gary@mlbassoc.com>
* src/net/net_io.c (do_ip_addr): Bail out if no networking.
2006-05-23 Gary Thomas <gary@mlbassoc.com>
Index: redboot/current/src/flash.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/flash.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -5 -p -r1.81 -r1.82
--- redboot/current/src/flash.c 23 May 2006 11:56:46 -0000 1.81
+++ redboot/current/src/flash.c 21 Jul 2006 13:55:44 -0000 1.82
@@ -246,16 +246,18 @@ fis_lookup(char *name, int *num)
}
int fis_start_update_directory(int autolock)
{
#ifdef CYGOPT_REDBOOT_REDUNDANT_FIS
+#ifdef CYGHWR_IO_FLASH_BLOCK_LOCKING
#ifdef CYGSEM_REDBOOT_FLASH_LOCK_SPECIAL
// Ensure [quietly] that the directory is unlocked before trying to update and locked again afterwards
int do_autolock=1;
#else
int do_autolock=autolock;
#endif
+#endif
struct fis_image_desc* img=NULL;
void* err_addr=NULL;
void* tmp_fis_addr=NULL;
@@ -271,12 +273,14 @@ int fis_start_update_directory(int autol
img->u.valid_info.valid_flag[0]=CYG_REDBOOT_RFIS_IN_PROGRESS;
img->u.valid_info.valid_flag[1]=CYG_REDBOOT_RFIS_IN_PROGRESS;
img->u.valid_info.version_count=img->u.valid_info.version_count+1;
//ready to go....
+#ifdef CYGHWR_IO_FLASH_BLOCK_LOCKING
if (do_autolock)
flash_unlock((void *)fis_addr, fisdir_size, (void **)&err_addr);
+#endif
flash_erase(fis_addr, fisdir_size, (void **)&err_addr);
//now magic is 0xffffffff
fis_endian_fixup(fis_work_block);
flash_program(fis_addr, fis_work_block, flash_block_size, (void **)&err_addr);