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