User's Manual

© SENSITECH INC. CONFIDENTIAL – CONTROLLED DOCUMENT
Page 80 of 83
A Carrier Corp. Company
PART NUMBER T82002163
REV A
8.2.2 Formatting YAFFS Partitions
All file systems need to be formatted before they can be mounted. Because YAFFS was designed from the
ground up to work with embedded flash technologies, it understands an 'erased' flash device to be both
formatted and empty. To prepare your partition for mounting, simply use LogicLoader's 'erase' command to
erase the area of flash where the partition is to be located.
Using the example partition scheme in the “Developing a Partition Scheme” section, above, the partitions
could be prepared for initial use by erasing the regions of the flash device spanned by them.
For example (LH7A404-11 system address used): losh> erase 0x000C0000 0x00800000
losh > erase 0x00900000 0x00400000
Warning: Erasing flash blocks that will be used for YAFFS partitions will erase everything in those areas of
flash. It is not required to format the partition every time the device is rebooted. The partition should only
be formatted when an entirely new YAFFS partition is created, or when the data on a stored partition needs
to be completely erased.
8.2.3 Adding YAFFS Type Partitions
LogicLoader maintains a partition table in RAM. Before a YAFFS partition can be mounted, it must be
added to the partition table. To do this, the 'add-yaffs' command is used. The 'add-yaffs' command takes the
following arguments:
• <name> a unique string which identifies the partition
• <type> type of flash device the partition resides on
• <start> the physical starting address of the partition
• <length> the length (in bytes) of the partition
Continuing with the example partitions above, LogicLoader can be instructed to add the partitions by
executing the commands as shown below (LH7A404-11 system address used):
losh> add-yaffs boot nor 0x000C0000 0x00800000
losh> add-yaffs data nor 0x00900000 0x00400000
Note: The above steps must be performed every time LogicLoader boots. Because LogicLoader keeps the
partition table in RAM, the existence and locations of YAFFS partitions does not persist across resets or
power cycles.
8.2.4 Mounting the Partition
To mount a partition in the partition table, the 'mount' command is used. That command takes the following
arguments:
• <fstype> the type of filesystem being mounted (‘yaffs’ here)
• [drive addr] not used when mounting a YAFFS partition
• <point> the name of the YAFFS partition
For example:
losh> mount yaffs /boot