This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
RedBoot fis free patch
- From: Peter Korsgaard <jacmet at sunsite dot dk>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Mon, 11 Apr 2005 20:48:06 +0200
- Subject: RedBoot fis free patch
Hi,
The following patch fixes a issue in flash.c:find_free with splitting
chunks in two when not final chunk.
The bug leads to invalid fis free output / makes it impossible to do a
fis create - this fixes it.
Index: packages/redboot/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/ChangeLog,v
retrieving revision 1.221
diff -u -r1.221 ChangeLog
--- packages/redboot/current/ChangeLog 9 Mar 2005 19:08:38 -0000 1.221
+++ packages/redboot/current/ChangeLog 11 Apr 2005 10:10:34 -0000
@@ -1,3 +1,8 @@
+2005-04-11 Peter Korsgaard <jacmet@sunsite.dk>
+
+ * src/flash.c (find_free): Correctly split chunks in two when
+ not final chunk.
+
2005-03-07 Alexander Neundorf <alexander.neundorf@jenoptik.com>
* src/net/arp.c: use correct sizeof(rt->enet_addr) in
Index: packages/redboot/current/src/flash.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/src/flash.c,v
retrieving revision 1.70
diff -u -r1.70 flash.c
--- packages/redboot/current/src/flash.c 9 Nov 2004 18:59:14 -0000 1.70
+++ packages/redboot/current/src/flash.c 11 Apr 2005 10:10:36 -0000
@@ -591,8 +591,8 @@
} else {
// Split chunk into two parts
if ((img->flash_base+img->size) < (CYG_ADDRESS)fis_end) {
- chunks[idx+1].start = img->flash_base + img->size;
- chunks[idx+1].end = chunks[idx].end;
+ chunks[num_chunks].start = img->flash_base + img->size;
+ chunks[num_chunks].end = chunks[idx].end;
if (++num_chunks == CYGDAT_REDBOOT_FIS_MAX_FREE_CHUNKS) {
diag_printf("Warning: too many free chunks\n");
return num_chunks;
--
Bye, Peter Korsgaard