Re: [Yaffs] mkyaffs2 for yaffs2

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: ksi@koi8.net
Date:  
To: Rick Bronson
CC: yaffs
Subject: Re: [Yaffs] mkyaffs2 for yaffs2
On Wed, 18 Jul 2007, Rick Bronson wrote:

The best way is to just erase the nand partition, mount it somewhere with
YAFFS, then NFS-mount that filesystem with a tree that is supposed to go to
that nand partition and use cpio to copy the entire tree from NFS to YAFFS.

That is what we do here. I can't see any reason for mkyaffs-type utility at
all. Such a utility might've had sense for e.g. JFFS2 that works on NOR
flash because one could use that image to preprogram flash chips before
soldering them to a board. But NAND flash is not suitable for such kind of
preprogramming because of bad sectors and ECC. Not that one can not skip bad
sectors at programming time or can not generate ECC, but it makes very
little sense to do so. Especially knowing there are different ECC schemes,
OOB layouts etc. And it only applicable to mass production when one can
order flash chips preprogrammed. But then one has to test assembled boards
when they're coming out of production line, probably with some kind of
automated End-Of-Line tester with pogo-pins etc. And this makes the entire
pre-programming idea totally unnecessary because that flash can be
programmed in situ, as a part of board testing. NAND are fast to program so
it won't slow down the process while lowering components price one won't
have to pay extra for programming.

NOR is a different beast. It's much slower to program so programming them in
EOL tester will create a bottleneck. And processors that can only boot off
of NOR often don't have any alternative, they perform a blind jump to NOR
address assuming that their bootup program is already there. Those that can
boot off of NAND usually have some kind of bootup protocol that allows to
feed them with an initial boot loader through serial port or whatever so
they can be brought up to life with clean flash.

> Hi Sergey,
>
> Thanks very much for all of the help.
>
> I've got just one more question, if you don't mind. I promise not
> to bug you after this one ;-)
>
> The issue for us in using the mkyaffs2image or the nandwrite is
> that we would have to tftp around these huge files that represent
> each of our yaffs partitions. So for example, when we want to format
> a yaffs partition we would have to do:
>
> flash_eraseall --jffs2 /dev/mtd1
> nanddump -l 1 /dev/mtd1 > fs1r.bin
> nandwrite -n -o /dev/mtd1 fs1r.bin
>
> I could skip step 2 above but it would require me to tftp over the
> fs1r.bin image which is quite large.
>
> It would be really nice if there is a way to yaffs erase a partition
> without either 1) making files on-the-fly or 2) tftp'ing over big
> partition files. Can you tell me what you think is the best
> (easiest?) way to accomplish this?
>
> Thanks very much.
>
> Rick
>
>
>> On Tue, 17 Jul 2007, Rick Bronson wrote:
>>
>> Yes, I did.
>>
>> I did not do mkyaffs. It's not needed. You just erase the NAND with
> MTD
>> utils then copy the image generated with mkyaffs2image with nand_copy
> or
>> however it's called with the option telling that image contains OOB
> data.
>>
>> Sorry, I don't have time to return to that YAFFS thing right now,
> being busy
>> with TI DaVinci hardware bringup etc. I will return to it in probably
> a
>> month to properly port it to the new kernels with all the tools etc.
>>
>>> Hi Sergey,
>>>
>>> Did you get my last email? Just wondered...
>>>
>>> Thanks much.
>>>
>>> Rick
>>>
>>> ------------------------------------------------------
>>> To:
>>> In-reply-to: <>
>>> Subject: Re: mkyaffs for yaffs2
>>> Reply-To:
>>> References: <>
>>> <>
>>> <>
>>> <>
>>>
>>> Oops.
>>>
>>> Actually, I was looking for a mkyaffs.c that I can use to erase a
>>> partition and format it to yaffs. mkyaffs2image doesn't do me much
>>> good. Maybe I misunderstood your mailing list posting
>>> http://lists.aleph1.co.uk/pipermail/yaffs/2006q2/001985.html
>>>
>>> Or maybe you are implying that I need to take you changes to
>>> mkyaffs2image and apply them to the old mkyaffs.c???
>>>
>>> Thanks,
>>>
>>> Rick
>>>
>>
>> ---
>> ******************************************************************
>> *  KSI@home    KOI8 Net  < >  The impossible we do immediately.  *
>> *  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
>> ******************************************************************

>>
>


---
******************************************************************
*  KSI@home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************