On Friday 21 October 2005 03:34, Nick Bane wrote:
> Rakhi
>
> I have some good news. It seems that I need to add yaffs2 root fs
> support for a batch of boards we have just received that have the wrong
> nands on them (2k not 512byte) so forcing the issue.
>
> Over the weekend I will probably sort out some germinal bootldr35 and
> mkyaffsimage2 code and feed it both to husaberg and the list if I get
> the time.
>
> Watch this space.
Hi Nick and Rakhi
Bootloader means many different things to different people.
To some it means the ability for the bootloader to read/write file data.
To others it means the ability for bootloader to read a boot image off
partition.
I tend to use the second term for the purpose of discssions. If, as Nick
suggests, you put the whole of YDI into the bootloader then you get both :-).
The approach of just incorporating yaffs direct is fine, but since yaffs
direct does a full scan it will likely be slower. A stripped down bootloader
will be faster, but more work to accomplish.
YAFFS1's bootloader, yboot.c, is pretty simple. In essence it is a stripped
down version of the normal scanning process. It searches for an object header
matching the name you want to read, then goes back and reads all the data
chunks associated with that file.
A YAFFS2 bootloader is slightly more complex than a YAFFS1 bootloader because
YAFFS2 has no deletion markers. Therefore when you find a chunk, you don't
know for sure that it is the most up to date one, because it might have been
replaced.
The basic strategy for a yaffs2 bootloader is outlined by the
yaffs_ScanBackwards function, but to do this for one file only. There are
unfortunately a few complications here to do with shrink headers etc that
make this non-trivial. THerefore if you have space in your boot rom,
incorporating YDI is perhaps the easiest approach.
As Nick said, most integration issues will boil down to our ECC friend.
As to the mkyaffsimage, there is very little conceptual difference between a
YAFFS1 and YAFFS2 mkyaffsimage. The only difference is in what gets written
to the tags.
-- Charles