]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/services/objloader/v2_0/cdl/objloader.cdl
a627bcdfccce56fea0d659d20ee9bbf3ce5fbf02
[karo-tx-redboot.git] / packages / services / objloader / v2_0 / cdl / objloader.cdl
1 # ====================================================================
2 #
3 #      objloader.cdl
4 #
5 #      Object loader configuration data
6 #
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2005 eCosCentric Ltd.
12 ## Copyright (C) 2005 Andrew Lunn
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 ## -------------------------------------------
38 #####ECOSGPLCOPYRIGHTEND####
39 # ====================================================================
40 ######DESCRIPTIONBEGIN####
41 #
42 # Author(s):      Anthony Tonizzo (atonizzo@gmail.com)
43 # Contributors:   Andrew Lunn
44 # Date:           2005-05-13
45 #
46 #####DESCRIPTIONEND####
47 #
48 # ====================================================================
49
50 cdl_package CYGPKG_OBJLOADER {
51     display       "Object file loader"
52     description   "This package provides support for loading and relocating 
53                    object files within eCos."
54     include_dir   cyg/objloader
55     include_files elf.h objelf.h loader_fs.h relocate_ppc.h relocate_i386.h
56     compile       objloader.c objelf.c loader_fs.c
57     requires      CYGPKG_MEMALLOC
58     requires      CYGPKG_IO_FILEIO
59 # ====================================================================
60
61     cdl_component CYGPKG_SERVICES_OBJLOADER_ARCHITECTURE {
62         display "Architecture dependent settings"
63         flavor  none
64         no_define
65         requires CYGINT_SERVICES_OBJLOADER_RELOCATOR == 1
66
67         description   "Each of the options here enables the correct
68                        relocation support for the architectures supported."
69
70         cdl_interface CYGINT_SERVICES_OBJLOADER_RELOCATOR {
71             display "Suitable function to perform a symbol relocation"
72             description "
73                 For each architecture we need a function which relocate
74                 a symbol. If we don't have a relocator the loader
75                 cannot work."
76         }
77
78         cdl_option CYGBLD_OBJLOADER_ARCHITECTURE_POWERPC {
79            display       "Support loading on PowerPC processors"
80            calculated    CYGPKG_HAL_POWERPC
81            implements    CYGINT_SERVICES_OBJLOADER_RELOCATOR
82            define_proc {
83                puts $::cdl_header "#include <cyg/objloader/relocate_ppc.h>"
84            }
85            compile relocate_ppc.c
86         }
87
88         cdl_option CYGBLD_OBJLOADER_ARCHITECTURE_I386 {
89            display       "Support loading on I386 processors"
90            calculated    CYGPKG_HAL_I386 || CYGPKG_HAL_SYNTH_I386
91            implements    CYGINT_SERVICES_OBJLOADER_RELOCATOR
92            define_proc {
93                puts $::cdl_header "#include <cyg/objloader/relocate_i386.h>"
94            }
95            compile relocate_i386.c
96         }
97
98 #        cdl_option CYGBLD_OBJLOADER_ARCHITECTURE_ARM {
99 #            display       "Support loading on ARM processors"
100 #            calculated    CYGPKG_HAL_ARM
101 #            define_proc {
102 #               puts $::cdl_header "#include <cyg/objloader/relocate_arm.h>"
103 #            }
104 #            compile relocate_arm.c
105 #        }
106         
107     }
108  
109     cdl_option CYGPKG_SERVICES_OBJLOADER_DEBUG_LEVEL {
110         display          "Verbosity of debug output"
111         flavor           data
112         legal_values     0 1 2
113         default_value    0
114         description      "This option allows controls over the verbosity of
115                          the debug output. 1 is moderate, 2 is very
116                          verbose, including the symbol name of each relocation
117                          performed. Any value other than 0 will prevent the
118                          unloading of unused library data, thus increasing the
119                          heap memory requirements of the package."
120     }
121    
122     cdl_component CYGPKG_SERVICES_OBJLOADER_OPTIONS {
123         display "Object loader build options"
124         flavor  none
125         description   "
126             Package specific build options including control over
127             compiler flags used only in building this package,
128             and details of which tests are built."
129
130
131         cdl_option CYGPKG_SERVICES_OBJLOADER_CFLAGS_ADD {
132             display "Additional compiler flags"
133             flavor  data
134             no_define
135             default_value { "" }
136             description   "
137                 This option modifies the set of compiler flags for
138                 building the serial device drivers. These flags are
139                 used in addition to the set of global flags."
140         }
141
142         cdl_option CYGPKG_SERVICES_OBJLOADER_CFLAGS_REMOVE {
143             display "Suppressed compiler flags"
144             flavor  data
145             no_define
146             default_value { "" }
147             description   "
148                 This option modifies the set of compiler flags for
149                 building the serial device drivers. These flags are
150                 removed from the set of global flags if present."
151         }
152     }
153
154     cdl_component CYGTST_SERVICES_OBJLOADER_BUILD_TESTS {
155         display       "Build test library"
156         default_value 0
157         active_if     CYGPKG_FS_ROM
158         active_if     CYGINT_SERVICES_OBJLOADER_RELOCATOR
159         requires      CYGBLD_FS_ROMFS_MK_ROMFS
160         no_define
161         description   "
162             This option enables the building of a library and an
163             application for testing the loader." 
164         
165         make -priority 320 {
166             tests/testromfs/hello.o : <PACKAGE>/tests/library/hello.c
167             @sh -c "mkdir -p tests tests/testromfs"
168             $(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(CFLAGS) -o $@ $<
169         }
170
171         make -priority 322 {
172             <PREFIX>/include/cyg/objloader/testromfs_be.h : tests/testromfs/hello.o 
173             $(PREFIX)/bin/mk_romfs -b tests/testromfs testromfs_be.bin 
174             @mkdir -p "$(dir $@)"
175             @sh $(PREFIX)/bin/file2c.tcl testromfs_be.bin testromfs_be.h
176             @cp testromfs_be.h $@
177         }
178         
179         make -priority 322 {
180             <PREFIX>/include/cyg/objloader/testromfs_le.h : tests/testromfs/hello.o 
181             $(PREFIX)/bin/mk_romfs tests/testromfs testromfs_le.bin
182             @mkdir -p "$(dir $@)"
183             @sh $(PREFIX)/bin/file2c.tcl testromfs_le.bin testromfs_le.h
184             @cp testromfs_le.h $@
185         }
186     
187         cdl_option CYGPKG_OBJLOADER_TESTS {
188             display     "Objloader tests"
189             flavor      data
190             no_define
191             calculated  { "tests/test_mods" }
192             description "
193                 This option specifies the set of tests for the object
194                 loader package"
195        }
196     }
197 }
198
199 # ====================================================================
200 # EOF objloader.cdl