1 # ====================================================================
5 # RAM Filesystem configuration data
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
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.
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
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.
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.
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.
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####
45 # Original data: nickg
49 #####DESCRIPTIONEND####
51 # ====================================================================
53 cdl_package CYGPKG_FS_RAM {
54 display "RAM filesystem"
58 requires CYGPKG_IO_FILEIO
60 requires CYGPKG_ISOINFRA
62 requires CYGINT_ISO_ERRNO
63 requires CYGINT_ISO_ERRNO_CODES
65 implements CYGINT_IO_FILEIO_FS
67 compile -library=libextras.a ramfs.c
69 requires CYGINT_FS_RAM_ALLOC == 1
71 cdl_interface CYGINT_FS_RAM_ALLOC {
72 display "Functions to allocate RAM"
74 This interface is implemented by functions
75 which allocate RAM to hold the contents of the files"
80 # ----------------------------------------------------------------------
81 # Simple allocation mechanism using malloc()
83 cdl_component CYGPKG_FS_RAM_SIMPLE {
84 display "Simple, malloc() based, implementation"
85 requires { CYGINT_ISO_MALLOC != 0 }
87 active_if !CYGPKG_FS_RAM_BLOCKS
89 implements CYGINT_FS_RAM_ALLOC
90 cdl_option CYGNUM_RAMFS_REALLOC_INCREMENT {
91 display "Size of file data storage increment"
94 legal_values 64 to 32768
95 description "This option controls the size of the increment to a file data
101 # ----------------------------------------------------------------------
102 # Block based allocation, using either malloc() or a private block
105 cdl_component CYGPKG_FS_RAM_BLOCKS {
106 display "Block-based RAM filesystem allocation"
108 active_if !CYGPKG_FS_RAM_SIMPLE
110 implements CYGINT_FS_RAM_ALLOC
111 cdl_option CYGNUM_RAMFS_BLOCK_SIZE {
112 display "Size of file data storage block"
115 legal_values 64 to 32768
116 description "This option controls the size of a data storage block."
119 cdl_option CYGNUM_RAMFS_BLOCKS_DIRECT {
120 display "Directly referenced data storage blocks"
124 description "This option controls the number of data storage blocks that
125 are referenced directly from a file or directory node."
128 cdl_option CYGNUM_RAMFS_BLOCKS_INDIRECT1 {
129 display "Single level indirect data storage blocks"
133 description "This option controls the number of single level indirect storage
134 blocks that are referenced from a file or directory node."
137 cdl_option CYGNUM_RAMFS_BLOCKS_INDIRECT2 {
138 display "Two level indirect data storage blocks"
142 description "This option controls the number of two level indirect storage
143 blocks that are referenced from a file or directory node."
146 cdl_component CYGPKG_FS_RAM_BLOCKS_ARRAY {
147 display "Use block array rather than malloc()"
149 description "This option controls whether the blocks are allocated from
150 an array of blocks rather from the heap using malloc()."
152 cdl_option CYGPKG_FS_RAM_BLOCKS_ARRAY_EXTERN {
153 display "Block array is external"
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."
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
166 default_value "cyg_ramfs_block_array"
167 description "This option controls what the symbol name of the external
168 block array will be."
171 cdl_option CYGNUM_FS_RAM_BLOCKS_ARRAY_SIZE {
172 display "Size of blocks array"
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."
182 cdl_option CYGNUM_RAMFS_DIRENT_SIZE {
183 display "Directory entry size"
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."
191 cdl_option CYGPKG_FS_RAM_RET_DIRENT_DTYPE {
192 display "Support for fileio's struct dirent d_type field"
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."
203 # ----------------------------------------------------------------
206 cdl_option CYGPKG_FS_RAM_TESTS {
207 display "RAM FS tests"
210 calculated { "tests/ramfs1 tests/ramfs2 tests/ramfs3" }
212 This option specifies the set of tests for the RAM FS package."