Boot CIV with Flash Friendly File System

Flash Friendly File System is a file system specially created for flash memory. The motive of it was to build a file system that takes into account the characteristics of NAND flash memory-based storage, which is widely used in computer systems ranging from mobile devices to servers. Flexible IO tester benchmarking in Celadon has shown that F2FS has outperformed EXT4 in random read with 25% improvement and random write with 11% improvement. Celadon has the support to mount data partitions with F2FS but EXT4 remains the default.

Steps to enable F2FS in the kernel

  1. The following kernel configs need to be enabled to configure F2FS in the kernel:

  2. Execute the command shown below in an adb shell during runtime to check if F2FS is enabled in the kernel:

    $ cat /proc/filesystems | grep f2fs

Steps to enable F2FS in Celadon

  1. To enable F2FS explicitly, update the config file device/intel/project-celadon/$<lunch-target>/mixins.spec in the device config project as follows:

    disk-bus: auto

    The following parameter has been added within the brackets in the previous configuration setting:

    data\_use\_f2fs : optional
    This flag defines whether the data partition needs to be mounted
    with F2FS.
    DEFAULT: false
  2. Revert the patch shown below by updating the flashfiles mixin group device/intel/groups/flashfiles:

    commit 2786ca9cf496d31743674c4273dda9d5ce9958ca
    Author: Tian Baofeng <>
    Date: Thu Aug 8 14:29:31 2019 +0800
       flashfiles: format data partition to f2fs filesystem
       After enabling F2FS filesystem in data partition, OS
       can not boot to UI due to userdata partition mounting failure
       with F2FS filesystem format.
       This patch changed flash json file configuration to make
       data partition being formatted to F2FS when flashfiles package
       being flashed.
       Change-Id: I24b4c6815d13e6ffed7d66a52e876306ae37fbbd
       Tracked-On: OAM-84632
       Signed-off-by: Tian, Baofeng <>
       Signed-off-by: Duan, YayongX <>
       Reviewed-on: 677387

After the mixin configuration is changed, run the mixin-update script before re-building the image to apply the changes to the project device configuration. Follow the instructions in Build Celadon From Source Guide to rebuild the Celadon images.

$ device/intel/mixins/mixin-update

Steps to verify F2FS boot in Celadon

  1. After Celadon has booted, run the command shown below in an adb shell to check that the data partition has been mounted with F2FS.

    $ mount | grep data
    /dev/block/dm-8 on /data type f2fs

Storage block diagram in CIV

Figure 1 below shows the layers involved in virtualization of the storage stack. It shows the component involved in each layer of the storage virtualization stack. Broadly application layer holds on the Android/Guest OS along with the backing HALs, filesystem and block layers. QEMU provides the format and protocol layers, VFS & block layer of the Host/Ubuntu OS interact with the real hardware.


Figure 1: Storage block diagram