1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
12 >Editing the Sources</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos User Guide"
20 HREF="ecos-user-guide.html"><LINK
22 TITLE="Manual Configuration"
23 HREF="manual-configuration.html"><LINK
25 TITLE="Editing an eCos Savefile"
26 HREF="editing-an-ecos-savefile.html"><LINK
28 TITLE="Modifying the Memory Layout"
29 HREF="modifying-the-memory-layout.html"></HEAD
40 SUMMARY="Header navigation table"
57 HREF="editing-an-ecos-savefile.html"
65 >Chapter 28. Manual Configuration</TD
71 HREF="modifying-the-memory-layout.html"
85 NAME="EDITING-THE-SOURCES">Editing the Sources</H1
87 >For many users, controlling the packages and
88 manipulating the available configuration options will be
89 sufficient to create an embedded operating system that meets
90 the application's requirements. However, since <SPAN
94 shipped entirely in source form, it is possible to go
95 further when necessary: you can edit the <SPAN
98 > sources themselves. This requires some
99 understanding of the way the <SPAN
102 > build system works.
105 >The most obvious place to edit the source code is directly
106 in the component repository. For example, you could
112 ><version></I
114 >/src/sync/mutex.cxx</TT
116 to change the way kernel mutexes work, or possibly just to add some
117 extra diagnostics or assertions. Once the file has been edited,
118 it is possible to invoke <B
122 the top level of the build tree and the target library will be rebuilt
123 as required. A small optimization is possible: the build tree is
124 largely a mirror of the component repository, so it too will contain
130 ><version></I
134 if make is invoked in this directory
135 then it will only check for changes to the kernel sources, which
136 is a bit more efficient than checking for changes throughout the component
139 >Editing a file in the component repository is fine if this
140 tree is used for only one <SPAN
143 > configuration. If the repository
144 is used for several different configurations, however, and especially
145 if it is shared by multiple users, then making what may be experimental
146 changes to the master sources would be a bad idea. The build system provides
147 an alternative. It is possible to make a copy of the file in the
148 build tree, in other words copy <TT
157 ><version></I
161 in the component repository to <TT
166 ><version></I
170 the build tree, and edit the file in the build tree. When <B
174 invoked it will pick up local copies of any of the sources in preference
175 to the master versions in the component repository. Once you have
176 finished modifying the <SPAN
179 > sources you can install the final version
180 back in the component repository. If the changes were temporary
181 in nature and only served to aid the debugging process, then you
182 can discard the modified version of the sources. </P
184 >The situation is slightly more complicated for the header
185 files that a package may export, such as the C library’s <TT
189 file, which can be found in the directory <TT
194 ><version></I
198 If such a header file is changed, either directly in the component
199 repository or after copying it to the build tree, then <B
203 be invoked at the top level of the build tree. In cases like this
204 it is not safe to rebuild just the C library because other packages
205 may depend on the contents of <TT
215 SUMMARY="Footer navigation table"
226 HREF="editing-an-ecos-savefile.html"
235 HREF="ecos-user-guide.html"
244 HREF="modifying-the-memory-layout.html"
263 HREF="manual-configuration.html"
271 >Modifying the Memory Layout</TD