This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: RedBoot: fis create can't find free space
- To: Grant Edwards <grante at visi dot com>
- Subject: Re: [ECOS] RedBoot: fis create can't find free space
- From: Gary Thomas <gthomas at cambridge dot redhat dot com>
- Date: Fri, 27 Apr 2001 06:40:00 -0600 (MDT)
- Cc: ecos-discuss at sourceware dot cygnus dot com
- Organization: Red Hat, Inc.
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'.