Skip to contentSkip to conversation

f2fs support

Buildroot Victor Hiairrassary 2 participants 3 messages May 26, 2013 – May 27, 2013

lore
Share & tools
lore
#0 lore raw

Hello all,

I am trying to add support for f2fs file system in buildroot. For now I have already added f2fs-tools for the host, i.e. mkfs.f2fs.

But I cannot create a f2fs file system image since mkfs.f2fs takes a device as parameter (/dev/sda1 for example). This is different than jffs2's syntax : '$(MKFS_JFFS2) -d $(TARGET_DIR) -o $@' for example, which takes a directory as input.

Does anybody have an idea about this issue?

Best regards,
Victor Hiairrassary

#1 lore raw

Victor, All,

On 2013-05-27 00:08 +0200, Victor Hiairrassary spake thusly:

Quoted 9 lines

I am trying to add support for f2fs file system in buildroot. For now I have already added f2fs-tools for the host, i.e. mkfs.f2fs.

But I cannot create a f2fs file system image since mkfs.f2fs takes a device as parameter (/dev/sda1 for example). This is different than jffs2's syntax : '$(MKFS_JFFS2) -d $(TARGET_DIR) -o $@' for example, which takes a directory as input.

Does anybody have an idea about this issue?

Yes, I encountered the same issue when I tried. Since I did not really need it, I skipped it.

AFAIK, there is currently no way to generate f2fs images like we do for the other filesystems, like ext2, squashfs or jffs2.

The only solution would be to use a post-image script that would basically do something like:

- dd if=/dev/zero of=image.f2fs bs=1M count=0 seek=${size_in_MiB}
- mkfs.f2fs image.f2fs
- sudo mount -o loop image.f2fs /somewhere
- cp foo bar /somewhere
- sudo umount /somewhere

Otherwise, no idea, except do your own genf2fs util.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw
Quoted 15 lines · Yann E. MORIN

Yes, I encountered the same issue when I tried. Since I did not really need it, I skipped it.

AFAIK, there is currently no way to generate f2fs images like we do for the other filesystems, like ext2, squashfs or jffs2.

The only solution would be to use a post-image script that would basically do something like:

- dd if=/dev/zero of=image.f2fs bs=1M count=0 seek=${size_in_MiB}
- mkfs.f2fs image.f2fs
- sudo mount -o loop image.f2fs /somewhere
- cp foo bar /somewhere
- sudo umount /somewhere

Quoted 5 lines

Otherwise, no idea, except do your own genf2fs util.

Regards,
Yann E. MORIN.

Oh :( This is a bad new, but thank you for your answer and your example.

There is a mailing list for f2fs development at :
linux-f2fs-devel at lists.sourceforge.net.
Do you think it is a good idea to ask about that?

Regards,
Victor Hiairrassary