6
votes

I'm in charge of choosing a file system for an embedded Linux device. The device is a Freescale iMX6 running with a eMMC NAND flash memory and a kernel v3.10.17.

I plan to partition the Flash as decribed below:

Partition #1: kernel - not mounted
Partition #2: rootfs - mounted at "/" in read-only mode
Partition #3: userdata - mounted at "/home" in read-write mode

"/var" and "/tmp" directories will be mounted as tmpfs.

In some previous embedded linux projects, I used to use UBIFS on NAND flashes that were not eMMC NAND flash.

Since eMMC NAND flashes include a wear leveling feature, UBIFS should not be used with them as UBIFS' wear leveling feature may interfere with the one used by the eMMC NAND flashes.

I was planning to use ext2 or ext3 for the Partition #2 (rootfs) and ext3 for the Partition #3. I was wondering if ext3 is robust enough so my data won't get corrupted easily after a power failure of a hardreset reboot.

Does anyone have a strong backgroung with all of this and could help me to figure out what file system would be the best ?

Thanks.

2
ext3/4 is being used on most of the high/medium/low end mobile phones out there as we speak. The filesystem is by far the most tested in an embedded environment. It is widely supported upstream so it would be my best bet.spitfire88
@sanrio alvares: ext3/ext4 are definitly used with Android but chosing a filesystem also depends on what hardware is used. So this question. Thanks for your comment.A.G.

2 Answers

0
votes

cramfs and squashfs are popular for read-only embedded filesystems, because they are highly compressed in storage.

For read-write filesystems, the "normal" ones you might find on a standard Linux desktop install work well (ext3, ext4, etc.). Read about them and pick one that has a balance of overhead and error-correction, depending on what you need for your device.

For the most part the popularity of these filesystems is independent of the hardware you're using as storage -- drivers are used to actually write to the hardware; the filesystem is an abstraction layer above this.

Your comment about ubifs being inappropriate since the driver already does wear-levelling sounds correct to me. UBIFS is weird in that way. Other filesystems are pretty storage-agnostic.

0
votes

I use ext4 file-system on an eMMC device that contains user data in read/write mode on an embedded-linux system. The system shuts down by hard-reset several times a day for months now. have not witnessed problems with data consistency yet.