Add travis build link
[lwext4.git] / README.md
1 [![Build Status](https://travis-ci.org/gkostka/lwext4.svg)](https://travis-ci.org/gkostka/lwext4)
2
3 ==About==
4
5 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).
6
7 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.
8
9 Code is also available on github:
10 https://github.com/gkostka/lwext4
11
12 Feel free to contact me:
13 kostka.grzegorz@gmail.com
14
15 ==Credits==
16
17 The most of the source code of lwext4 was taken from HelenOS:
18 * http://helenos.org/
19 Some features are based on FreeBSD and Linux implementations.
20
21 KaHo Ng (https://github.com/ngkaho1234):
22 * advanced extents implementation
23 * xattr support
24 * metadata checksum suport
25 * many bugfixes & improvements
26
27 fuse-lwext4 project:
28 * https://github.com/ngkaho1234/fuse-lwext4
29
30 ==Features==
31
32 * filetypes: regular, directories, softlinks
33 * support for hardlinks
34 * multiple blocksize supported: 1KB, 2KB, 4KB ... 64KB
35 * little/big endian architectures supported
36 * multiple configurations (ext2/ext3/ext4)
37 * only C standard library dependency
38 * various CPU architectures supported (x86/64, cortex-mX, msp430 ...)
39 * small memory footprint
40
41
42 ;Memory footprint (for cortex-m4):
43 * .text:  20KB - 40KB 
44 * .data:  8KB         (minimum 8 x 1KB  block cache)
45 * .stack: 2KB
46
47 ==Supported ext2/3/4 features==
48 ;Features incompatible:
49 *  compression: no
50 *  filetype: yes
51 *  recover: no
52 *  journal_dev: no
53 *  meta_bg: yes
54 *  extents: yes
55 *  64bit: yes
56 *  mmp: no
57 *  flex_bg: yes
58 *  ea_inode: no
59 *  dirdata: no
60 *  bg_meta_csum: no
61 *  largedir: no
62 *  inline_data: no
63 ;Features compatible:
64 *  dir_prealloc: no
65 *  imagic_inodes: no
66 *  has_journal: no
67 *  ext_attr: yes
68 *  resize_inode: no
69 *  dir_index: yes
70 ;Features read-only:
71 *  sparse_super: yes
72 *  large_file: yes
73 *  btree_dir: yes
74 *  huge_file: yes
75 *  gdt_csum: yes
76 *  dir_nlink: yes
77 *  extra_isize: yes
78 *  quota: no
79 *  bigalloc: no
80 *  metadata_csum: yes
81
82
83 ==Project tree==
84 *  blockdev         - block devices set, supported blockdev
85 *  demos            - demo directory sources
86 *  fs_test          - test suite
87 *  lwext4           - internals of the lwext4 library
88 *  toolchain        - specific toolchain cmake files
89 *  CMakeLists.txt   - CMake config file
90 *  ext_images.7z    - compressed ext2/3/4 100MB images
91 *  fs_test.mk       - automatic tests definitions
92 *  Makefile         - helper makefile to generate cmake and run test suite
93 *  readme.mediawiki - readme file
94   
95 ==Compile==
96 Windows:
97 * CMake:  http://www.cmake.org/cmake/resources/software.html
98 * MinGw:  http://www.mingw.org/
99 * GnuWin: http://gnuwin32.sourceforge.net/ 
100
101 Linux:
102 * CMake, make, gcc
103
104 ;Generate makefiles:
105  make
106
107 ;Compile
108  cd build_generic
109  make
110
111
112 ==Generic demo application==
113 Simple lwext4 library presentation:
114 * load ext2/3/4 images
115 * load linux block device with ext2/3/4 part
116 * load windows volume with ext2/3/4 filesystem 
117 * directory speed test
118 * file write/read speed test
119
120 How to use for images/blockdevices:
121  cd build_generic
122  generic -i ext_images/ext2 
123  generic -i ext_images/ext3 
124  generic -i ext_images/ext4 
125
126
127 ==Build and run automatic tests==
128 Build and run automatic tests
129 Build automatic test tools:
130  make
131  cd build_generic
132  make
133 Uncompress ext/2/3/4 images:
134  make unpack_images
135 Run server for one of the image file:
136  make server_ext2
137  make server_ext3
138  make server_ext4
139 Execute tests:
140  make test
141
142 ==Cross compile standalone library==
143 Toolchains needed:
144 * arm-none-eabi-gcc for cortex-mX
145 * avr-gcc for avr
146 * bfin-elf-gcc for bfin
147 * msp430-gcc for msp430
148
149
150 Build bf518 library:
151  make bf518
152  cd build_bf518
153  make lwext4
154
155 Build avrxmega7 library:
156  make avrxmega7
157  cd build_avrxmega7
158  make lwext4
159
160 Build cortex-m0 library:
161  make cortex-m0
162  cd build_cortex-m0
163  make lwext4
164
165 Build cortex-m3 library:
166  make cortex-m3
167  cd build_cortex-m3
168  make lwext4
169
170 Build cortex-m4 library:
171  make cortex-m4
172  cd build_cortex-m4
173  make lwext4
174