Re: [Yaffs] yaffs2 with hw ecc enabled

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Alan Moore
Date:  
To: yaffs
Subject: Re: [Yaffs] yaffs2 with hw ecc enabled
On 10/22/2012 10:13 AM, Willie Mah wrote:
>
> I have been trying to integrate a YAFFS2 rootfs on my TI MVL ARM
> target while enabling the in-band
>
> tagging option of YAFFS. I've chosen to enable this option is so that
> it will be compatible
>
> with the HW ECC I've enabled in my kernel and uboot components. I
> have followed
>
> various thread on YAFFS2 that suggest I must use SW ECC with YAFFS.
> However, the
>
> nature of my target system and its need to upgrade its sub-components
> (i.e. UBL, UBOOT,
>
> KERNEL, and ROOTFS) in user space require I keep with the HW ECC. I
> have followed one thread
>
> (http://www.aleph1.co.uk/lurker/message/20110202.163806.dac21ec5.en.html)
> which claims
>
> to have achieved HW ECC with YAFFS2, but after attempting to
> incorporate such, have not had
>
> any success. Perhaps I just haven't applied its suggested patches
> properly or mounted the
>
> YAFFS2 fs correctly. Anyone else had success doing this configuration?
>


We were able to get HW 4bit ECC working with yaffs2. The HW ECC we use
(Micron part) takes over certain portions of the OOB area where it
writes the calculated 4bit ECC value which conflicts with yaffs. Yaffs
can be made to work with in-band tags as previously mentioned - but
there are still portions of the OOB area that need to be carefully
managed - namely, the BBT markers and the BBT signatures, etc.

What part are you using?

> In my efforts, I have also been tackling ECC layout questions w.r.t.
> UBOOT versus user space
>
> upgrading of components. My user space component upgrade application
> now depends
>
> on the default OOB layout enforced by the kernel MTD driver. I would
> like to keep this intact
>
> if possible. I am concerned but also assume that YAFFS2 will not care
> about which of the
>
> different ECC OOB layouts are in place if it is mounted with the
> in-band tagging option enabled.
>
> I am hoping that someone may have some further insight on how to
> coordinate the format
>
> of these components.
>


Yes, mounting old/new formats is an issue. We had to dance very
carefully around mounting. I think the short answer is you might have to
move content temporarily off to some other storage (ram drive?) and then
remount the yaffs with OOB, then move the data back... This may or may
not work depending on your use case.

It may be possible to do it without the offline copy but we couldn't
find a better solution in the amount of time we could spend looking at
it. We had to sniff out the older mount partitions and mount them in
"compatibility" mode so we don't trash data - the logic basically just
overrides mount arguments when the older format is detected.

Hope this helps.

Alan