Now we know several options for file systems we can use,
and know how to create the corresponding images.
But how can we decide which one to chose?
For practical purposes in embedded systems
the following criteria are often essential:
- boot time
(i. e. time needed from power on until application code is running)
- flash memory footprint
- RAM memory footprint
- effects on software updates
The following data was measured for the different configurations.
All measurements were performed on the same TQM860L board (MPC860 CPU
at 50 MHz, 16 MB RAM, 8 MB flash, 256 MB CompactFlash card):
| File System Type || Boot Time || Free Mem || Updates || while running |
| JFFS2 || 21.4 sec || 10.3 MB || per file || only non-active files |
| cramfs || 10.8 sec || 10.3 MB || whole image || no |
| ext2 (ro) || 9.1 sec || 10.8 MB || whole image || no |
| ext2 on CF (ro) || 9.3 sec || 10.9 MB || whole image || no |
| ramdisk || 16.3 sec || 6.58 MB || whole image || yes |
| File on FAT fs || 11.4 sec || 7.8 MB || whole image || yes |
As you can see, the ramdisk solution is the worst of all
in terms of RAM memory footprint;
also it takes a pretty long time to boot.
However, it is one of the few solutions that allow an in-situ
update while the system is running.
JFFS2 is easy to use as it's a writable file system
but it takes a long
time to boot.
A read-only ext2 file system shines when boot time and RAM memory
footprint are important; you pay for this with an increased flash memory
External flash memory devices like CompactFlash cards or USB memory
sticks can be cheap and efficient solutions especially when
lots of data need to be stored or when easy update procedures are required.