Re: [Yaffs] mkyafss or simple mount

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] mkyafss or simple mount
On Tuesday 07 June 2011 05:40:58 Marc Chachereau wrote:
> Hi all,
>
> we are using yaffs on a product to manage a file system located on a NAND.
> We need to copy our linux system on the NAND during production.
>
> The question we have is: do we need to use mkyaffs prior to mounting the
> NAND?


If the flash is erased, then that is the same as "formatting" the file
system.

You do not have to use mkyaffs. You can use flash_eraseall instead.


> or, a simple "mount -t ..." is enough to perform this copy. This is
> what we are doing today!


If you want to load some files into a devices, there are basically two ways to
do this:

1) Erase the flash, mount yaffs and some other file system, copy files from
other source onto yaffs.

or

2) Make a flash image file and copy that into flash.

This approach is a bit more difficult., but is more suited to manufacturing
where you want to load up an image without booting the kernel etc.
There are really two ways to do this:
a) Use mkyaffs2image to create an image. This is not very straigtforward and
typically requires that you fiddle around a bit to get the flash layout
correct.
b) Copy the contents off an existing yaffs flash partition. However, you will
also need to:
i) Strip out all erased blocks.
ii) Ensure that the file system does not have a saved checkpoint.

If you are programming an image, yo need to ensure that tags and everything
are being written correctly.


>
> By the way, we also noticed a strange behavior on 1 product overs 600
> pieces manufactured. After copying the file system and a hardware reboot we
> were unable to access the file system on the nand (mount failure) and were
> forced to use mkyaffs to access the NAND.

It sounds like something got messed up in creating the image.


>
> Thanks for your comment and help.
>
> Regards,
>
> Marc