For most new embedded Linux products, choose eMMC: it gives you a plain block device, large capacity and a mature software path, and it moves wear-levelling and bad-block handling into the device. Choose raw SLC NAND with UBI when the image is small, the product must run for many years with frequent writes, and you need full visibility and control of how the flash is managed. The main trade-off is control versus convenience: eMMC hides the flash management inside vendor firmware that you cannot inspect, while raw NAND makes that management your software’s responsibility.
The eMMC vs raw NAND decision is usually made early, often by the hardware team, and it is expensive to reverse once boards are in production. It decides which kernel subsystem owns your storage, which filesystems you can use, and how you find out that the flash is wearing out.
The context
Both options are built on NAND flash cells, and NAND has three properties that some layer must handle: blocks wear out after a limited number of erase cycles, some blocks are bad from the factory and more fail later, and stored bits can flip, so data needs error-correcting codes (ECC) and must be moved before errors become uncorrectable. The question is where that flash management runs.
With raw NAND, the SoC’s NAND controller and Linux handle these properties. With eMMC, a controller and firmware inside the eMMC package handle them, and Linux sees an ordinary block device. The deciding forces are capacity, write volume over the product’s life, service life and supply duration, the need to observe and test flash behaviour, SoC boot support, and team experience.
The options
Option 1: eMMC (managed NAND)
An eMMC device contains NAND flash, usually MLC or TLC, together with a controller that runs a flash translation layer (FTL). As the PHYTEC eMMC guide describes it, the FTL handles wear-levelling, block management and ECC for the raw flash. Linux drives it through the MMC subsystem and presents it as /dev/mmcblkN, so you can use ext4, f2fs, squashfs, dm-verity and any other block-device feature.
eMMC also provides hardware partitions: two boot partitions (boot0 and boot1) that many SoC boot ROMs can load the bootloader from, and an RPMB partition for authenticated, replay-protected storage. Many parts support an enhanced user area, often implemented as pseudo-SLC (pSLC), which trades capacity for endurance on a region you choose.
- Advantages: large capacity per part; standard block-device software path; wear and bad blocks handled inside the device; boot partitions and RPMB; lifetime estimates reported by the device; wide availability from several vendors.
- Disadvantages: the FTL is closed vendor firmware, so its behaviour under power loss and its write amplification cannot be inspected; behaviour can differ between vendors and part revisions; the lifetime report is an estimate made by that same firmware; some configuration, such as the enhanced area, can be set only once.
Option 2: Raw NAND with MTD and UBI
Raw NAND, either parallel NAND on the SoC’s NAND controller or SPI-NAND on a SPI controller, is exposed by the kernel’s MTD subsystem as an MTD device, not a block device. The host must provide ECC of the strength the chip requires. On top of MTD you run UBI, which the linux-mtd documentation describes as a volume management system for raw flash devices. UBI substitutes reserved blocks when a block goes bad, performs wear-levelling across the whole chip, keeps an erase counter for every physical eraseblock, and moves data away from blocks that show bit-flips (scrubbing). You then run UBIFS on a UBI volume, or a read-only filesystem such as squashfs through the UBI block layer.
One limit is important. UBI and UBIFS were designed for SLC NAND and NOR flash. Since upstream commit b5094b7f135b (“ubi: Reject MLC NAND”), which was also backported to the 4.14 stable series, UBI refuses to attach to an MTD device that reports itself as MLC NAND. The commit message states that UBI and UBIFS may appear to work on MLC NAND but are likely to lose data on a power cut or through read and write disturb. In practice, the raw NAND option means SLC NAND.
- Advantages: flash management runs in open-source code that you can read, configure and test; UBI’s behaviour on power cuts is documented and testable; erase counters and bit-flip handling are visible to you; SLC cells have higher endurance than MLC or TLC; no hidden firmware that can change between part revisions.
- Disadvantages: SLC parts are offered in smaller capacities than eMMC; ECC strength, timing and on-flash layout must be configured correctly and identically in the boot ROM, the bootloader and the kernel; UBI attach time grows with flash size, because by default UBI scans the device at attach time; fewer engineers have MTD and UBI experience than block-device experience; the image format changes (UBI images built with
ubinizeinstead of partitioned disk images).
UBI fastmap (CONFIG_MTD_UBI_FASTMAP) reduces attach time on large devices, but its Kconfig help text still describes it as experimental and advises “If in doubt, say N”. Plan to measure attach time on your real part size instead of assuming fastmap will solve it.
The decision: eMMC vs raw NAND for the common case
For the common case, choose eMMC. Most current products need more storage than SLC NAND parts provide comfortably, because they carry a full root filesystem, an A/B update layout, AI models or application containers. eMMC gives you that capacity with a standard block-device path, and the filesystem, update and security tooling in Yocto and Buildroot is built around block devices. Combine it with a read-only root filesystem, keep frequent writes in a separate data partition, and monitor the device’s lifetime estimate in the field.
If the data partition will see heavy writes, evaluate the enhanced user area for that region early. The mmc-utils manual marks enh_area set and write_reliability set as one-time programmable, irreversible changes, and the PHYTEC guide notes that on Micron parts the enhanced attribute halves the capacity of the region. This must be decided at the factory programming stage, not after deployment.
Choose raw SLC NAND with UBI when most of the following are true:
- The complete image, including both update slots if you use A/B updates, fits comfortably in the SLC capacity you can buy for the whole supply period.
- The product writes frequently for a long service life, and you must be able to show how flash wear and power-cut recovery are handled, for example for an industrial or regulated product.
- You need to test flash behaviour on power loss against code you can read, rather than trust vendor firmware.
- Your SoC and bootloader already support the NAND or SPI-NAND part well, and your team has MTD and UBI experience.
A common variant is a small SPI-NOR flash for the bootloader with eMMC for everything else. It separates the boot path from the main storage at the cost of one more part.
Consequences
If you choose eMMC
You depend on vendor firmware that you cannot inspect. When purchasing changes the eMMC vendor or part revision, run your power-cut and endurance tests again. You also need to monitor wear. eMMC 5.0 and later devices report lifetime estimates in EXT_CSD bytes 267 to 269, and since commit 46bc5c408e4e the kernel exports them in sysfs as pre_eol_info and life_time.
raghu@techveda.org:~$ cat /sys/bus/mmc/devices/mmc0:*/life_time
0x01 0x01
raghu@techveda.org:~$ cat /sys/bus/mmc/devices/mmc0:*/pre_eol_info
0x01
raghu@techveda.org:~$ sudo mmc extcsd read /dev/mmcblk0 | grep -A 1 LIFEThe output above is an example. The congatec application note AN50 explains the values: life_time reports two estimates, type A for the normal cells and type B for cells in enhanced (pSLC) mode, from 0x01 (up to 10% of lifetime used) to 0x0B (lifetime exceeded). pre_eol_info reports reserved-block consumption: 0x01 normal, 0x02 warning at 80%, and 0x03 urgent at 90%. The same note warns that the eMMC becomes read-only when all reserved blocks are consumed. Report these values in your device telemetry, so that wear is visible before it becomes a field failure.
If you choose raw NAND
You own the flash management configuration from the boot ROM to user space. ECC settings must match in every component that reads the flash. You must budget boot time for UBI attach and measure it on the largest part you might buy. Your build produces UBI images, and your update tool must be configured for UBI volumes, which RAUC and SWUpdate both support. Capacity is a hard limit: a later feature that needs more storage may require a hardware change.
In return, your storage behaviour is something you can read in source code, test under power cuts, and explain in a design review. For a long-lived product with frequent writes, that can be worth more than capacity. To choose the filesystem once the medium is decided, see the earlier post on choosing a root filesystem format for embedded Linux, and for the partition layout, where writable state should live on a read-only root. Storage selection and board bring-up are part of our Embedded Linux BSP Development course.
Key takeaways
- The eMMC vs raw NAND decision is about where flash management runs: inside vendor firmware or in open-source kernel code (MTD and UBI).
- eMMC is the right default when you need capacity and a standard block-device path.
- Raw NAND in practice means SLC NAND, used for small images, long service life and frequent writes; UBI refuses to attach to MLC NAND.
- With eMMC, decide on the enhanced area before production and monitor
life_timeandpre_eol_infoin the field. - With raw NAND, keep ECC configuration identical across boot ROM, bootloader and kernel, and measure UBI attach time on the real part.
Frequently asked questions
Can I run UBIFS on eMMC?
No. UBI and UBIFS are designed for raw flash exposed through MTD. eMMC is a block device with its own flash translation layer, so you use a block filesystem such as ext4, f2fs or squashfs on it.
Can I use MLC raw NAND with UBI?
Not in mainline. Since commit b5094b7f135b, UBI refuses to attach to MTD devices that report MLC NAND, because UBI and UBIFS were designed for SLC NAND and NOR flash and are likely to lose data on MLC NAND after a power cut or through read and write disturb.
How do I know when an eMMC is wearing out?
Read the device’s lifetime estimates. The kernel exports them in sysfs as life_time and pre_eol_info, and mmc-utils shows them with “mmc extcsd read”. life_time runs from 0x01 (up to 10% of lifetime used) to 0x0B (lifetime exceeded), and pre_eol_info reports 0x02 at 80% and 0x03 at 90% of reserved blocks consumed.
Should I enable pSLC (the enhanced user area) on eMMC?
Consider it for a region with heavy writes, but decide before production. mmc-utils marks the enh_area setting as a one-time programmable, irreversible change, and on some parts the enhanced attribute halves the capacity of the region.
Further reading
- linux-mtd: UBI — Unsorted Block Images
- ubi: Reject MLC NAND (upstream b5094b7f135b, 4.14 stable backport)
- linux-mtd discussion of the MLC rejection patch
- LKDDB: CONFIG_MTD_UBI_FASTMAP help text
- mmc: core: Export device lifetime information through sysfs (46bc5c408e4e)
- Kernel documentation: SD and MMC device attributes
- mmc-utils manual page (mmc.1)
- PHYTEC: eMMC devices (phyCORE-AM62x guide)
- congatec AN50: eMMC lifetime




