* [ECOS] JFFS2 for NAND flash file system
@ 2011-05-16 15:35 Paul MAILLET
2011-05-17 9:37 ` Ross Younger
0 siblings, 1 reply; 4+ messages in thread
From: Paul MAILLET @ 2011-05-16 15:35 UTC (permalink / raw)
To: ecos-discuss
Hi,
I am currently working on adding JFFS2 component to my eCos
configuration but I am still not sure if the dev on this module is
complete.
As I can read in some TODOs or readme found in the JFFS2 package from
the repository of my devkit, NAND support is not yet implemented in
the module.
Does this functionality has been completed today, or is it still on progress?
However, if it's not implemented yet, what solution can I use to add a
NAND Flash file system?
Best regards,
Paul
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] JFFS2 for NAND flash file system
2011-05-16 15:35 [ECOS] JFFS2 for NAND flash file system Paul MAILLET
@ 2011-05-17 9:37 ` Ross Younger
0 siblings, 0 replies; 4+ messages in thread
From: Ross Younger @ 2011-05-17 9:37 UTC (permalink / raw)
To: ecos
On 16/05/11 13:05, Paul MAILLET wrote:
> Does this functionality has been completed today, or is it still on progress?
> However, if it's not implemented yet, what solution can I use to add a
> NAND Flash file system?
There's a YAFFS port for eCos, which is targetted specifically for NAND
parts.
At the moment, NAND support is not in the eCos trunk, so to get it
working you'd have to start with the public trunk, then pull from the
nand-ecoscentric repository on http://hg-pub.ecoscentric.com/. YAFFS has
its own license so is in a separate repository named
yaffs-ecoscentric-gpl. You haven't said which board you're using, so
it's likely that you will also need to add NAND support to the board HAL
(and possibly a chip driver for whatever is on that board).
Ross
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ECOS] RE : JFFS2 for NAND flash file system
@ 2011-05-17 10:15 Paul MAILLET
2011-05-31 15:20 ` [ECOS] " Paul MAILLET
0 siblings, 1 reply; 4+ messages in thread
From: Paul MAILLET @ 2011-05-17 10:15 UTC (permalink / raw)
To: ecos-discuss
> There's a YAFFS port for eCos, which is targetted specifically for NAND parts.
Yes, YAFFS should have been the solution if it was under the same
license of eCos.
> At the moment, NAND support is not in the eCos trunk, so to get it working you'd have to start with the public trunk, then pull from the nand-ecoscentric repository on
> http://hg-pub.ecoscentric.com/. YAFFS has its own license so is in a separate repository named yaffs-ecoscentric-gpl.
>You haven't said which board you're using, so it's likely that you will also need to add NAND support to the board HAL (and possibly a chip driver for whatever is on that board).
My board is an ERTEC200 evalution board (DevKit) from SIEMENS. For the
flash, it uses the general flash support package with a specific flash
memory device support (AMD AM29XXXXX). The ERTEC and board
architecture support are provided with the DK.
The problem with this DK is that the eCos version is not fixed, it
seems to be post eCos v2 but pre eCos v3.0. Is there a mean to know
the exact version I use?
I downloaded the YAFFS package (file .epk) to evaluate it, but I was
unable to add the package to the repository, the configuration tool
ended with an error when importiong the .epk file...
Regards,
Paul
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ECOS] Re: RE : JFFS2 for NAND flash file system
2011-05-17 10:15 [ECOS] RE : " Paul MAILLET
@ 2011-05-31 15:20 ` Paul MAILLET
2011-05-31 18:50 ` Ross Younger
2011-06-01 9:23 ` [ECOS] Re: RE : " Paul MAILLET
0 siblings, 2 replies; 4+ messages in thread
From: Paul MAILLET @ 2011-05-31 15:20 UTC (permalink / raw)
To: ecos-discuss
Hi,
I have been able to configure and run JFFS2 on my target, I have
successfully tested basics functionalities. As my target use NAND
flash and JFFS2 doesn't support it, I would like to know if it is
really problematic or dangerous or anything that I should be aware of
when using it on NAND flash device.
Also I have looked for information about block usage like how many
blocks are used when I create a directory or an empty file but I did
not find these data.
Can someone shed some ligth on this?
Thanks,
Best regards,
Paul
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] Re: RE : JFFS2 for NAND flash file system
2011-05-31 15:20 ` [ECOS] " Paul MAILLET
@ 2011-05-31 18:50 ` Ross Younger
2011-05-31 20:40 ` [ECOS] " Stanislav Meduna
2011-06-01 9:23 ` [ECOS] Re: RE : " Paul MAILLET
1 sibling, 1 reply; 4+ messages in thread
From: Ross Younger @ 2011-05-31 18:50 UTC (permalink / raw)
To: ecos-discuss
* Paul MAILLET <paulmaillet37@gmail.com> wrote:
> As my target use NAND
> flash and JFFS2 doesn't support it, I would like to know if it is
> really problematic or dangerous or anything that I should be aware of
> when using it on NAND flash device.
Running a non-NAND-aware filesystem on NAND is a very bad idea.
On NAND parts it is mandatory to implement an error correcting code (ECC),
either in software, or in hardware if your board's memory controller
supports it. Any given NAND part's datasheet should contain details
of the recommended minimum protection level to use for that chip. It is
traditional to store the computed ECC in each page's out-of-band ("spare")
area and check it on read. Without an ECC, you will get no warning of the
occasional random bitflips which occur in the data returned from the chip.
Even reading a NAND page can, once in a while, cause a bit in-flash to
flip (the "read disturb" effect). If your filesystem doesn't periodically
refresh its contents, files and/or filesystem metadata which is frequently
read but never changed will gradually rot.
NAND flash, like NOR, gradually wears out over time. However, a NAND
driver author is expected to notice when blocks fail to write correctly
(many chips will tell you when they have failed to write) and devise a
method of putting such blocks beyond use. If you don't do this, you will
experience long-term reliability issues.
There may also be a small number of eraseblocks declared to be bad during
factory testing. This is done by setting a marker in the OOB area;
again, check the datasheet for details. A correct NAND implementation
will avoid such blocks; if you were to write to one, the chip's behaviour
is undefined.
In summary, you cannot safely run any filesystem on NAND parts unless
it has been specifically designed or modified for the peculiarities of
NAND flash. I cannot state this strongly enough.
Now, the public JFFS2 tree has had support for NAND flash since 2003.
It looks like the version in eCos dates from around that time, though
has its NAND support disabled; there's an argument to be made that this
perhaps ought to be put right some time.
Regards,
Ross
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] JFFS2 for NAND flash file system
2011-05-31 18:50 ` Ross Younger
@ 2011-05-31 20:40 ` Stanislav Meduna
0 siblings, 0 replies; 4+ messages in thread
From: Stanislav Meduna @ 2011-05-31 20:40 UTC (permalink / raw)
To: ecos-discuss
On 31.05.2011 17:42, Ross Younger wrote:
> Running a non-NAND-aware filesystem on NAND is a very bad idea.
Is there any NAND-aware filesystem with eCos-compatible license?
I only know of jffs2 - yaffs2 is GPL or (a lot of) $$$ and ubifs
is also GPL.
Actually I am seeing this situation as a major drawback to eCos -
nowadays just about any device uses NAND for larger storage...
> Even reading a NAND page can, once in a while, cause a bit in-flash to
> flip (the "read disturb" effect). If your filesystem doesn't periodically
> refresh its contents, files and/or filesystem metadata which is frequently
> read but never changed will gradually rot.
Hmm, does jffs2 handle this? I don't remember seeing something like this
in the code, but maybe I did not look at recent enough one.
> Now, the public JFFS2 tree has had support for NAND flash since 2003.
> It looks like the version in eCos dates from around that time, though
> has its NAND support disabled; there's an argument to be made that this
> perhaps ought to be put right some time.
AFAIK when this was discussed there was some architectural problem -
Linux's jffs2 uses mtd layer and that code is GPL, so it needs
to be written from scratch:
http://www.cygwin.com/ml/ecos-discuss/2008-07/msg00055.html
--
Stano
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ECOS] Re: RE : JFFS2 for NAND flash file system
2011-05-31 15:20 ` [ECOS] " Paul MAILLET
2011-05-31 18:50 ` Ross Younger
@ 2011-06-01 9:23 ` Paul MAILLET
2011-06-01 10:54 ` [ECOS] " Stanislav Meduna
1 sibling, 1 reply; 4+ messages in thread
From: Paul MAILLET @ 2011-06-01 9:23 UTC (permalink / raw)
To: ecos-discuss
Hi,
Sorry if my questions could seem a bit lacking but I am new here and I
am quite curious.
For the moment the differences between JFFS2 NAND flash support and
eCos NAND support is not clear in my head.
I understand that NAND flash devices have some drawbacks that must be
taken in account, like :
- wear-levelling for increasing the life time of the device
- ECC (error code correction) to manage bit-flipping
- Bad blocks management
I may be wrong but in my head all these functionality should be
present in the eCos NAND flash support.
For me this layer will use the below layer, the hardware specific NAND
driver, to perform simple read/write.
It will implement WL, ECC and BBM, and provide an API for upper layers
like file systems. Am I wrong?
Here is a drawing of layers as i see it :
___________________
| | API for app/user
| FILE IO |
|___________________|
| | API for upper layer
| FS | Manage the file system
|___________________| Use the eCos NAND support interface to perform read/write
| | API for upper layer
| eCos NAND support | Implement NAND drawbacks management
|___________________| Uses HW NAND driver to perform simple
R/W operations
| | API to access the HW
| HW NAND Driver | Manage R/W operations
|___________________| Reach the hardware
For me it is clear that the FS has nothing to do with all the NAND
drawbacks, it's the job of the NAND support layer, isn't it?
Finally, what are the functionality that make the FS compliant to NAND
devices as it will use a NAND support layer which already take in
account drawbacks from NAND device?
Here is how things are disposed in my head, does it has to be rectified?
PS : Is the Linux mtd layer (or a part of it) the equivalent of the
eCos NAND support?
Thanks for your time,
Best regards,
Paul
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ECOS] JFFS2 for NAND flash file system
2011-06-01 9:23 ` [ECOS] Re: RE : " Paul MAILLET
@ 2011-06-01 10:54 ` Stanislav Meduna
0 siblings, 0 replies; 4+ messages in thread
From: Stanislav Meduna @ 2011-06-01 10:54 UTC (permalink / raw)
To: ecos-discuss
On 01.06.2011 11:23, Paul MAILLET wrote:
> For me it is clear that the FS has nothing to do with all the NAND
> drawbacks, it's the job of the NAND support layer, isn't it?
If I understand it correctly, unfotunately that's not the case -
the NAND layer does not implement an abstraction of linear
error-free blocks, rotated and refreshed according to the
hardware needs. The filesystem still needs to know what
it is allowed to do - see e.g.
http://www.kernel.org/doc/htmldocs/mtdnand.html
Filesystems must be aware of the NAND pecularities
and restrictions. One major restrictions of NAND Flash
is, that you cannot write as often as you want to a page.
The consecutive writes to a page, before erasing it again,
are restricted to 1-3 writes, depending on
the manufacturers specifications. This applies similar
to the spare area.
My question is: would it be possible/desirable to implement
an abstraction layer similar to e.g. a controller in
a SD-Card or a SSD flash drive? Then it would be possible
to use just about any fs, including FAT and similar beasts.
Regards
--
Stano
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-01 10:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-16 15:35 [ECOS] JFFS2 for NAND flash file system Paul MAILLET
2011-05-17 9:37 ` Ross Younger
2011-05-17 10:15 [ECOS] RE : " Paul MAILLET
2011-05-31 15:20 ` [ECOS] " Paul MAILLET
2011-05-31 18:50 ` Ross Younger
2011-05-31 20:40 ` [ECOS] " Stanislav Meduna
2011-06-01 9:23 ` [ECOS] Re: RE : " Paul MAILLET
2011-06-01 10:54 ` [ECOS] " Stanislav Meduna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).