]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/fs/rom/v2_0/cdl/romfs.cdl
Initial revision
[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     # ----------------------------------------------------------------
87     # Tests
88
89     cdl_component CYGTST_ROMFS_BUILD_TESTS {
90         display       "Build ROM filesystem tests"
91         flavor        bool
92         no_define
93         default_value 0
94         requires      CYGINT_LIBC_STARTUP_CONTEXT
95         requires      CYGINT_ISO_STDIO_FORMATTED_IO
96         requires      CYGINT_ISO_STRERROR
97         requires      CYGBLD_FS_ROMFS_MK_ROMFS        
98         description   "
99                 This option enables the building of the ROM filesystem tests."
100
101         make -priority 100 {
102             <PREFIX>/include/cyg/romfs/testromfs_le.h : $(PREFIX)/bin/mk_romfs <PACKAGE>/support/file2c.tcl
103             $(PREFIX)/bin/mk_romfs $(REPOSITORY)/$(PACKAGE)/tests/testromfs testromfs_le.bin
104             @mkdir -p "$(dir $@)"
105             # work around cygwin path problems by copying to build dir
106             @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl .
107             sh file2c.tcl testromfs_le.bin testromfs_le.h
108             @rm -f $@ file2c.tcl
109             @cp testromfs_le.h $@
110         }
111     
112         make -priority 100 {
113             <PREFIX>/include/cyg/romfs/testromfs_be.h : $(PREFIX)/bin/mk_romfs <PACKAGE>/support/file2c.tcl
114             $(PREFIX)/bin/mk_romfs -b $(REPOSITORY)/$(PACKAGE)/tests/testromfs testromfs_be.bin
115             @mkdir -p "$(dir $@)"
116             # work around cygwin path problems by copying to bin dir
117             @cp $(REPOSITORY)/$(PACKAGE)/support/file2c.tcl $(PREFIX)/bin/
118             sh $(PREFIX)/bin/file2c.tcl testromfs_be.bin testromfs_be.h
119             @cp testromfs_be.h $@
120         }
121     
122         cdl_option CYGPKG_FS_ROM_TESTS {
123             display "ROM filesystem tests"
124             flavor  data
125             no_define
126             calculated { "tests/romfs1" }
127                 description   "
128                     This option specifies the set of tests for the ROM filesystem package."
129         }
130     }
131 }
132
133 # End of romfs.cdl