xref: /aosp_15_r20/external/f2fs-tools/README (revision 59bfda1f02d633cd6b8b69f31eee485d40f6eef6)
1*59bfda1fSAndroid Build Coastguard WorkerF2FS format utility
2*59bfda1fSAndroid Build Coastguard Worker---------------------
3*59bfda1fSAndroid Build Coastguard Worker
4*59bfda1fSAndroid Build Coastguard WorkerTo use the f2fs filesystem, you should format the storage partition
5*59bfda1fSAndroid Build Coastguard Workerwith this utility. Otherwise, you cannot mount f2fs.
6*59bfda1fSAndroid Build Coastguard Worker
7*59bfda1fSAndroid Build Coastguard WorkerBefore compilation
8*59bfda1fSAndroid Build Coastguard Worker------------------
9*59bfda1fSAndroid Build Coastguard Worker
10*59bfda1fSAndroid Build Coastguard WorkerYou should install the following packages.
11*59bfda1fSAndroid Build Coastguard Worker - libuuid-devel or uuid-dev
12*59bfda1fSAndroid Build Coastguard Worker - autoconf
13*59bfda1fSAndroid Build Coastguard Worker - libtool
14*59bfda1fSAndroid Build Coastguard Worker - libselinux1-dev
15*59bfda1fSAndroid Build Coastguard Worker
16*59bfda1fSAndroid Build Coastguard WorkerInitial compilation
17*59bfda1fSAndroid Build Coastguard Worker-------------------
18*59bfda1fSAndroid Build Coastguard Worker
19*59bfda1fSAndroid Build Coastguard WorkerBefore initial compilation, autoconf/automake tools should be run.
20*59bfda1fSAndroid Build Coastguard Worker
21*59bfda1fSAndroid Build Coastguard Worker # ./autogen.sh
22*59bfda1fSAndroid Build Coastguard Worker
23*59bfda1fSAndroid Build Coastguard WorkerHow to compile
24*59bfda1fSAndroid Build Coastguard Worker--------------
25*59bfda1fSAndroid Build Coastguard Worker
26*59bfda1fSAndroid Build Coastguard Worker # ./configure
27*59bfda1fSAndroid Build Coastguard Worker # make
28*59bfda1fSAndroid Build Coastguard Worker # make install
29*59bfda1fSAndroid Build Coastguard Worker
30*59bfda1fSAndroid Build Coastguard WorkerHow to cross-compile (e.g., for ARM)
31*59bfda1fSAndroid Build Coastguard Worker------------------------------------
32*59bfda1fSAndroid Build Coastguard Worker
33*59bfda1fSAndroid Build Coastguard Worker 1. Add the below line into mkfs/Makefile.am:
34*59bfda1fSAndroid Build Coastguard Worker mkfs_f2fs_LDFLAGS = -all-static
35*59bfda1fSAndroid Build Coastguard Worker
36*59bfda1fSAndroid Build Coastguard Worker 2. Add the below line into fsck/Makefile.am:
37*59bfda1fSAndroid Build Coastguard Worker fsck_f2fs_LDFLAGS = -all-static
38*59bfda1fSAndroid Build Coastguard Worker
39*59bfda1fSAndroid Build Coastguard Worker 3. then, do:
40*59bfda1fSAndroid Build Coastguard Worker # LDFLAGS=--static ./configure \
41*59bfda1fSAndroid Build Coastguard Worker	--host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi
42*59bfda1fSAndroid Build Coastguard Worker # make
43*59bfda1fSAndroid Build Coastguard Worker
44*59bfda1fSAndroid Build Coastguard WorkerHow to run by default
45*59bfda1fSAndroid Build Coastguard Worker---------------------
46*59bfda1fSAndroid Build Coastguard Worker
47*59bfda1fSAndroid Build Coastguard Worker $ mkfs.f2fs -l [LABEL] $DEV
48*59bfda1fSAndroid Build Coastguard Worker
49*59bfda1fSAndroid Build Coastguard WorkerFor more mkfs options, see the man page.
50