1 # ====================================================================
5 # JFFS2 Filesystem configuration data
9 # ====================================================================
10 #####ECOSGPLCOPYRIGHTBEGIN####
11 ## -------------------------------------------
12 ## This file is part of eCos, the Embedded Configurable Operating System.
13 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
14 ## Copyright (C) 2004 eCosCentric Limited
16 ## eCos is free software; you can redistribute it and/or modify it under
17 ## the terms of the GNU General Public License as published by the Free
18 ## Software Foundation; either version 2 or (at your option) any later version.
20 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
21 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25 ## You should have received a copy of the GNU General Public License along
26 ## with eCos; if not, write to the Free Software Foundation, Inc.,
27 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
29 ## As a special exception, if other files instantiate templates or use macros
30 ## or inline functions from this file, or you compile this file and link it
31 ## with other works to produce a work based on this file, this file does not
32 ## by itself cause the resulting work to be covered by the GNU General Public
33 ## License. However the source code for this file must still be made available
34 ## in accordance with section (3) of the GNU General Public License.
36 ## This exception does not invalidate any other reasons why a work based on
37 ## this file might be covered by the GNU General Public License.
39 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
40 ## at http://sources.redhat.com/ecos/ecos-license/
41 ## -------------------------------------------
42 #####ECOSGPLCOPYRIGHTEND####
43 # ====================================================================
44 ######DESCRIPTIONBEGIN####
46 # Author(s): David Woodhouse, Dominic Ostrowski
47 # Original data: ported from JFFS2 by David Woodhouse
48 # Contributors: dominic.ostrowski@3glab.com
51 #####DESCRIPTIONEND####
53 # ====================================================================
55 cdl_package CYGPKG_FS_JFFS2 {
56 display "JFFS2 filesystem"
60 requires CYGPKG_IO_FILEIO
61 requires CYGPKG_IO_FLASH
62 requires CYGINT_ISO_MALLOC
64 requires CYGPKG_ISOINFRA
66 requires CYGINT_ISO_ERRNO
67 requires CYGINT_ISO_ERRNO_CODES
68 requires CYGPKG_IO_FLASH_BLOCK_DEVICE
69 requires CYGPKG_IO_FILEIO_INODE
70 requires CYGPKG_LINUX_COMPAT
73 implements CYGINT_IO_FILEIO_FS
75 compile -library=libextras.a fs-ecos.c
76 compile build.c scan.c malloc-ecos.c nodelist.c nodemgmt.c readinode.c dir-ecos.c read.c compr.c debug.c
77 # This could be overridden by an alternative direct I/O method.
80 cdl_component CYGOPT_FS_JFFS2_GCTHREAD {
81 display "Support garbage-collection background thread"
85 requires CYGPKG_KERNEL
87 Enable background garbage collection thread, for making
88 free space ahead of time. Leave this off till it's been
89 implemented. And don't implement it till icache locking has
90 been made thread-safe.
94 cdl_option CYGNUM_JFFS2_GC_THREAD_PRIORITY {
95 display "jffs2 gc thread priority"
97 default_value { CYGNUM_KERNEL_SCHED_PRIORITIES-2 }
98 legal_values 0 to CYGNUM_KERNEL_SCHED_PRIORITIES
99 description "The jffs2 system contains one garbage collect thread."
102 cdl_option CYGNUM_JFFS2_GC_THREAD_STACK_SIZE {
103 display "jffs2 gc stackstack size"
105 legal_values 2048 to 0x7fffffff
108 This option sets the size of the stack used
109 for jffs2 garbage collect thread"
112 cdl_option CYGNUM_JFFS2_GS_THREAD_TICKS {
113 display "ticks between each garbage collect"
117 This option sets how many clock ticks there will be between
118 each garbage collect operation triggered by the background
123 cdl_option CYGOPT_FS_JFFS2_WRITE {
124 display "Include write support for JFFS2"
126 compile gc.c write.c erase.c
129 Enable writing to JFFS2 file systems; not only reading."
132 cdl_option CYGOPT_FS_JFFS2_NAND {
133 display "Support for NAND flash"
135 define CONFIG_JFFS2_FS_WRITEBUFFER
139 Enable support for JFFS2 on NAND flash."
142 cdl_option CYGOPT_FS_JFFS2_DEBUG {
143 display "Debug level"
147 define CONFIG_JFFS2_FS_DEBUG
149 Debug verbosity of JFFS2 code. Zero is normal operation
150 without debugging. Level 1 adds extra sanity checks and
151 fairly verbose output. Level 2 is insanely loquacious."
154 cdl_component CYGOPT_FS_JFFS2_COMPRESS {
155 display "Compress data"
157 define JFFS2_COMPRESSION
160 Compression and decompression are entirely handled by the file
161 system and are fully transparent to applications. However,
162 selecting this option increases the amount of RAM required and
163 slows down read and write operations considerably if you have a
166 cdl_option CYGOPT_FS_JFFS2_COMPRESS_ZLIB {
167 display "Compress data using zlib"
169 define CONFIG_JFFS2_ZLIB
170 requires CYGPKG_COMPRESS_ZLIB
174 Use zlib for compression of data. This is the slowest of the
175 compression options available but the most effective."
178 cdl_option CYGOPT_FS_JFFS2_COMPRESS_RTIME {
179 display "Compress data using rtime"
181 define CONFIG_JFFS2_RTIME
182 compile compr_rtime.c
185 Use the rtime algorithm for compression of data. This
186 simple algorithm often manages to squeeze and extra few
187 bytes from data already compressed with gzip."
190 cdl_option CYGOPT_FS_JFFS2_COMPRESS_RUBIN {
191 display "Compress data using rubin"
193 define CONFIG_JFFS2_RUBIN
194 requires CYGOPT_FS_JFFS2_COMPRESS
195 compile compr_rubin.c
197 Use the rubin algorithm for compression of data. This
198 simple algorithm is faster than zlib but not quite as
201 cdl_option CYGOPT_FS_JFFS2_COMPRESS_CMODE {
202 display "Set the default compression mode"
204 default_value { "PRIORITY" }
205 legal_values { "NONE" "PRIORITY" "SIZE" }
206 define CONFIG_JFFS2_CMODE
208 You can set here the default compression mode of JFFS2 from
209 the avaiable compression modes. NONE causes no compression to
210 be performed. PRIORITY tries the compressors in a predefined
211 order and chooses the first successfull one. SIZE tries all
212 compressors and chooses the one which has the smallest result"
215 cdl_option CYGNUM_FS_JFFS2_RAW_NODE_REF_CACHE_POOL_SIZE {
216 display "Memory pool size"
220 In order to manage data stored in flash, the file system
221 needs to use data structures (jffs2_raw_node_ref) allocated
222 in RAM. You can specify here the maximum number of such
223 structures you expect to be used, which will then be allocated
224 statically. If this option is set to 0, the structures will
225 be allocated dynamically via malloc(), which may incur some
226 memory overhead depending on the particular malloc()
227 implementation used."
230 cdl_option CYGPKG_FS_JFFS2_CFLAGS_ADD {
231 display "Additional compiler flags"
234 # We add '-D__ECOS' to trigger eCos-specific code in places.
235 # We add '-nostdinc -iwithprefix include' to avoid picking up
236 # native <linux/*.h> include files when building on Linux.
237 default_value { "-D__ECOS -nostdinc -iwithprefix include" }
239 This option modifies the set of compiler flags for
240 building the JFFS2 package.
241 These flags are used in addition
242 to the set of global flags."
245 cdl_option CYGPKG_FS_JFFS2_CFLAGS_REMOVE {
246 display "Suppressed compiler flags"
251 This option modifies the set of compiler flags for
252 building the JFFS2 package. These flags are removed from
253 the set of global flags if present."
256 cdl_option CYGPKG_FS_JFFS2_RET_DIRENT_DTYPE {
257 display "Support for fileio's struct dirent d_type field"
260 active_if CYGPKG_FILEIO_DIRENT_DTYPE
262 This option controls whether the JFFS2 filesystem supports
263 setting fileio's struct dirent d_type field.
264 If this option is enabled, d_type will be set. Otherwise,
265 nothing will be done, d_type's value will be zero because
266 fileio already sets it."
269 # ----------------------------------------------------------------
272 cdl_option CYGPKG_FS_JFFS2_TESTS {
273 display "JFFS2 FS tests"
276 calculated { "tests/jffs2_1 tests/jffs2_2 tests/jffs2_3" }
278 This option specifies the set of tests for the JFFS2