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