Re: [Yaffs] Problems with mkyaffs2image.c v1.5

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Guy Lancaster
Date:  
To: yaffs
Subject: Re: [Yaffs] Problems with mkyaffs2image.c v1.5
On Wed, Apr 21, 2010 at 11:48 PM, stanley.miao
<> wrote:
> Charles Manning wrote:
>> I guess the other approach is to not modify nand_write but rather modify
>> mkyaffs2 and use that to write in the image.
>
> We usually run mkyaffs2 on the host PC, and it can't get the nand flash
> information on the target board.


I've been preparing to modify mkyaffs2image but Stanley is right in
that the MTD driver depends on configuration information that it reads
from the flash chip. This is non-trivial to get from specifications
so there should be a better way and the mtd-utils nandwrite utility
would be appropriate if you're booting with a ramdisk. From a
production perspective we'd prefer having an image that we can flash
directly with U-Boot.

I've just had a look through the U-Boot code (I've been using a
pre-built image) and it includes the YAFFS2 filesystem and the MTD
driver. So I'm going to see if there's a way to prepare an image that
U-Boot will be able to write correctly.

Reasonable?

BTW, could someone explain what the code in mkyaffs2image's
little_to_big_endian() function is supposed to do? I don't think that
I'll need it in my case but it's non-obvious and anyone needing to
implement it will have a difficult time. It's certainly not doing
normal byte order conversion.

Thanks.

-- Guy