[ECOS] Re: Flash device interface

Roland Caßebohm roland.cassebohm@visionsystems.de
Wed Nov 5 12:31:00 GMT 2003

On Mittwoch, 5. November 2003 12:16, Savin Zlobec wrote:
> Roland Caßebohm wrote:
> >Hi again,
> >
> >I'm just trying to use the flash device interface (/dev/flash1)
> >for accessing flash, but if I write to flash with write() I get
> >an "I/O error".
> >
> >The problem seems to be, that flashiodev_bwrite() does not erase
> >the region before programming it. I also think about a possibility
> >to write regions, which are not block aligned.
> >
> >Maybe the function calls flash_erase() and flash_program() block
> >by block and for the first and the last block which are not block
> >aligned, it first makes a copy of the current flash content,
> >replaces the to be written data in this copy and programs the copy
> >back.
> >
> >I also want to use flash_read() instead of directly read the flash.
> >Then it should work with flashes with indirect access too.
> >
> > Any suggestions?
> Hi,
> you can take a look at the work I've done on FAT fs. It includes
> a block cache and access library and a simple disk drivers framework.
> It was written to support CF cards, but the block access is pretty generic.


I have made a quick look at your code and it looks realy good, but I
don't know how to use it for my case.

What I wanted is that RedBoot manages the flash fis the fis commands.
But then I need a possibility to access the flash from an application
without corrupt the fis images.

With the "Flash device interface" I thought could at least have access
to one fis image. But now I have noticed, that the dev filesystem
don't support things like lseek() and fstat(), which I need to use
a fis image like a file.

Maybe it would be good to implement a "fis filesystem", which then
gives access to all fis images. If this includes the RedBoot image
itself, it should be possible to write application which could
update it self and RedBoot.


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

More information about the Ecos-discuss mailing list