This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: jffs2 problem
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Eigil Krogh Sørensen <eisor at tcelectronic dot com>
- Cc: "ecos-discuss at ecos dot sourceware dot org" <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 17 May 2011 13:36:52 -0600
- Subject: Re: [ECOS] jffs2 problem
- References: <55E5231BD2EB004EB1E67397C33B3A3E39EE9CAF@ex004tcg>
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