Add const keyword to mountpoint parameter
[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 - 30KB (dependent of feature set chosen)
15 * .data:  8KB
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
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
69
70 ==Supported filetypes:==
71 * FIFO:      no
72 * CHARDEV:   no
73 * DIRECTORY: yes
74 * BLOCKDEV:  no
75 * FILE:      yes
76 * SOFTLINK:  no
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 --in /dev/your_block_device
145
146 Usage:                                                          
147  --i   - input file              (default = ext2)            
148  --rws - single R/W size         (default = 1024 * 1024)     
149  --rwc - R/W count               (default = 10)                     
150  --cache  - 0 static, 1 dynamic  (default = 1)               
151  --dirs   - directory test count (default = 0)               
152  --clean  - clean up after test                              
153  --bstat  - block device stats                               
154  --sbstat - superblock stats                                 
155  --wpart  - windows partition mode                           
156
157 ==Build and run automatic tests==
158 Build and run automatic tests
159 Build automatic test tools:
160  make
161  cd build_generic
162  make
163 Uncompress ext/2/3/4 images:
164  make unpack_images
165 Run server app for predefined images:
166  make server_ext2
167  make server_ext3
168  make server_ext4
169 Run tests:
170  make all_tests
171
172 ==Cross-Compile standalone library==
173 Build bf518 library:
174  make bf518
175  cd build_bf518
176  make lwext4
177
178 Build avrxmega7 library:
179  make avrxmega7
180  cd build_avrxmega7
181  make lwext4
182
183 Build cortex-m0 library:
184  make cortex-m0
185  cd build_cortex-m0
186  make lwext4
187
188 Build cortex-m3 library:
189  make cortex-m3
190  cd build_cortex-m3
191  make lwext4
192
193 Build cortex-m4 library:
194  make cortex-m4
195  cd build_cortex-m4
196  make lwext4
197
198 ==Demos==
199 * STM32F429-DISCO USB flash drive Demo
200 * ChibiOS demo applications
201  
202 Build STM32F429 Demo:
203  make cortex-m4
204  cd build_cortex-m4
205  make all