F2FS Filesystem support on HIKEY960

Hi,

I’m using HIKEY 960 and wanted to use F2FS file system for /data partition.
Does anybody have tried F2FS filesystem for /data partition ?

I have done the below changes, but still /data partition not mounted.

  • Modified fstab.hikey960 “dev/block/sdd13 /data f2fs nosuid,nodev,discard wait”
  • Enabled F2FS on kernel
  • I have also tried to modify the BoardConfigCommon.mk with
    BOARD_USERIMAGES_FILE_SYSTEM_TYPE := f2fs, but not able to compile when we give this option.it throws as unknown file system type

thank you
vijay
Vijay

Can you put some build logs in a pastebin somewhere? It is very unclear from this question what tools it is that “throws an unknown file system type”.

I have a similar issue, as I’d like to use F2FS file system for /data partition, instead of ext4.

Besides the following:

  • Modify fstab.hikey960 “dev/block/sdd13 /data f2fs nosuid,nodev,discard wait”
  • Enable F2FS on kernel

what else should I modify to enable f2fs?

Actually I tried adding to BoardConfigCommon.mk:

BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
TARGET_USERIMAGES_USE_F2FS := true

but I get the following build error:


error: failed to build out/target/product/hikey960/obj/PACKAGING/systemimage_intermediates/system.img from out/target/product/hikey960/system
Error: unknown filesystem type ‘’
_Out of space? the tree size of out/target/product/hikey960/system is (MB): _
833 out/target/product/hikey960/system
The max is 2640 MB.
ninja: build stopped: subcommand failed.
15:17:43 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1

#### make failed to build some targets (02:47 (mm:ss)) ####

As with the original poster, if you abridge the logs we can’t see what tool is being used to attempt to construct the system image (the lines before the error tell us what tool it is that is being run).

Here below what I get after “make -j32”:

Finally I was able to compile successfully just downloading the latest Android BSP source code and board base firmware.

The following worked for me:

make BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE=f2fs TARGET_USERIMAGES_USE_F2FS=true -j32

Thank you very much.With your help,I format the /data partition to F2FS under AOSP version P on Hikey960.

Given that you have “no idea how to deal with it”, it doesn’t seem like the kind of starting point that would be able to answer the question “WHY?”. Do you perceive there to be something wrong with ext4? Ext4 is a mature, reliable, and fast filesystem. F2fs scares the crap out of me.

@MaxZ has already been kind enough to post a guide to this thread (it is just above your own post and is followed by a success report from someone else following this guide).

HI
Did you change the BoardConfigCommon.mk and fstab.hikey960?
or you just use this make command and didn’t change those two files?

Sadly, after I successfully brushed the data partition into F2FS, the recent replacement failed. Does anyone know if there is any new one to modify or add?

You need to just use the make command mentioned above. No need to change the other files.