Hi yaffsers
After a discussion with Nick, I have started writing a make-image tool for
yaffs. Comments and advice appreciated.
What this will do is as follows:
# mk-yaffs-img dir image_file
This takes the directory "dir" and recurses through it to build a yaffs image
file containing all the files, hard links, symbolic (soft) links and
directories such that "dir" becomes the root of the yaffs image. The image
file is organised as a sequence of 528-byte (ie 512-byte data + 16-byte
spare/oob) pages to be copied into the NAND.
The tool figures out hard links, so only one copy goes into yaffs.
Symlinks are not followed, but instead are copied into the image as a symlink.
Wierd objects (eg fifos and devices) are ignored.
It should be quite simple to bootload off yaffs. Two approaches:
1. yaffs is constructed in a very partitioned way: the Linux/VFS interface,
the guts, the NAND interface. The guts is very portable and it should be
quite simple to incorporate the guts into a bootloader so that one can simply
initialise the guts and read files. Indeed, the yaffs test code talks
directly to the guts, bypassing the VFS.
2. The "guts-less" way to bootload would be to write some code which just
scans through the NAND searching for pages matching the file you want to load
and slotting them into RAM at the right places. ie something of the form:
for(page=start; page <= end; page++)
{
read page tags
if(page.objId == the file we're loading)
{
copy page into RAM at (page.chunkId - 1)*512;
}
}
-- Charles
---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (
www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by
sending an email to
yaffs-request@toby-churchill.org with the text "unsubscribe"
(without the quotes) as the subject.