This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RedBoot: fis free: don't ignore chunk at start.


Andrew Lunn wrote:

So i think your patch is OK. But it seems that code has been cut/pasted a few times and probably the other ones should be fixed as well. Please could you submit a patch for them all, and the change to the documentation attribute of the option.

Here it is.


2004-11-01 David Vrabel <dvrabel@arcom.com>

	* cdl/redboot.cdl (CYGBLD_REDBOOT_MIN_IMAGE_SIZE): Correct the
	description to match what the option is actually used for.

	* src/flash.c (find_free, fis_free, fis_find_free): Don't ignore
	an extra CYGBLD_REDBOOT_MIN_IMAGE_SIZE amount from the start.
	This fixes the case where nothing uses the start of flash.

--
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/
--- packages/redboot/current/cdl/redboot.cdl.orig	Mon Nov  1 10:01:01 2004
+++ packages/redboot/current/cdl/redboot.cdl	Mon Nov  1 10:01:37 2004
@@ -732,14 +732,14 @@
                 }
     
                 cdl_option CYGBLD_REDBOOT_MIN_IMAGE_SIZE {
-                    display       "Minimum image size"
+                    display       "Maximum RedBoot image size"
                     flavor        data
-                    default_value 0x20000
+                    default_value { CYGOPT_REDBOOT_FIS_REDBOOT ? 0x20000 : 0 }
                     description "
-                      This option controls the minimum length of images kept by
-                      the FIS.  In particular, it should be large enough to hold
-                      the RedBoot primary image itself, as well as be a natural
-                      multiple of the FLASH erase block size."
+                      This option controls the maximum length reserved
+                      for the RedBoot boot image in the FIS table.
+                      This should be a multiple of the flash's erase
+                      block size."
                 }
         
                 cdl_option CYGBLD_REDBOOT_FLASH_BOOT_OFFSET {
--- packages/redboot/current/src/flash.c.orig	Tue Oct 26 09:48:59 2004
+++ packages/redboot/current/src/flash.c	Mon Nov  1 09:52:28 2004
@@ -564,8 +564,7 @@
 
     // Do not search the area reserved for pre-RedBoot systems:
     fis_ptr = (CYG_ADDRESS *)((CYG_ADDRESS)flash_start + 
-                              CYGNUM_REDBOOT_FLASH_RESERVED_BASE + 
-                              CYGBLD_REDBOOT_MIN_IMAGE_SIZE);
+                              CYGNUM_REDBOOT_FLASH_RESERVED_BASE);
     fis_end = (CYG_ADDRESS *)flash_end;
     chunks[num_chunks-1].start = (CYG_ADDRESS)fis_ptr;
     chunks[num_chunks-1].end = (CYG_ADDRESS)fis_end;
@@ -620,8 +619,7 @@
 
     // Do not search the area reserved for pre-RedBoot systems:
     fis_ptr = (unsigned long *)((CYG_ADDRESS)flash_start + 
-                                CYGNUM_REDBOOT_FLASH_RESERVED_BASE + 
-                                CYGBLD_REDBOOT_MIN_IMAGE_SIZE);
+                                CYGNUM_REDBOOT_FLASH_RESERVED_BASE);
     fis_end = (unsigned long *)(CYG_ADDRESS)flash_end;
     area_start = fis_ptr;
     while (fis_ptr < fis_end) {
@@ -672,8 +670,7 @@
 
     // Do not search the area reserved for pre-RedBoot systems:
     fis_ptr = (unsigned long *)((CYG_ADDRESS)flash_start + 
-                                CYGNUM_REDBOOT_FLASH_RESERVED_BASE + 
-                                CYGBLD_REDBOOT_MIN_IMAGE_SIZE);
+                                CYGNUM_REDBOOT_FLASH_RESERVED_BASE);
     fis_end = (unsigned long *)(CYG_ADDRESS)flash_end;
     area_start = fis_ptr;
     while (fis_ptr < fis_end) {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]