|
Embedded Linux Primer: A Practical, Real-World ApproachJFFS2 Root File System Creating a JFFS2 root file system is a straightforward process. In addition to compression, JFFS2 supports wear leveling, a feature designed to increase Flash lifetime by fairly distributing the write cycles across the blocks of the device. As pointed out in Chapter 9, Flash memory is subject to a limited number of write cycles. Wear leveling should be considered a mandatory feature in any Flash-based file system you employ. As mentioned elsewhere in this book, you should consider Flash memory as a write-occasional medium. Specifically, you should avoid allowing any processes that require frequent writes to target the Flash file system. Be especially aware of any logging programs, such as syslogd. We can build a JFFS2 image on our development workstation using the ext2 image we used on our Redboot RootFS partition. The compression benefits will be immediately obvious. The image we used in the previous RootFS example was an ext2 file system image. Here is the listing in long (-l) format: # ls -l rootfs.ext2 -rw-r--r-- 1 root root 6291456 Nov 19 16:21 rootfs.ext2 Now let's convert this file system image to JFFS2 using the mkfs.jffs2 utility found in the MTD package ...» | Код для вставки книги в блог HTML
phpBB
текст
|
|