How To Guide
How to boot from ROM
Using the Flash Translation Layer (FTL)
|
|
Using the Flash Translation Layer (FTL)
As mentioned in Flash file systems, FTL has been largely superseded by JFFS2 for technical and legal reasons. If these do not apply in your circumstances, here are some brief instructions on how to use FTL.
To begin with initialize the FTL (no explicit erase is required as ftl_format does this automatically):
target# ftl_format /dev/mtd2 |
|
|
This is now treated as a normal block device. As the Flash is normally only scanned for new FTL partitions at boot time, it may be necessary to reboot the target at this point.
You can now treat the FTL partition as a single large block device. As the first FTL device, it will be mapped to /dev/ftla. For example:
target# mkfs.minix /dev/ftla target# mount /dev/ftla /mnt |
|
|
Alternatively, FTL supports partitioning, as does any normal block device. For example, fdisk can be used on the FTL device to create multiple soft partitions. In this case the partitions will be named /dev/ftla1, /dev/ftla2 and so on. For example:
target# fdisk /dev/ftla target# mkfs.ext2 /dev/ftla1 target# mount /dev/ftla1 /mnt |
|
|
|