1 |
786 |
skrzyp |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# ramfs.cdl
|
4 |
|
|
#
|
5 |
|
|
# RAM Filesystem configuration data
|
6 |
|
|
#
|
7 |
|
|
# ====================================================================
|
8 |
|
|
## ####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
## -------------------------------------------
|
10 |
|
|
## This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2009 Free Software Foundation, Inc.
|
12 |
|
|
##
|
13 |
|
|
## eCos is free software; you can redistribute it and/or modify it under
|
14 |
|
|
## the terms of the GNU General Public License as published by the Free
|
15 |
|
|
## Software Foundation; either version 2 or (at your option) any later
|
16 |
|
|
## version.
|
17 |
|
|
##
|
18 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT
|
19 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
20 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
21 |
|
|
## for more details.
|
22 |
|
|
##
|
23 |
|
|
## You should have received a copy of the GNU General Public License
|
24 |
|
|
## along with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
26 |
|
|
##
|
27 |
|
|
## As a special exception, if other files instantiate templates or use
|
28 |
|
|
## macros or inline functions from this file, or you compile this file
|
29 |
|
|
## and link it with other works to produce a work based on this file,
|
30 |
|
|
## this file does not by itself cause the resulting work to be covered by
|
31 |
|
|
## the GNU General Public License. However the source code for this file
|
32 |
|
|
## must still be made available in accordance with section (3) of the GNU
|
33 |
|
|
## General Public License v2.
|
34 |
|
|
##
|
35 |
|
|
## This exception does not invalidate any other reasons why a work based
|
36 |
|
|
## on this file might be covered by the GNU General Public License.
|
37 |
|
|
## -------------------------------------------
|
38 |
|
|
## ####ECOSGPLCOPYRIGHTEND####
|
39 |
|
|
# ====================================================================
|
40 |
|
|
######DESCRIPTIONBEGIN####
|
41 |
|
|
#
|
42 |
|
|
# Author(s): nickg
|
43 |
|
|
# Original data: nickg
|
44 |
|
|
# Contributors:
|
45 |
|
|
# Date: 2000-08-01
|
46 |
|
|
#
|
47 |
|
|
#####DESCRIPTIONEND####
|
48 |
|
|
#
|
49 |
|
|
# ====================================================================
|
50 |
|
|
|
51 |
|
|
cdl_package CYGPKG_FS_RAM {
|
52 |
|
|
display "RAM filesystem"
|
53 |
|
|
doc ref/fileio.html
|
54 |
|
|
include_dir cyg/ramfs
|
55 |
|
|
|
56 |
|
|
parent CYGPKG_IO_FILEIO
|
57 |
|
|
requires CYGPKG_IO_FILEIO
|
58 |
|
|
|
59 |
|
|
requires CYGPKG_ISOINFRA
|
60 |
|
|
requires CYGPKG_ERROR
|
61 |
|
|
requires CYGINT_ISO_ERRNO
|
62 |
|
|
requires CYGINT_ISO_ERRNO_CODES
|
63 |
|
|
|
64 |
|
|
implements CYGINT_IO_FILEIO_FS
|
65 |
|
|
|
66 |
|
|
compile -library=libextras.a ramfs.c
|
67 |
|
|
|
68 |
|
|
requires CYGINT_FS_RAM_ALLOC == 1
|
69 |
|
|
|
70 |
|
|
cdl_interface CYGINT_FS_RAM_ALLOC {
|
71 |
|
|
display "Functions to allocate RAM"
|
72 |
|
|
description "
|
73 |
|
|
This interface is implemented by functions
|
74 |
|
|
which allocate RAM to hold the contents of the files"
|
75 |
|
|
}
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
# ----------------------------------------------------------------------
|
80 |
|
|
# Simple allocation mechanism using malloc()
|
81 |
|
|
|
82 |
|
|
cdl_component CYGPKG_FS_RAM_SIMPLE {
|
83 |
|
|
display "Simple, malloc() based, implementation"
|
84 |
|
|
requires { CYGINT_ISO_MALLOC != 0 }
|
85 |
|
|
default_value 1
|
86 |
|
|
active_if !CYGPKG_FS_RAM_BLOCKS
|
87 |
|
|
|
88 |
|
|
implements CYGINT_FS_RAM_ALLOC
|
89 |
|
|
cdl_option CYGNUM_RAMFS_REALLOC_INCREMENT {
|
90 |
|
|
display "Size of file data storage increment"
|
91 |
|
|
flavor data
|
92 |
|
|
default_value 256
|
93 |
|
|
legal_values 64 to 32768
|
94 |
|
|
description "This option controls the size of the increment to a file data
|
95 |
|
|
storage block."
|
96 |
|
|
}
|
97 |
|
|
|
98 |
|
|
}
|
99 |
|
|
|
100 |
|
|
# ----------------------------------------------------------------------
|
101 |
|
|
# Block based allocation, using either malloc() or a private block
|
102 |
|
|
# pool.
|
103 |
|
|
|
104 |
|
|
cdl_component CYGPKG_FS_RAM_BLOCKS {
|
105 |
|
|
display "Block-based RAM filesystem allocation"
|
106 |
|
|
default_value 0
|
107 |
|
|
active_if !CYGPKG_FS_RAM_SIMPLE
|
108 |
|
|
|
109 |
|
|
implements CYGINT_FS_RAM_ALLOC
|
110 |
|
|
cdl_option CYGNUM_RAMFS_BLOCK_SIZE {
|
111 |
|
|
display "Size of file data storage block"
|
112 |
|
|
flavor data
|
113 |
|
|
default_value 256
|
114 |
|
|
legal_values 64 to 32768
|
115 |
|
|
description "This option controls the size of a data storage block."
|
116 |
|
|
}
|
117 |
|
|
|
118 |
|
|
cdl_option CYGNUM_RAMFS_BLOCKS_DIRECT {
|
119 |
|
|
display "Directly referenced data storage blocks"
|
120 |
|
|
flavor data
|
121 |
|
|
default_value 8
|
122 |
|
|
legal_values 0 to 32
|
123 |
|
|
description "This option controls the number of data storage blocks that
|
124 |
|
|
are referenced directly from a file or directory node."
|
125 |
|
|
}
|
126 |
|
|
|
127 |
|
|
cdl_option CYGNUM_RAMFS_BLOCKS_INDIRECT1 {
|
128 |
|
|
display "Single level indirect data storage blocks"
|
129 |
|
|
flavor data
|
130 |
|
|
default_value 1
|
131 |
|
|
legal_values 0 to 32
|
132 |
|
|
description "This option controls the number of single level indirect storage
|
133 |
|
|
blocks that are referenced from a file or directory node."
|
134 |
|
|
}
|
135 |
|
|
|
136 |
|
|
cdl_option CYGNUM_RAMFS_BLOCKS_INDIRECT2 {
|
137 |
|
|
display "Two level indirect data storage blocks"
|
138 |
|
|
flavor data
|
139 |
|
|
default_value 1
|
140 |
|
|
legal_values 0 to 32
|
141 |
|
|
description "This option controls the number of two level indirect storage
|
142 |
|
|
blocks that are referenced from a file or directory node."
|
143 |
|
|
}
|
144 |
|
|
|
145 |
|
|
cdl_component CYGPKG_FS_RAM_BLOCKS_ARRAY {
|
146 |
|
|
display "Use block array rather than malloc()"
|
147 |
|
|
default_value 0
|
148 |
|
|
description "This option controls whether the blocks are allocated from
|
149 |
|
|
an array of blocks rather from the heap using malloc()."
|
150 |
|
|
|
151 |
|
|
cdl_option CYGPKG_FS_RAM_BLOCKS_ARRAY_EXTERN {
|
152 |
|
|
display "Block array is external"
|
153 |
|
|
default_value 0
|
154 |
|
|
description "This option controls whether the block array is
|
155 |
|
|
defined by the RAMFS package or whether it is provided
|
156 |
|
|
by an external component. The latter option may be
|
157 |
|
|
useful when the RAM file system is to be put into a
|
158 |
|
|
special memory area."
|
159 |
|
|
}
|
160 |
|
|
|
161 |
|
|
cdl_option CYGPKG_FS_RAM_BLOCKS_ARRAY_NAME {
|
162 |
|
|
display "Name of external block array"
|
163 |
|
|
active_if CYGPKG_FS_RAM_BLOCKS_ARRAY_EXTERN
|
164 |
|
|
flavor data
|
165 |
|
|
default_value "cyg_ramfs_block_array"
|
166 |
|
|
description "This option controls what the symbol name of the external
|
167 |
|
|
block array will be."
|
168 |
|
|
}
|
169 |
|
|
|
170 |
|
|
cdl_option CYGNUM_FS_RAM_BLOCKS_ARRAY_SIZE {
|
171 |
|
|
display "Size of blocks array"
|
172 |
|
|
flavor data
|
173 |
|
|
default_value 128
|
174 |
|
|
legal_values 1 to 9999999999
|
175 |
|
|
description "The number of blocks in the array. The total size of
|
176 |
|
|
the array will be this value times the block size."
|
177 |
|
|
}
|
178 |
|
|
}
|
179 |
|
|
}
|
180 |
|
|
|
181 |
|
|
cdl_option CYGNUM_RAMFS_DIRENT_SIZE {
|
182 |
|
|
display "Directory entry size"
|
183 |
|
|
flavor data
|
184 |
|
|
default_value 32
|
185 |
|
|
legal_values 16 to { CYGNUM_RAMFS_BLOCK_SIZE ? CYGNUM_RAMFS_BLOCK_SIZE : 128 }
|
186 |
|
|
description "This option controls the number of two level indirect storage
|
187 |
|
|
blocks that are referenced from a file or directory node."
|
188 |
|
|
}
|
189 |
|
|
|
190 |
|
|
cdl_option CYGPKG_FS_RAM_RET_DIRENT_DTYPE {
|
191 |
|
|
display "Support for fileio's struct dirent d_type field"
|
192 |
|
|
flavor bool
|
193 |
|
|
default_value 0
|
194 |
|
|
active_if CYGPKG_FILEIO_DIRENT_DTYPE
|
195 |
|
|
description "This option controls whether the RAM filesystem supports
|
196 |
|
|
setting fileio's struct dirent d_type field.
|
197 |
|
|
If this option is enabled, d_type will be set.
|
198 |
|
|
Otherwise, nothing will be done, d_type's value will
|
199 |
|
|
be zero because fileio already sets it."
|
200 |
|
|
}
|
201 |
|
|
|
202 |
|
|
# ----------------------------------------------------------------
|
203 |
|
|
# Tests
|
204 |
|
|
|
205 |
|
|
cdl_option CYGPKG_FS_RAM_TESTS {
|
206 |
|
|
display "RAM FS tests"
|
207 |
|
|
flavor data
|
208 |
|
|
no_define
|
209 |
|
|
calculated { "tests/ramfs1 tests/ramfs2 tests/ramfs3" }
|
210 |
|
|
description "
|
211 |
|
|
This option specifies the set of tests for the RAM FS package."
|
212 |
|
|
}
|
213 |
|
|
|
214 |
|
|
}
|
215 |
|
|
|
216 |
|
|
# End of ramfs.cdl
|