This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: jffs2 problem
Hi
Thanks for the reply!
It did make a difference to create the image with a larger length. Unfortunately now eCos crashes when creating a file in " jffs2_do_create(...)"
In the "configtool" I can't enable "Support for NAND flash" under "JFFS2 filesystem". That might be the reason.
Is there a functioning NAND file system for eCos (that can both read and write from/to NAND flash) ?
I tried yaffs and NAND Flash access library from eCosCentric; but
1) configtool kept complaining about a missing "CYGHWR_IO_NAND_DEVICE" and
2) when I commented out the line in "nand.cdl" and everything compiles OK, then I couldn't find out what the NAND device name was (kept getting "No such device" when trying to mount the NAND with
err = mount( "onboard/0", "/", "yaffs" );
if( err < 0 )
{
SHOW_RESULT( mount, err );
}
err = mount( "/dev/flash1", "/", "yaffs" );
if( err < 0 )
{
SHOW_RESULT( mount, err );
}
err = mount( "/dev/flash/fis/ecosnand", "/", "yaffs" ); // in RedBoot I have created an image called ecosnand
if( err < 0 )
{
SHOW_RESULT( mount, err );
}
)
How do I find the NANDs device name ?
Best
EISOR
\Eigil
-----Original Message-----
From: Gary Thomas [mailto:gary@mlbassoc.com]
Sent: 17. maj 2011 9:37
To: Eigil Krogh Sørensen
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] jffs2 problem
On 05/17/2011 12:15 PM, Eigil Krogh Sørensen wrote:
> Hi
>
> I'm writing code that uses jffs2 (for a Freescale i.MX25 board) and can't get it to work.
>
> In RedBoot I have created at fis image with name jffs2 w.:
> "fis create -l 0x1024"
>
> "fis list" gives:
> Name FLASH addr Mem addr Length Entry point
> RedBoot 0x00000000 0x00000000 0x000C0000 0x00000000
> FIS directory 0x000C0000 0x000C0000 0x0003F000 0x00000000
> RedBoot config 0x000FF000 0x000FF000 0x00001000 0x00000000
> perfTsts 0x00100000 0x00100000 0x00040000 0x00100230
> jffs2 0x00140000 0x00000000 0x00040000 0xFFFFFFFF
>
>
> Then I have erased the FLASH w.:
> "fis erase -f 0x00140000 -l 0x00040000"
>
> After that in eCos "mount( "/dev/flash/fis/jffs2", "/", "jffs2" )" works OK, and on the tty it writes "Erase 0x00140000: .." when the "mount( "/dev/flash/fis/jffs2", "/", "jffs2" )" instruction is run.
>
> But I can't create any files in "/" after that. The instruction "open( "jffs2tst", O_WRONLY|O_CREAT )" returns -1 (which originates from "jffs2_reserve_space(.)" that returnes because dirty = 0 and c->nospc_dirty_size = 264765).
>
>
>
> What am I doing wrong ? Is there anything I can do to solve the problem ?
JFFS2 images need at least 2 empty erase blocks to function.
Try creating the image with a larger length.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss