Move ext4_fs_set_inode_data_block_index to module internals
[lwext4.git] / readme.mediawiki
1 ==About==
2
3 The main goal of the lwext4 project is to provide ext2/3/4 filesystem for microcontrollers. It may be an interesting alternative for traditional MCU filesystem libraries (mostly based on FAT32).
4
5 Lwext4 may be used with SD/MMC card, USB flash drive or other block based memory device. However it is not good for flash memory–based storage devices.
6
7 Code is also available on github:
8 https://github.com/gkostka/lwext4
9
10 Feel free to contact me:
11 kostka.grzegorz@gmail.com
12
13 ==Minimum memory requirements==
14 * .text:  20KB - 40KB (dependent of feature set chosen)
15 * .data:  8KB         (minimum 8 x 1KB  block cache)
16 * .stack: 2KB
17
18
19 ==ext2/3/4 vs FAT32==
20 ;ext2/3/4 > FAT32
21 * fast fseek on big file (in FAT32 fseek equals many IO operations)
22 * ext2/3/4 HTREE directory operations (like find entry) are faster
23 * fast extent big file allocation (truncate/remove)
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 The most of the source code of lwext4 was taken from HelenOS:
32 * http://helenos.org/
33 Some features are based on FreeBSD and Linux implementations.
34
35 ==Supported ext2/3/4 fs features==
36 ;Features incompatible (unable to mount when NOT supported):
37 *  compression: no
38 *  filetype: yes
39 *  recover: no (could be ignored)
40 *  journal_dev: no
41 *  meta_bg: yes
42 *  extents: yes
43 *  64bit: yes
44 *  mmp: no (could be ignored)
45 *  flex_bg: yes
46 *  ea_inode: no
47 *  dirdata: no
48 *  bg_meta_csum: no
49 *  largedir: no
50 *  inline_data: no
51 ;Features compatible (mount when NOT supported is possible):
52 *  dir_prealloc: no
53 *  imagic_inodes: no
54 *  has_journal: no
55 *  ext_attr: no (work in progress)
56 *  resize_inode: no
57 *  dir_index: yes
58 ;Features read-only (mount in RO mode when NOT supported):
59 *  sparse_super: yes
60 *  large_file: yes
61 *  btree_dir: yes (obsolete)
62 *  huge_file: yes
63 *  gdt_csum: yes
64 *  dir_nlink: yes
65 *  extra_isize: yes
66 *  quota: no
67 *  bigalloc: no
68 *  metadata_csum: no (to be done ...)
69
70 ==Supported filetypes:==
71 * FIFO:      no
72 * CHARDEV:   no
73 * DIRECTORY: yes
74 * BLOCKDEV:  no
75 * FILE:      yes (hardlinks supported)
76 * SOFTLINK:  yes
77 * SOCKET:    no
78
79 ==Other==
80  - block_size: 1KB, 2KB, 4KB ... 64KB
81  - little/big endian architecture support
82
83 ==Project tree==
84 *  blockdev         - block devices set, supported blockdev
85 *  demos            - demo directory sources
86 *  lwext4           - internals of the lwext4 library
87 *  toolchain        - specific toolchain cmake files
88 *  CMakeLists.txt   - CMake config file
89 *  ext_images.7z    - compressed ext2/3/4 100MB images
90 *  fs_test.mk       - automatic tests definitions
91 *  Makefile         - helper makefile to trigger cmake, tests
92 *  readme.mediawiki - readme file
93   
94 ==Compile: Windows==
95 Requirements:
96 * CMake:  http://www.cmake.org/cmake/resources/software.html
97 * MinGw:  http://www.mingw.org/
98 * GnuWin: http://gnuwin32.sourceforge.net/ 
99
100 ;Create CMake files:
101  make
102
103 ;Remove CMake files:
104  clean
105
106 ;Build
107  cd build_generic
108  make
109
110 ==Compile: Linux==
111
112 Requirements:
113 * CMake:  http://www.cmake.org/cmake/resources/software.html
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 ==Generic demo application==
126 Features:
127 * load ext2/3/4 images
128 * load linux block device with ext2/3/4 part
129 * load windows volume with ext2/3/4 filesystem 
130 * directory speed test
131 * file write/read speed test
132
133 How to use:
134 Windows/Linux fileimages:
135  cd build_generic
136  generic --in ext2 
137
138 Windows volumes:
139  cd build_generic
140  generic --in I: --wpart
141
142 Linux block devices:
143  cd build_generic
144  generic -i /dev/your_block_device
145
146 ==Build and run automatic tests==
147 Build and run automatic tests
148 Build automatic test tools:
149  make
150  cd build_generic
151  make
152 Uncompress ext/2/3/4 images:
153  make unpack_images
154 Run server app for predefined images:
155  make server_ext2
156  make server_ext3
157  make server_ext4
158 Run tests:
159  make test
160
161 ==Cross-Compile standalone library==
162 Build bf518 library:
163  make bf518
164  cd build_bf518
165  make lwext4
166
167 Build avrxmega7 library:
168  make avrxmega7
169  cd build_avrxmega7
170  make lwext4
171
172 Build cortex-m0 library:
173  make cortex-m0
174  cd build_cortex-m0
175  make lwext4
176
177 Build cortex-m3 library:
178  make cortex-m3
179  cd build_cortex-m3
180  make lwext4
181
182 Build cortex-m4 library:
183  make cortex-m4
184  cd build_cortex-m4
185  make lwext4
186