1 |
786 |
skrzyp |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# jffs2.cdl
|
4 |
|
|
#
|
5 |
|
|
# JFFS2 Filesystem configuration data
|
6 |
|
|
#
|
7 |
|
|
# $Id: jffs2.cdl,v 1.19 2005/02/09 09:23:54 pavlov Exp $
|
8 |
|
|
#
|
9 |
|
|
# ====================================================================
|
10 |
|
|
## ####ECOSGPLCOPYRIGHTBEGIN####
|
11 |
|
|
## -------------------------------------------
|
12 |
|
|
## This file is part of eCos, the Embedded Configurable Operating System.
|
13 |
|
|
## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2009 Free Software Foundation, Inc.
|
14 |
|
|
##
|
15 |
|
|
## eCos is free software; you can redistribute it and/or modify it under
|
16 |
|
|
## the terms of the GNU General Public License as published by the Free
|
17 |
|
|
## Software Foundation; either version 2 or (at your option) any later
|
18 |
|
|
## version.
|
19 |
|
|
##
|
20 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT
|
21 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
22 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
23 |
|
|
## for more details.
|
24 |
|
|
##
|
25 |
|
|
## You should have received a copy of the GNU General Public License
|
26 |
|
|
## along with eCos; if not, write to the Free Software Foundation, Inc.,
|
27 |
|
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
28 |
|
|
##
|
29 |
|
|
## As a special exception, if other files instantiate templates or use
|
30 |
|
|
## macros or inline functions from this file, or you compile this file
|
31 |
|
|
## and link it with other works to produce a work based on this file,
|
32 |
|
|
## this file does not by itself cause the resulting work to be covered by
|
33 |
|
|
## the GNU General Public License. However the source code for this file
|
34 |
|
|
## must still be made available in accordance with section (3) of the GNU
|
35 |
|
|
## General Public License v2.
|
36 |
|
|
##
|
37 |
|
|
## This exception does not invalidate any other reasons why a work based
|
38 |
|
|
## on this file might be covered by the GNU General Public License.
|
39 |
|
|
## -------------------------------------------
|
40 |
|
|
## ####ECOSGPLCOPYRIGHTEND####
|
41 |
|
|
# ====================================================================
|
42 |
|
|
######DESCRIPTIONBEGIN####
|
43 |
|
|
#
|
44 |
|
|
# Author(s): David Woodhouse, Dominic Ostrowski
|
45 |
|
|
# Original data: ported from JFFS2 by David Woodhouse
|
46 |
|
|
# Contributors: dominic.ostrowski@3glab.com
|
47 |
|
|
# Date: 2000-08-28
|
48 |
|
|
#
|
49 |
|
|
#####DESCRIPTIONEND####
|
50 |
|
|
#
|
51 |
|
|
# ====================================================================
|
52 |
|
|
|
53 |
|
|
cdl_package CYGPKG_FS_JFFS2 {
|
54 |
|
|
display "JFFS2 filesystem"
|
55 |
|
|
doc ref/fileio.html
|
56 |
|
|
include_dir ""
|
57 |
|
|
|
58 |
|
|
parent CYGPKG_IO_FILEIO
|
59 |
|
|
requires CYGPKG_IO_FILEIO
|
60 |
|
|
requires CYGPKG_IO_FLASH
|
61 |
|
|
requires CYGINT_ISO_MALLOC
|
62 |
|
|
|
63 |
|
|
requires CYGPKG_ISOINFRA
|
64 |
|
|
requires CYGPKG_ERROR
|
65 |
|
|
requires CYGINT_ISO_ERRNO
|
66 |
|
|
requires CYGINT_ISO_ERRNO_CODES
|
67 |
|
|
requires CYGPKG_IO_FLASH_BLOCK_DEVICE
|
68 |
|
|
requires CYGPKG_IO_FILEIO_INODE
|
69 |
|
|
requires CYGPKG_LINUX_COMPAT
|
70 |
|
|
requires CYGPKG_CRC
|
71 |
|
|
|
72 |
|
|
implements CYGINT_IO_FILEIO_FS
|
73 |
|
|
|
74 |
|
|
compile -library=libextras.a fs-ecos.c
|
75 |
|
|
compile build.c scan.c malloc-ecos.c nodelist.c nodemgmt.c readinode.c dir-ecos.c read.c compr.c debug.c
|
76 |
|
|
# This could be overridden by an alternative direct I/O method.
|
77 |
|
|
compile flashio.c
|
78 |
|
|
|
79 |
|
|
cdl_component CYGOPT_FS_JFFS2_GCTHREAD {
|
80 |
|
|
display "Support garbage-collection background thread"
|
81 |
|
|
flavor bool
|
82 |
|
|
default_value 0
|
83 |
|
|
compile gcthread.c
|
84 |
|
|
requires CYGPKG_KERNEL
|
85 |
|
|
description "
|
86 |
|
|
Enable background garbage collection thread, for making
|
87 |
|
|
free space ahead of time. Leave this off till it's been
|
88 |
|
|
implemented. And don't implement it till icache locking has
|
89 |
|
|
been made thread-safe.
|
90 |
|
|
"
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
cdl_option CYGNUM_JFFS2_GC_THREAD_PRIORITY {
|
94 |
|
|
display "jffs2 gc thread priority"
|
95 |
|
|
flavor data
|
96 |
|
|
default_value { CYGNUM_KERNEL_SCHED_PRIORITIES-2 }
|
97 |
|
|
legal_values 0 to CYGNUM_KERNEL_SCHED_PRIORITIES
|
98 |
|
|
description "The jffs2 system contains one garbage collect thread."
|
99 |
|
|
}
|
100 |
|
|
|
101 |
|
|
cdl_option CYGNUM_JFFS2_GC_THREAD_STACK_SIZE {
|
102 |
|
|
display "jffs2 gc stackstack size"
|
103 |
|
|
flavor data
|
104 |
|
|
legal_values 2048 to 0x7fffffff
|
105 |
|
|
default_value 8192
|
106 |
|
|
description "
|
107 |
|
|
This option sets the size of the stack used
|
108 |
|
|
for jffs2 garbage collect thread"
|
109 |
|
|
}
|
110 |
|
|
|
111 |
|
|
cdl_option CYGNUM_JFFS2_GS_THREAD_TICKS {
|
112 |
|
|
display "ticks between each garbage collect"
|
113 |
|
|
flavor data
|
114 |
|
|
default_value 100
|
115 |
|
|
description "
|
116 |
|
|
This option sets how many clock ticks there will be between
|
117 |
|
|
each garbage collect operation triggered by the background
|
118 |
|
|
thread"
|
119 |
|
|
}
|
120 |
|
|
}
|
121 |
|
|
|
122 |
|
|
cdl_option CYGOPT_FS_JFFS2_WRITE {
|
123 |
|
|
display "Include write support for JFFS2"
|
124 |
|
|
flavor bool
|
125 |
|
|
compile gc.c write.c erase.c
|
126 |
|
|
default_value 1
|
127 |
|
|
description "
|
128 |
|
|
Enable writing to JFFS2 file systems; not only reading."
|
129 |
|
|
}
|
130 |
|
|
|
131 |
|
|
cdl_option CYGOPT_FS_JFFS2_NAND {
|
132 |
|
|
display "Support for NAND flash"
|
133 |
|
|
flavor bool
|
134 |
|
|
define CONFIG_JFFS2_FS_WRITEBUFFER
|
135 |
|
|
compile wbuf.c
|
136 |
|
|
requires 0
|
137 |
|
|
description "
|
138 |
|
|
Enable support for JFFS2 on NAND flash."
|
139 |
|
|
}
|
140 |
|
|
|
141 |
|
|
cdl_option CYGOPT_FS_JFFS2_DEBUG {
|
142 |
|
|
display "Debug level"
|
143 |
|
|
flavor data
|
144 |
|
|
default_value 0
|
145 |
|
|
legal_values 0 to 2
|
146 |
|
|
define CONFIG_JFFS2_FS_DEBUG
|
147 |
|
|
description "
|
148 |
|
|
Debug verbosity of JFFS2 code. Zero is normal operation
|
149 |
|
|
without debugging. Level 1 adds extra sanity checks and
|
150 |
|
|
fairly verbose output. Level 2 is insanely loquacious."
|
151 |
|
|
}
|
152 |
|
|
|
153 |
|
|
cdl_component CYGOPT_FS_JFFS2_COMPRESS {
|
154 |
|
|
display "Compress data"
|
155 |
|
|
flavor bool
|
156 |
|
|
define JFFS2_COMPRESSION
|
157 |
|
|
default_value 1
|
158 |
|
|
description "
|
159 |
|
|
Compression and decompression are entirely handled by the file
|
160 |
|
|
system and are fully transparent to applications. However,
|
161 |
|
|
selecting this option increases the amount of RAM required and
|
162 |
|
|
slows down read and write operations considerably if you have a
|
163 |
|
|
slow CPU."
|
164 |
|
|
|
165 |
|
|
cdl_option CYGOPT_FS_JFFS2_COMPRESS_ZLIB {
|
166 |
|
|
display "Compress data using zlib"
|
167 |
|
|
flavor bool
|
168 |
|
|
define CONFIG_JFFS2_ZLIB
|
169 |
|
|
requires CYGPKG_COMPRESS_ZLIB
|
170 |
|
|
compile compr_zlib.c
|
171 |
|
|
default_value 1
|
172 |
|
|
description "
|
173 |
|
|
Use zlib for compression of data. This is the slowest of the
|
174 |
|
|
compression options available but the most effective."
|
175 |
|
|
}
|
176 |
|
|
|
177 |
|
|
cdl_option CYGOPT_FS_JFFS2_COMPRESS_RTIME {
|
178 |
|
|
display "Compress data using rtime"
|
179 |
|
|
flavor bool
|
180 |
|
|
define CONFIG_JFFS2_RTIME
|
181 |
|
|
compile compr_rtime.c
|
182 |
|
|
default_value 1
|
183 |
|
|
description "
|
184 |
|
|
Use the rtime algorithm for compression of data. This
|
185 |
|
|
simple algorithm often manages to squeeze and extra few
|
186 |
|
|
bytes from data already compressed with gzip."
|
187 |
|
|
}
|
188 |
|
|
|
189 |
|
|
cdl_option CYGOPT_FS_JFFS2_COMPRESS_RUBIN {
|
190 |
|
|
display "Compress data using rubin"
|
191 |
|
|
flavor bool
|
192 |
|
|
define CONFIG_JFFS2_RUBIN
|
193 |
|
|
requires CYGOPT_FS_JFFS2_COMPRESS
|
194 |
|
|
compile compr_rubin.c
|
195 |
|
|
description "
|
196 |
|
|
Use the rubin algorithm for compression of data. This
|
197 |
|
|
simple algorithm is faster than zlib but not quite as
|
198 |
|
|
effective."
|
199 |
|
|
}
|
200 |
|
|
cdl_option CYGOPT_FS_JFFS2_COMPRESS_CMODE {
|
201 |
|
|
display "Set the default compression mode"
|
202 |
|
|
flavor data
|
203 |
|
|
default_value { "PRIORITY" }
|
204 |
|
|
legal_values { "NONE" "PRIORITY" "SIZE" }
|
205 |
|
|
define CONFIG_JFFS2_CMODE
|
206 |
|
|
description "
|
207 |
|
|
You can set here the default compression mode of JFFS2 from
|
208 |
|
|
the avaiable compression modes. NONE causes no compression to
|
209 |
|
|
be performed. PRIORITY tries the compressors in a predefined
|
210 |
|
|
order and chooses the first successfull one. SIZE tries all
|
211 |
|
|
compressors and chooses the one which has the smallest result"
|
212 |
|
|
}
|
213 |
|
|
}
|
214 |
|
|
cdl_option CYGNUM_FS_JFFS2_RAW_NODE_REF_CACHE_POOL_SIZE {
|
215 |
|
|
display "Memory pool size"
|
216 |
|
|
flavor data
|
217 |
|
|
default_value 0
|
218 |
|
|
description "
|
219 |
|
|
In order to manage data stored in flash, the file system
|
220 |
|
|
needs to use data structures (jffs2_raw_node_ref) allocated
|
221 |
|
|
in RAM. You can specify here the maximum number of such
|
222 |
|
|
structures you expect to be used, which will then be allocated
|
223 |
|
|
statically. If this option is set to 0, the structures will
|
224 |
|
|
be allocated dynamically via malloc(), which may incur some
|
225 |
|
|
memory overhead depending on the particular malloc()
|
226 |
|
|
implementation used."
|
227 |
|
|
}
|
228 |
|
|
|
229 |
|
|
cdl_option CYGPKG_FS_JFFS2_CFLAGS_ADD {
|
230 |
|
|
display "Additional compiler flags"
|
231 |
|
|
flavor data
|
232 |
|
|
no_define
|
233 |
|
|
# We add '-D__ECOS' to trigger eCos-specific code in places.
|
234 |
|
|
# We add '-nostdinc -iwithprefix include' to avoid picking up
|
235 |
|
|
# native include files when building on Linux.
|
236 |
|
|
default_value { "-D__ECOS " . \
|
237 |
|
|
(CYGPKG_HAL_SYNTH ? " -nostdinc -iwithprefix include -iwithprefix include-fixed" : "") }
|
238 |
|
|
description "
|
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."
|
243 |
|
|
}
|
244 |
|
|
|
245 |
|
|
cdl_option CYGPKG_FS_JFFS2_CFLAGS_REMOVE {
|
246 |
|
|
display "Suppressed compiler flags"
|
247 |
|
|
flavor data
|
248 |
|
|
no_define
|
249 |
|
|
default_value { "" }
|
250 |
|
|
description "
|
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."
|
254 |
|
|
}
|
255 |
|
|
|
256 |
|
|
cdl_option CYGPKG_FS_JFFS2_RET_DIRENT_DTYPE {
|
257 |
|
|
display "Support for fileio's struct dirent d_type field"
|
258 |
|
|
flavor bool
|
259 |
|
|
default_value 0
|
260 |
|
|
active_if CYGPKG_FILEIO_DIRENT_DTYPE
|
261 |
|
|
description "
|
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."
|
267 |
|
|
}
|
268 |
|
|
|
269 |
|
|
# ----------------------------------------------------------------
|
270 |
|
|
# Tests
|
271 |
|
|
|
272 |
|
|
cdl_component CYGPKG_FS_JFFS2_TESTS {
|
273 |
|
|
display "JFFS2 FS tests"
|
274 |
|
|
flavor data
|
275 |
|
|
no_define
|
276 |
|
|
calculated { "tests/jffs2_1 tests/jffs2_2 tests/jffs2_3" }
|
277 |
|
|
description "
|
278 |
|
|
This option specifies the set of tests for the JFFS2
|
279 |
|
|
FS package.
|
280 |
|
|
If supported by the configuration, these tests will preferentially
|
281 |
|
|
use a FIS partition (which may be defined using RedBoot) named
|
282 |
|
|
\"jffs2test\". If that FIS partition does not exist, then no testing
|
283 |
|
|
will be performed to avoid any risk of corruption of live data.
|
284 |
|
|
Alternatively if the configuration does not support that activity,
|
285 |
|
|
a hard coded specification may be set."
|
286 |
|
|
|
287 |
|
|
cdl_component CYGPKG_FS_JFFS2_TEST_DEVICE {
|
288 |
|
|
display "Fixed Flash test area specs"
|
289 |
|
|
no_define
|
290 |
|
|
default_value !CYGFUN_IO_FLASH_BLOCK_FROM_FIS
|
291 |
|
|
description "
|
292 |
|
|
This component gives specifications of the flash region to use
|
293 |
|
|
for testing. It usually only applies when specification via FIS is not
|
294 |
|
|
possible."
|
295 |
|
|
|
296 |
|
|
cdl_option CYGNUM_FS_JFFS2_TEST_OFFSET {
|
297 |
|
|
display "Start offset from flash base"
|
298 |
|
|
flavor data
|
299 |
|
|
default_value CYGNUM_IO_FLASH_TEST_OFFSET
|
300 |
|
|
description "
|
301 |
|
|
This gives the offset from the base of the first flash device
|
302 |
|
|
of where tests may operate. It is important to set this correctly,
|
303 |
|
|
as an incorrect value could allow the tests to write over critical
|
304 |
|
|
portions of the FLASH device and possibly render the target
|
305 |
|
|
board totally non-functional."
|
306 |
|
|
}
|
307 |
|
|
cdl_option CYGNUM_FS_JFFS2_TEST_LENGTH {
|
308 |
|
|
display "Test area length"
|
309 |
|
|
flavor data
|
310 |
|
|
default_value CYGNUM_IO_FLASH_TEST_LENGTH
|
311 |
|
|
description "
|
312 |
|
|
This gives the length of the region of flash used for testing."
|
313 |
|
|
}
|
314 |
|
|
}
|
315 |
|
|
}
|
316 |
|
|
}
|
317 |
|
|
|
318 |
|
|
# End of jffs2.cdl
|