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, 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?

-- 
Grant Edwards
grante@visi.com

-- 
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]