blob: afe334fc617034dfee24863a53ff0b261267306a [file] [log] [blame]
John A. Leuenhagenff7172e2020-12-17 04:14:57 -05001F2FS format utility
Jaegeuk Kim036d45e2012-10-26 21:56:34 +09002---------------------
3
John A. Leuenhagenff7172e2020-12-17 04:14:57 -05004To use the f2fs filesystem, you should format the storage partition
5with this utility. Otherwise, you cannot mount f2fs.
Jaegeuk Kim036d45e2012-10-26 21:56:34 +09006
Jaegeuk Kim99b74392012-10-30 07:35:00 +09007Before compilation
8------------------
9
Jaegeuk Kimbb912282016-11-14 16:31:38 -080010You should install the following packages.
Jaegeuk Kim99b74392012-10-30 07:35:00 +090011 - libuuid-devel or uuid-dev
Jaegeuk Kim28af0212013-01-24 02:22:13 +090012 - pkg-config
13 - autoconf
Jaegeuk Kim11d187c2013-12-16 12:32:37 +090014 - libtool
Jaegeuk Kim603f8f92015-12-09 16:18:44 -080015 - libselinux1-dev
Jaegeuk Kim99b74392012-10-30 07:35:00 +090016
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090017Initial compilation
18-------------------
19
John A. Leuenhagenff7172e2020-12-17 04:14:57 -050020Before initial compilation, autoconf/automake tools should be run.
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090021
Jaegeuk Kimbb912282016-11-14 16:31:38 -080022 # ./autogen.sh
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090023
24How to compile
25--------------
26
27 # ./configure
28 # make
Jaegeuk Kimbb912282016-11-14 16:31:38 -080029 # make install
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090030
Jaegeuk Kim050e8712013-10-17 15:15:54 +090031How to cross-compile (e.g., for ARM)
32------------------------------------
33
34 1. Add the below line into mkfs/Makefile.am:
35 mkfs_f2fs_LDFLAGS = -all-static
36
37 2. Add the below line into fsck/Makefile.am:
38 fsck_f2fs_LDFLAGS = -all-static
39
40 3. then, do:
41 # LDFLAGS=--static ./configure \
42 --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi
43 # make
44
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090045How to run by default
46---------------------
47
Jaegeuk Kimbb912282016-11-14 16:31:38 -080048 $ mkfs.f2fs -l [LABEL] $DEV
Jaegeuk Kim036d45e2012-10-26 21:56:34 +090049
John A. Leuenhagenff7172e2020-12-17 04:14:57 -050050For more mkfs options, see the man page.