public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] RedBoot: fis create can't find free space
@ 2001-04-26 12:36 Grant Edwards
  2001-04-26 17:24 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Grant Edwards @ 2001-04-26 12:36 UTC (permalink / raw)
  To: ecos-discuss

I'm trying to figure out why the flash code in RedBoot can't
create an image:

    RedBoot> load -v -b 0 -r -h 10.0.0.2 socket-1.03.bin
    -
    Raw file loaded 0x00000000-0x0007f958
    RedBoot> fis list                      
    Name              FLASH addr   Mem addr    Length      Entry
    point
    FIS directory     0x053F0000   0x053F0000  0x00010000  0x00000000 
    default           0x051B0000   0x00000000  0x00080000  0x00000384
    RedBoot> fis free                      
      0x050B0000 .. 0x05130000
      0x05230000 .. 0x053F0000
    RedBoot> fis create foo                                          
    Can't locate 524288 bytes free in FLASH
    RedBoot>                              

Firstly, according to "fis list" and "fis free" I've got almost
2M of free space between 0x5230000 and 0x53f0000, but "fis
create" can't find 500K of free space.  Any ideas why?

Secondly, I think I've figured out why there's "unfree" flash
(5030000-50B0000 and 5130000-51B0000))that isn't being used by
an image.

If I do an "fis create" with an existing image name, that will
leak flash, right?  By "leak" I mean it leaves orphaned "used"
areas in flash that don't belong to any image.  Is that a
useful feature?  I'm thinking of changing the "create" code so
that doing a "create" with an existing image name deletes the
old one before creating the new one.  I could just tell my
users never to do an "fis create" with an existing image name,
but we all know how well instructions like that are followed.

-- 
Grant Edwards
grante@visi.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] RedBoot: fis create can't find free space
  2001-04-26 12:36 [ECOS] RedBoot: fis create can't find free space Grant Edwards
@ 2001-04-26 17:24 ` Gary Thomas
  2001-04-26 22:26   ` Grant Edwards
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2001-04-26 17:24 UTC (permalink / raw)
  To: Grant Edwards; +Cc: ecos-discuss

On 26-Apr-2001 Grant Edwards wrote:
> 
> I'm trying to figure out why the flash code in RedBoot can't
> create an image:
> 
>     RedBoot> load -v -b 0 -r -h 10.0.0.2 socket-1.03.bin
>     -
>     Raw file loaded 0x00000000-0x0007f958
>     RedBoot> fis list                      
>     Name              FLASH addr   Mem addr    Length      Entry
>     point
>     FIS directory     0x053F0000   0x053F0000  0x00010000  0x00000000 
>     default           0x051B0000   0x00000000  0x00080000  0x00000384
>     RedBoot> fis free                      
>       0x050B0000 .. 0x05130000
>       0x05230000 .. 0x053F0000
>     RedBoot> fis create foo                                          
>     Can't locate 524288 bytes free in FLASH
>     RedBoot>                              
> 
> Firstly, according to "fis list" and "fis free" I've got almost
> 2M of free space between 0x5230000 and 0x53f0000, but "fis
> create" can't find 500K of free space.  Any ideas why?
> 
> Secondly, I think I've figured out why there's "unfree" flash
> (5030000-50B0000 and 5130000-51B0000))that isn't being used by
> an image.
> 
> If I do an "fis create" with an existing image name, that will
> leak flash, right?  By "leak" I mean it leaves orphaned "used"
> areas in flash that don't belong to any image.  Is that a
> useful feature?  I'm thinking of changing the "create" code so
> that doing a "create" with an existing image name deletes the
> old one before creating the new one.  I could just tell my
> users never to do an "fis create" with an existing image name,
> but we all know how well instructions like that are followed.
> 

There is no positive relationship between 'fis free' and 'fis list'.
The "free" command simply looks for erased blocks.

'fis create' will gladly reuse existing flash space, but it must
match in length.  If you need to recreate with a different size,
you should delete and then create.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] RedBoot: fis create can't find free space
  2001-04-26 17:24 ` Gary Thomas
@ 2001-04-26 22:26   ` Grant Edwards
  2001-04-27  5:40     ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Grant Edwards @ 2001-04-26 22:26 UTC (permalink / raw)
  To: Gary Thomas; +Cc: ecos-discuss

On Thu, Apr 26, 2001 at 06:24:42PM -0600, Gary Thomas wrote:

> >     RedBoot> fis free                      
> >       0x050B0000 .. 0x05130000
> >       0x05230000 .. 0x053F0000
> >     RedBoot> fis create foo                                          
> >     Can't locate 524288 bytes free in FLASH
> >     RedBoot>                              
> > 
> > Firstly, according to "fis list" and "fis free" I've got almost
> > 2M of free space between 0x5230000 and 0x53f0000, but "fis
> > create" can't find 500K of free space.  Any ideas why?
> 
> There is no positive relationship between 'fis free' and 'fis list'.
> The "free" command simply looks for erased blocks.

I see, but why would 'fis create' say it can't find 500k of free space when
'fis free' shows a free block that's almost 2M?  Does 'fis create' use a
different method than 'fis free' to determine what's unused?

> 'fis create' will gladly reuse existing flash space, but it must
> match in length.  If you need to recreate with a different size,
> you should delete and then create.

Yup. Doing 'fis create' with an existing image name is how I ended up with
orphaned flash blocks. I'm going to tell people to always delete. Someday
when I have some spare time, I'll modify the create command so it will
delete an existing file rather than orphan the used space.  But that's
pretty far down the list at the moment.

-- 
Grant Edwards
grante@visi.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] RedBoot: fis create can't find free space
  2001-04-26 22:26   ` Grant Edwards
@ 2001-04-27  5:40     ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2001-04-27  5:40 UTC (permalink / raw)
  To: Grant Edwards; +Cc: ecos-discuss

On 27-Apr-2001 Grant Edwards wrote:
> On Thu, Apr 26, 2001 at 06:24:42PM -0600, Gary Thomas wrote:
> 
>> >     RedBoot> fis free                      
>> >       0x050B0000 .. 0x05130000
>> >       0x05230000 .. 0x053F0000
>> >     RedBoot> fis create foo                                          
>> >     Can't locate 524288 bytes free in FLASH
>> >     RedBoot>                              
>> > 
>> > Firstly, according to "fis list" and "fis free" I've got almost
>> > 2M of free space between 0x5230000 and 0x53f0000, but "fis
>> > create" can't find 500K of free space.  Any ideas why?
>> 
>> There is no positive relationship between 'fis free' and 'fis list'.
>> The "free" command simply looks for erased blocks.
> 
> I see, but why would 'fis create' say it can't find 500k of free space when
> 'fis free' shows a free block that's almost 2M?  Does 'fis create' use a
> different method than 'fis free' to determine what's unused?
> 

It should not because it calls the same internal functions.

Of course, I don't know about your version of RedBoot - a lot has changed
since last you updated.

>> 'fis create' will gladly reuse existing flash space, but it must
>> match in length.  If you need to recreate with a different size,
>> you should delete and then create.
> 
> Yup. Doing 'fis create' with an existing image name is how I ended up with
> orphaned flash blocks. I'm going to tell people to always delete. Someday
> when I have some spare time, I'll modify the create command so it will
> delete an existing file rather than orphan the used space.  But that's
> pretty far down the list at the moment.

It won't "orphan" anything if you explicitly tell 'fis create' to reuse
the same flash addresses, i.e. use the -f option.

BTWm, '-f' is now implied for 'fis create' on an existing image.  In other
words, if you do 'fis create' on an image which exists and you do not give
the '-f' option, it assumes that you did and reuses exactly that space.
This was not the behaviour previously (I'm sure your vintage) where it
could indeed "orphan" space when used without '-f'.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-04-27  5:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-26 12:36 [ECOS] RedBoot: fis create can't find free space Grant Edwards
2001-04-26 17:24 ` Gary Thomas
2001-04-26 22:26   ` Grant Edwards
2001-04-27  5:40     ` Gary Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).