Re: [Yaffs] Is YAFFS2 support required in boot loader?

Startseite
Anhänge:
Nachricht
+ (text/plain)
Nachricht löschen
Nachricht beantworten
Autor: Charles Manning
Datum:  
To: yaffs
CC: Rakhi Rathi
Betreff: Re: [Yaffs] Is YAFFS2 support required in boot loader?
On Tuesday 18 October 2005 02:19, Rakhi Rathi wrote:
> Hi all!
>
> I am having four partiton on NAND flash: boot, environment variable, kernel
> image and root FS ( YAFFS2) and boot loader needs to download kernel image
> and root FS using TFTP / FTP. How kernel image and root FS can be converted
> into YAFFS format and downloaded? What support I need to provide in boot
> loader?



There are really two parts to your question, I think:

1) Is there something like myyaffsimage for YAFFS2?

2) Is there a bootloader for YAFFS2 (ie. some code like yboot that will read a
boot image from a YAFFS2 partition).

The answer to both of these is currently No, but I can give some guidance on
these:

1) mkyaffsimage for yaffs1 was pretty straight formward (I wrote it in one
night), and various patches have been added. It still needs some tinkering
however. The main reason for this is that mkyaffsimage dumps a binary of the
file system data + OOB areas. Since this includes ECC etc, this is a bit of a
problem since mkyaffsimage does not know what ECC strategy you will really be
using. Thus, if you use mkyaffsimage you really need to fiddle a bit to make
sure the ECC bytes being put into the image file match what your hardware
will use.

The above problem is made worse for YAFFS2 because the page size is variable
and the AUTOPLACE makes the OOB stuff even more variable. Thus, perhaps the
best that can be offered is something along the lines of mkyaffsimage for
yaffs1 with even more disclaimers (ie. even more stuff that the system
integrator must configure. An alternative is to store the image in the
data+tags form and the mkyaffs or similar process then does the actual OOB
placement.

There is an alternative process that can be used in the interim to make an
image by using a target device:
a) Erase the flash on the target.
b) Mount it.
c) Use nfs or whatever to copy the required files onto the fs.
d) Unmount.
e) Use nanddump to suck an image off the nand.
f) Remove all bad blocks and empty blocks from the image.

This should leave an image file that can be sent to a manufacturing house etc
to load NAND parts for a shipping device.


2) There is currently no yboot equivalent for YAFFS2 in CVS. However,
achieving this is not particularly hard (though it is a bit more complex than
yaffs1). I see Nick Bane has done something at
http://husaberg.toby-churchill.com/balloon/releases/development/bootldr/bootldr35/

which might help.

-- Charles