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.


On Tue, Oct 26, 2004 at 10:27:56AM +0100, David Vrabel wrote:
> Andrew Lunn wrote:
> >
> >Is there more than a ChangeLog entry for this patch :-)
> 
> Here it is.
> 
> Sorry to waste your time over such a trivial patch like this.  /me makes 
> mental note to get it right the first time in future.
> 
> -- 
> 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/src/flash.c.orig	Tue Oct 26 09:48:59 2004
> +++ packages/redboot/current/src/flash.c	Tue Oct 26 09:50:39 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;

Im not sure this is the correct fix, if i understand the problem
correctly. Im assuming you don't have redboot at the bottom of flash,
but fis free thinks it is in use and so will not list this section.

Probably a better fix would be to set CYGBLD_REDBOOT_MIN_IMAGE_SIZE to
zero when CYGOPT_REDBOOT_FIS_REDBOOT is disabled. You could do this
from cdl, something like

cdl_option CYGBLD_REDBOOT_MIN_IMAGE_SIZE {
    display       "Minimum image size"
    flavor        data
    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."
}

        Andrew


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