This is the mail archive of the ecos-discuss@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 creating overlapping files?


On Mon, 2003-02-17 at 17:03, Grant Edwards wrote:
> On Mon, Feb 17, 2003 at 05:19:55PM -0600, Grant Edwards wrote:
> > 
> > When I load two files (a linux kernel image and a root
> > filesystem) into RAM and then create two FIS files, RedBoot
> > seems to be overlapping the files:
> [...]
> > RedBoot> fis list
> > Name              FLASH addr  Mem addr    Length      Entry point
> > RedBoot           0x50000000  0x50000000  0x00040000  0x00000000
> > RedBoot config    0x50FC0000  0x50FC0000  0x00001000  0x00000000
> > FIS directory     0x50FE0000  0x50FE0000  0x00020000  0x00000000
> > zImage            0x50040000  0x11600000  0x00100000  0x11600000
> > root              0x50100000  0x11000000  0x00800000  0x00000000
> > 
> > The last two files (zImage and root) overlap. zImage ends at
> > 50140000 but root starts at 50100000.  I think the problem is
> > caused by the fact that though the zImage file ends at
> > 0x5014000, the data within that file ends at 0x500eb458, so
> > RedBoot ignores the stored image length and overlaps the files
> > by erroneously re-using the empty sectors in the last 1/4 of
> > the zImage file.
> 
> I've been browsing flash.c and it looks like it still works
> this way.  fis_find_free() just looks for erased blocks and
> ignores the FIS directory info on what blocks are free and what
> blocks are used.  Am I reading the code correctly?
> 
> Since there's a directory structure that keeps track of what
> flash areas are used and what ones aren't, why ignore it?

There were arguments about this in the past.  As I said earlier,
it probably does make sense to at least use the FIS directory
to validate what's being used.

In reality, I mostly just do the "allocation" myself and always
specify the locations directly.

-- 
.--------------------------------------------------------.
|       Mind: Embedded Linux and eCos Development        |
|--------------------------------------------------------|
| Gary Thomas              email:  gary.thomas@mind.be   |
| Mind ( http://mind.be )  tel:    +1 (970) 229-1963     |
| gpg: http://www.chez-thomas.org/gary/gpg_key.asc       |
'--------------------------------------------------------'


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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