e2218db4eafba35f44dda33e855664637337b896
[lwext4.git] / readme.mediawiki
1 ==About==
2
3 The main goal of the lwext4 project is to provide ext2/3/4 filesystem
4 library for microcontrolers with SD/MMC card support. Ext2/3/4, in my
5 opinion is one of the best filesystem for SD/MMC.
6
7 kostka.grzegorz@gmail.com
8
9 ==Minimum memory requirements==
10
11 =====PROGRAM:=====
12  - 20KB
13 =====RAM:=====
14  - 8KB
15 =====STACK:=====
16  - 2KB
17
18
19 ==ext2/3/4 vs FAT32==
20 ;ext2/3/4 > FAT32
21 * fseek operation on big file in FAT32 is IO heavy
22 * ext2/3/4 HTREE directories operations are faster than FAT32  
23 * ext4 extents makes truncate/remove opertion really fast
24 * more at https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout
25
26 ;ext2/3/4 < FAT32
27 * FAT32 has smaller footprint
28
29 ==Credits==
30
31 A lot of the implementation of lwext4 was taken from HelenOS:
32     http://helenos.org/
33  
34 Some of ideas and features are based on FreeBSD and Linux implementations.
35
36 ==Supported ext2/3/4 fs features==
37
38
39 ;FEATURE_INCOMPAT (unable to mount with unsupported feature):
40     compression: no
41     filetype: yes
42     recover: no (could be ignored)
43     journal_dev: no
44     meta_bg: yes
45     extents: yes
46     64bit: yes
47     mmp: no (could be ignored)
48     flex_bg: yes
49     ea_inode: no
50     dirdata: no
51     bg_meta_csum: no
52     largedir: no
53     inline_data: no
54
55 ;FEATURE_COMPAT (able to mount with unsupported feature):
56     dir_prealloc: no
57     imagic_inodes: no
58     has_journal: no
59     ext_attr: no
60     resize_inode: no
61     dir_index: yes
62
63 ;FEATURE_RO (able to mount in read only mode):
64     sparse_super: yes
65     large_file: yes
66     btree_dir: yes (obsolete)
67     huge_file: yes
68     gdt_csum: yes
69     dir_nlink: yes
70     extra_isize: yes
71     quota: no
72     bigalloc: no
73     metadata_csum: no
74
75
76 ==Supported filetypes:==
77  FIFO:      no
78  CHARDEV:   no
79  DIRECTORY: yes
80  BLOCKDEV:  no
81  FILE:      yes
82  SOFTLINK:  no
83  SOCKET:    no
84
85 ==Other==
86  - block_size: 1KB, 2KB, 4KB ... 64KB
87  - little/big endian architecture support
88
89
90 ==Project tree==
91
92  - blockdev         - block devices set, supported blockdevs
93  -- filedev         - file based block device
94  -- io_raw          - wiodows IO block device
95
96  - demos            - demo directory sources
97  -- generic         - generic demo app, used for development and and debbuging purpose
98  
99  - lwext4           - internals of the lwext4 library
100
101  - toolchain        - specific toolchain cmake files
102
103  - ext4.h           - lwext4 client library header
104  - CMakeLists.txt   - CMake config file
105  - ext_images.7z    - ext2/3/4 100MB images
106  - fs_test.mk       - automatic tests definition
107  - Makefile         - helper makefile to call cmake
108  - readme.mediawiki - yes, you are here ;)
109   
110 ==Compile: Windows==
111 ;Tools needed:
112 * CMake:  http://www.cmake.org/cmake/resources/software.html
113 * MinGw:  http://www.mingw.org/
114 * GnuWin: http://gnuwin32.sourceforge.net/ 
115
116 ;Create CMake files:
117  make
118
119 ;Remove CMake files:
120  clean
121
122 ;Build
123  cd build_generic
124  make
125
126 ==Compile: Linux==
127
128 Tools needed:
129  - CMake:  http://www.cmake.org/cmake/resources/software.html
130  
131 ;Create CMake files:
132  make
133
134 ;Remove CMake files:
135  clean
136
137 ;Build
138  cd build_generic
139  make
140
141 ==Generic demo application==
142
143 Features:
144  - load ext2/3/4 images
145  - load linux block device with ext2/3/4 part
146  - load windows volume with ext2/3/4 filesystem 
147  - directory speed test
148  - file write/read speed test
149
150 How to use:
151 Windows/Linux fileimages:
152  cd build_generic
153  generic --in ext2 
154
155 Windows volumes:
156  cd build_generic
157  generic --in I: --wpart
158
159 Linux block devices:
160  cd build_generic
161  generic --in /dev/your_block_device
162
163 Usage:                                                          
164     --i   - input file              (default = ext2)            
165     --rws - single R/W size         (default = 1024 * 1024)     
166     --rwc - R/W count               (default = 10)                     
167     --cache  - 0 static, 1 dynamic  (default = 1)               
168     --dirs   - directory test count (default = 0)               
169     --clean  - clean up after test                              
170     --bstat  - block device stats                               
171     --sbstat - superblock stats                                 
172     --wpart  - windows partition mode                           
173
174 ==Client-server automatic test suite==
175
176 Build:
177  make
178  cd build_generic
179  make
180  
181 Unpack images:
182  make unpack_images
183  
184 Run server:
185  make server_ext2
186  
187 Run tests:
188  make all_tests
189
190
191 ==Cross-Compile==
192
193  Toolchain for ARM Cortex-m3/4: https://launchpad.net/gcc-arm-embedded
194  Toolchain for Blackfin: http://blackfin.uclinux.org/doku.php
195
196 Build bf518 library:
197  make bf518
198  cd build_bf518
199  make lwext4
200
201 Build avrxmega7 library:
202  make avrxmega7
203  cd build_avrxmega7
204  make lwext4
205
206 Build cortex-m0 library:
207  make cortex-m0
208  cd build_cortex-m0
209  make lwext4
210
211 Build cortex-m3 library:
212  make cortex-m3
213  cd build_cortex-m3
214  make lwext4
215
216 Build cortex-m4 library:
217  make cortex-m4
218  cd build_cortex-m4
219  make lwext4
220
221 ==Ports==
222 STM32F429-DISCO USB flash drive Demo 
223  
224 Build STM32F429 Demo:
225  make cortex-m4
226  cd build_cortex-m4
227  make all
228
229 ==Footprint==
230
231  TOOLCHAIN: arm-none-eabi-gcc
232  OPT: Os  
233  OUTPUT:
234    text    data     bss     dec     hex filename
235    5728       0       0    5728    1660 ext4.c.obj (ex liblwext4.a)
236    2264       0       0    2264     8d8 ext4_balloc.c.obj (ex liblwext4.a)
237    1324       0       0    1324     52c ext4_bcache.c.obj (ex liblwext4.a)
238     936       0       0     936     3a8 ext4_bitmap.c.obj (ex liblwext4.a)
239    2016       0       0    2016     7e0 ext4_blockdev.c.obj (ex liblwext4.a)
240     624       0       0     624     270 ext4_block_group.c.obj (ex liblwext4.a)
241      24       0       4      28      1c ext4_debug.c.obj (ex liblwext4.a)
242    2264       0       0    2264     8d8 ext4_dir.c.obj (ex liblwext4.a)
243    3204       0       0    3204     c84 ext4_dir_idx.c.obj (ex liblwext4.a)
244    3104       0       0    3104     c20 ext4_extent.c.obj (ex liblwext4.a)
245    7360       0       0    7360    1cc0 ext4_fs.c.obj (ex liblwext4.a)
246    2496       0       0    2496     9c0 ext4_hash.c.obj (ex liblwext4.a)
247     684       0       0     684     2ac ext4_ialloc.c.obj (ex liblwext4.a)
248     652       0       0     652     28c ext4_inode.c.obj (ex liblwext4.a)
249     352       0       0     352     160 ext4_super.c.obj (ex liblwext4.a)                      
250