
Arcom Embedded Linux Technical Manual File system layout
File system layout
The exact layout of the file system on an AEL system depends on the target board. In
general, the Flash includes one or more smaller partitions containing the boot loader,
along with one large partition that covers the rest of the device and contains the root (/)
file system. The partition sizes are determined from RedBoot's Flash Image System
(FIS) and can be changed from RedBoot's command line.
In addition to the Flash file systems, a RAM-based file system is mounted on /var/tmp.
Journaling Flash file system
The Flash is formatted using the Journaling Flash File System (JFFS2). This places a
compressed file system onto the Flash transparently to the user. Key features of JFFS2
include:
Direct targeting of Flash devices. •
•
•
•
•
•
Robustness.
Consistency across power failure.
No integrity scan (fsck) is required at boot time after normal or abnormal shutdown.
Explicit wear levelling.
Transparent compression.
Flash partitions appear as pseudo-block devices with major number 31, which can be
mounted using JFFS2, as follows:
# mount –t jffs2 /dev/mtdblock1 mount-point
There are a maximum of 16 partitions. These are numbered 0 to 15, and correspond to
the block devices /dev/mtdblock0 through /dev/mtdblock15. In addition, each partition
has a character device, /dev/mtdN. This is used to access advanced features of the
Flash device, such as sector locking.
Any empty (erased) Flash partition can be mounted as a JFFS2 filesystem. No special
utility is required to format the device.
Simply erase the whole of the partition using
eraseall –j, and mount as normal.
The –j option causes an empty JFFS2 filesystem to
be created rather than completely erasing the flash device. Using this option can
optimize the first mount.
JFFS2 partitions do not require an integrity check (fsck) to be performed on startup,
after either normal or abnormal shutdown. The supplied /sbin/fsck.jffs2 is a dummy
which always succeeds and is present to simplify the boot scripts.
Although JFFS2 is a journaling file system, this does not preclude the loss of data. The
file system remains in a consistent state across power failure and is always mountable.
However, if the board is powered down during a write, the incomplete write is rolled-
back on the next boot. Any completed writes are not affected.
For more information about JFFS2, see sources.redhat.com/jffs2
.
© 2006 Arcom Issue G 11
Comentarios a estos manuales