Re: [Yaffs] how does one properly create & write a yaffs2 im…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Frank Mandarino
Date:  
To: yaffs
Subject: Re: [Yaffs] how does one properly create & write a yaffs2 image?

Christopher Friedt wrote:
> Hmm... i've been using cvs sources from aleph1 for quite some time, and
> i've never seen a mkyaffs command before ... although mkyaffsimage is
> practically the same idea.
>
> Christopher Friedt wrote:
>> Ok, so i determined that because of the 512 blocksize on my device, it's
>> actually a yaffs-1 image. Still, I've tried using mkyffsimage and still,
>> nothing appears at all in / -- linux halts saying that it can't find
>> /sbin/init, and again, when I mount the mtdblock device under the same
>> kernel (first using nfs root) then all i see is 'lost+found'.
>>
>> Has anyone on this list used RedBoot to write a yaffs filesystem to
>> flash? If so, how?
>>
>> My host system is x86. My target system is arm, little-endian.
>>
>> I've tried both using an x86-compiled mkyaffsimage and an arm-compiled
>> mkyaffsimage, but neither seem to work, although they say they're adding
>> all of the files.
>>
>> Say a directory exists called 'newroot' which contains all of the arm
>> filesystem that I want to create. I use:
>>
>> mkyaffsimage newroot ../new_root.yaffs
>>
>> Then with RedBoot, I use
>>
>> fis delete ...
>> load ...
>> fis write ...
>>
>> Am I missing some crucial step?
>>
>>
>> ~/Chris
>>
>> Christopher Friedt wrote:
>>> This might sound like a really, really over-answered FAQ, but how does
>>> one actually go about creating a yaffs2 image?
>>>
>>> I used mkyaffs2image on a directory, received a file image in return,
>>> and there were no error codes on exit. However, After writing that image
>>> to flash with RedBoot, launching into an NFS root, and mounting the
>>> flash device, absolutely nothing shows up within the directory aside
>>> form 'lost+found'.
>>>
>>> Could anyone offer some instruction as to how I could write a yaffs2
>>> image to flash 'properly' ?
>>>
>>>
>>> ~/Chris


Hi Chris,

I had the same problem several months ago. For 512 pagesize NAND you do
have to use mkyaffsimage.

Your problem is likely due to the fact that the Redboot fis command is
not writing the 16-byte out-of-band (OOB) data that is contained in the
image file along with the page data.

I had to modify the U-Boot bootloader nand write command to write YAFFS
image files. My patches were posted on the U-Boot mailing list.

An alternative is to boot Linux from a non-YAFFS partition, and either
extract a tar'd image of the filesystem to the YAFFS partition, or write
out the mkyaffsimage file using the MTD nandwrite utility (although I'm
not sure if nandwrite still works with the latest MTD OOB format change).

Regards,
../fam
-- 
Frank Mandarino                                fmandarino(a)endrelia.com
Endrelia Technologies Inc.
Toronto, Ontario, Canada