[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Read-only Cache for JFFS
> Hi Dan,
> If you can send me a patch or even the code under fs/jffs tar-
> I'd very much like to give it a try.
I haven't forgotten. Attached is a tar'd copy of the Read Only
Node Cache code. It is the JFFS directory and the jffs.h from
the include directory.
To get this to work:
1) Build a normal jffs image using mkfs.jffs - jffs_image.bin.
2) Determine the erase size for your architecture - 64K.
3) head -c 65636 jffs_cash.bin > head.bin
4) cat head.bin jffs_image.bin > jffs_image_cache.bin
5) Download jffs_image_cache.bin to the appropriate partition
at the start address for the MTD partition.
6) Compile a new kernel.
7) On target: mount -r -t jffs /dev/mtdblock? /mnt
JFFS will find the cache at the start of the partition and
once it completes the scanflash() it will write the node
cache in the area at the start of the partition.
The next time the card boots up the mount will occur
very quickly. Mounting RW will clear the cache. It will
be recreated the next time it is mounted RO.
This code is compatible with partitions that don't have
The Late Night Software Shop
Sign up today for your Free E-mail at: http://www.canoe.ca/CanoeMail