]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/fs/rom/v2_0/cdl/romfs.cdl
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / packages / fs / rom / v2_0 / cdl / romfs.cdl
1 # ====================================================================
2 #
3 #      romfs.cdl
4 #
5 #      ROM 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:   richard.panton@3glab.com
47 # Date:           2000-08-01
48 #
49 #####DESCRIPTIONEND####
50 #
51 # ====================================================================
52
53 cdl_package CYGPKG_FS_ROM {
54     display        "ROM filesystem"
55     doc            ref/fileio.html
56     include_dir    cyg/romfs
57
58     requires       CYGPKG_IO_FILEIO
59
60     requires       CYGPKG_ISOINFRA
61     requires       CYGINT_ISO_ERRNO
62     requires       CYGINT_ISO_ERRNO_CODES
63
64     implements     CYGINT_IO_FILEIO_FS
65     
66     compile        -library=libextras.a romfs.c
67
68     cdl_option CYGBLD_FS_ROMFS_MK_ROMFS {
69         display       "Build the tool used to build filesystems"
70         flavor        bool
71         default_value 1
72
73         # FIXME: host compiler/flags should be provided by config system
74         make -priority 100 {
75             <PREFIX>/bin/mk_romfs: <PACKAGE>/support/mk_romfs.c <PREFIX>/bin/file2c.tcl
76             @mkdir -p "$(dir $@)"
77             @$(HOST_CC) -g -O2 -o $@ $< || cc -g -O2 -o $@ $< || gcc -g -O2 -o $@ $<
78             @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl $(PREFIX)/bin
79         }
80
81         description "
82             When enabled this option will build a host tool which can be
83             used to create a rom filesystem image."
84     }
85
86     cdl_option CYGPKG_FS_ROM_RET_DIRENT_DTYPE {
87         display       "Support for fileio's struct dirent d_type field"
88         flavor        bool
89         default_value 0
90         active_if     CYGPKG_FILEIO_DIRENT_DTYPE
91
92         description "
93             This option controls whether the ROM filesystem supports
94             setting fileio's struct dirent d_type field.
95             If this option is enabled, d_type will be set. Otherwise,
96             nothing will be done, d_type's value will be zero because
97             fileio already sets it."
98     }
99
100     # ----------------------------------------------------------------
101     # Tests
102
103     cdl_component CYGTST_ROMFS_BUILD_TESTS {
104         display       "Build ROM filesystem tests"
105         flavor        bool
106         no_define
107         default_value 0
108         requires      CYGINT_LIBC_STARTUP_CONTEXT
109         requires      CYGINT_ISO_STDIO_FORMATTED_IO
110         requires      CYGINT_ISO_STRERROR
111         requires      CYGBLD_FS_ROMFS_MK_ROMFS        
112         description   "
113                 This option enables the building of the ROM filesystem tests."
114
115         make -priority 100 {
116             <PREFIX>/include/cyg/romfs/testromfs_le.h : $(PREFIX)/bin/mk_romfs <PACKAGE>/support/file2c.tcl
117             $(PREFIX)/bin/mk_romfs $(REPOSITORY)/$(PACKAGE)/tests/testromfs testromfs_le.bin
118             @mkdir -p "$(dir $@)"
119             # work around cygwin path problems by copying to build dir
120             @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl .
121             sh file2c.tcl testromfs_le.bin testromfs_le.h
122             @rm -f $@ file2c.tcl
123             @cp testromfs_le.h $@
124         }
125     
126         make -priority 100 {
127             <PREFIX>/include/cyg/romfs/testromfs_be.h : $(PREFIX)/bin/mk_romfs <PACKAGE>/support/file2c.tcl
128             $(PREFIX)/bin/mk_romfs -b $(REPOSITORY)/$(PACKAGE)/tests/testromfs testromfs_be.bin
129             @mkdir -p "$(dir $@)"
130             # work around cygwin path problems by copying to bin dir
131             @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl $(PREFIX)/bin/
132             sh $(PREFIX)/bin/file2c.tcl testromfs_be.bin testromfs_be.h
133             @cp testromfs_be.h $@
134         }
135     
136         cdl_option CYGPKG_FS_ROM_TESTS {
137             display "ROM filesystem tests"
138             flavor  data
139             no_define
140             calculated { "tests/romfs1" }
141                 description   "
142                     This option specifies the set of tests for the ROM filesystem package."
143         }
144     }
145 }
146
147 # End of romfs.cdl