Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000324.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml" />
11
12    <title>Status for Andrew DeFaria: HybridOS built</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/000323.html" title="LOS178 compares" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000325.html" title="Hybrid OS" />
17
18    
19
20    
21
22    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
23 </head>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
25    <div id="container">
26       <div id="container-inner" class="pkg">
27
28          <div id="banner">
29             <div id="banner-inner" class="pkg">
30                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
31                <h2 id="banner-description">Searchable status reports and work log</h2>
32             </div>
33          </div>
34
35          <div id="pagebody">
36             <div id="pagebody-inner" class="pkg">
37                <div id="alpha">
38                   <div id="alpha-inner" class="pkg">
39
40                      <p class="content-nav">
41                         <a href="http://defaria.com/blogs/Status/archives/000323.html">&laquo; LOS178 compares</a> |
42                         <a href="http://defaria.com/blogs/Status/">Main</a>
43                         | <a href="http://defaria.com/blogs/Status/archives/000325.html">Hybrid OS &raquo;</a>
44                      </p>
45
46                      <a id="a000324"></a>
47                      <div class="entry" id="entry-324">
48                         <h3 class="entry-header">HybridOS built</h3>
49                         <div class="entry-content">
50                            <div class="entry-body">
51                               <ul>
52   <li>Built Hybrid OS for GD and performed binary comparison</li>
53
54   <li>Adding files to CVS on Tomcat</li>
55
56   <li>Completed GD LOS178 Impact Summary</li>
57
58   <li>Resolved long standing issue regarding gnuaout vs. gnu</li>
59 </ul>
60                            </div>
61                            <div id="more" class="entry-more">
62                               <h2>GD LOS178 Impact Summary</h2>
63
64 <h3>Export sources from LOS178</h3>
65
66 <p>Export sources from LOS178 CVS tree using the CVS tag REL_LOS178_2p0p0_ppc_FCS. The export will come from the machine named Rock using CVSROOT=:pserver:anoncvs@rock:/cvs/los178-cvs:</p>
67
68 <div class="code"><pre>
69 tomcat:export CVSROOT=:pserver:anoncvs@rock:/cvs/los178-cvs
70 tomcat:cvs login
71 Logging in to :pserver:anoncvs@rock:2401/cvs/los178-cvs
72 CVS password:
73 tomcat:cvs export -r REL_LOS178_2p0p0_ppc_FCS los178
74 </pre></div>
75
76 <h3>Extract prebuilt CDK</h3>
77
78 <p>Extract prebuilt CDK (sunos-xcoff-ppc) binary also using the tag of REL_LOS178_2p0p0_ppc_FCS from Rock. Note that this prebuilt CDK comes from the bin-image section of the CVS repository and that we are only using the ppc.cdksol.tar.gz image:</p>
79
80 <div class="code"><pre>
81 tomcat:cvs export -r REL_LOS178_2p0p0_ppc_FCS bin-image/ppc.cdksol.tar.gz
82 </pre></div>
83
84 <h3>Extract other tools</h3>
85
86 <p>The package.sh script from the toolbox area is used to package up the images so we need to extract that too:</p>
87
88 <div class="code"><pre>
89 tomcat:cvs export -r REL_LOS178_2p0p0_ppc_FCS toolbox/package.sh
90 </pre></div>
91
92 <h3>Test Build</h3>
93
94 <p>Perform test build.</p>
95
96 <div class="note">
97 Note: Test build requires a symlink from /usr/lynx/3.1.0/ppc/cdk/sunos-xcoff-ppc/bin/bison.simple -> $ENV_PREFIX/cdk/sunos-xcoff-ppc-/bin/bison-simple due to a hard coded path dependency.  This path was not modified due to LOS-178 RSC restrictions
98 </div>
99
100 <p>Steps performed are:</p>
101
102 <ol>
103   <li>Create ppc_dev area to perform the build in:<br>
104
105 <div class="code"><pre>
106 tomcat:mkdir ppc_dev
107 </pre></div></li>
108
109   <li>Copy in sources:<br>
110
111 <div class="code"><pre>
112 tomcat:rsync -a los178 ppc_dev
113 </pre></div></li>
114
115   <li>Unpack CDK into build area<br>
116
117 <div class="code"><pre>
118 tomcat:cd ppc_dev
119 tomcat:gnutar -zxpf ../bin-image/ppc.cdksol.tar.gz
120 </pre></div></li>
121
122   <li>Perform build:<br>
123
124 <div class="code"><pre>
125 tomcat:make DEVELOPMENT=yes install > install.log
126 </pre></div></li>
127
128   <li>Check install.log for errors</li>
129 </ol>
130
131 <h3>Perform binary comparison test</h3>
132
133 <p>This binary comparison test is different from the normal binary comparison tests. Basically we are simply extracting all .o's from all .a's in the packaged versions of the product. A little utility script was written to find all .a libraries and copy them to an area (complibs) broken out by the path to the library, then extract all .o's from the .a's. This script is called unpack_libs. It is not intended that such a comparison be performed on a regular basis so this script is more of a one shot script.</p>
134
135 <p>Further, a build will create a lot of libraries but not all libraries created will be packaged and shipped. Since we are comparing against a previously built and packaged release we must package up and unpack the build we just performed. This is done using the toolbox/package.sh script as follows:</p>
136
137 <ol>
138   <li>Package up the image just built:<br>
139
140 <div class="code"><pre>
141 tomcat:toolbox/package.sh ppc_dev dev
142 </pre></div></li>
143
144     <li>Unpack images to new area:<br>
145
146 <div class="code"><pre>
147 tomcat:mkdir new
148 tomcat:cd new
149 tomcat:for tarfile in ../media/*.tar.gz; do
150 > gnutar -zxpf $tarfile
151 > done
152 </pre></div></li>
153
154   <li>Gather all libraries and extract their .o's:<br>
155
156 <div class="code"><pre>
157 tomcat:mkdir complibs
158 tomcat:../unpack_libs
159 </pre></div></li>
160
161   <li>Unpack old images (from  t3:/export/scl/los178/2p0p0/FCS/) to old area:<br>
162
163 <div class="code"><pre>
164 tomcat:cd ..
165 tomcat:mkdir old
166 tomcat:cd old
167 tomcat:# copy old tar images here
168 tomcat:for tarfile in *.tar.gz; do
169 > gnutar -zxpf $tarfile
170 > done
171 </pre></div></li>
172
173   <li>Gather all libraries and extract their .o's:<br>
174
175 <div class="code"><pre>
176 tomcat:mkdir complibs
177 tomcat:../unpack_libs
178 </pre></div></li>
179
180   <li>Perform diff<br>
181
182 <div class="code"><pre>
183 tomcat:cd ..
184 tomcat:diff -r old/complibs new/complibs
185 </pre></div></li>
186
187   <li>The above will result in 25 .o files being different. Use objdump -D to disassemble these files and compare the disassembled output. No differences detected in disassembled output.</li>
188 </ol>
189
190 <h3>Import sources into new CVS repository</h3>
191
192 <p>Sources  will be  imported into the CVS repository using the following command:</p>
193
194 <div class="code"><pre>
195 tomcat:cd los178
196 tomcat:export CVSROOT=:pserver:adefaria@tomcat:/cvs/hybrid-os-cvs
197 tomcat:cvs login
198 Logging in to :pserver:adefaria@tomcat:2401/cvs/hybrid-os-cvs
199 CVS password:
200 tomcat:# First add all directories
201 tomcat:find . ! -name CVS -type d -exec cvs add -m "HybridOS import from LOS178" {} \;
202 tomcat:# Now add all files
203 tomcat:find . -type f -exec cvs add -m "HybridOS import from LOS178" {} \;
204 tomcat:cvs commit
205 </pre></div>
206
207 <p>Additionally the binary CDK image was checked into binary-image:</p>
208
209 <div class="code"><pre>
210 tomcat:cd ../bin-image
211 tomcat:cvs add -m "HybridOS import from LOS178" ppc.cdksol.tar.gz
212 tomcat:cvs commit
213 </pre></div>
214
215 <p>Finally the toolbox/package.sh script as checked into toolbox:</p>
216
217 <div class="code"><pre>
218 tomcat:cd ../toolbox
219 tomcat:cvs add -m "HybridOS import from LOS178" package.sh
220 tomcat:cvs commit
221 </pre></div>
222
223 <h3>Tag initial sources with the tag REL_HYBRIDOS_1p0_ppc_20050328</h3>
224
225 <p>All sources, bin packages and toolbox scripts are then tagged:</p>
226
227 <div class="code"><pre>
228 tomcat:cvs tag REL_HYBRIDOS_1p0_ppc_20050328 los178 bin-image toolbox
229 </pre></div>
230
231 <h3>Check out all sources and prebuilt CDK and perform build procedure again</h3>
232
233 <p>Next we check out all sources, bin-image and toolbox scripts into new fresh areas and then perform the build procedure as described above.</p>
234
235 <h3>Following successful build perform binary comparison test again</h3>
236
237 <p>Perform the binary comparison described above again.</p>
238
239 <h3>Package build to archive area</h3>
240
241 <p>Use the package script to package up the images and place in the archive area at tomcat:/export/dev_archive/hybridos/1p0/20050328/solaris/media/ppc</p>
242
243 <h2>Long standing issue regarding gnuaout vs. gnu</h2>
244
245 <p>This has been bugging me for a while and I finally tracked it down. Often I'd build a toolchain then attempt to build LynxOS and it would fail when attempting to get the compiler. It seems that the toolchain build was packing up the compiler tar image with one name and the build scripts were using another name to try to find it. This resulted in errors. Now I had gotten around this via a symlink but I've been wanting to make the two build procedures agree on the names of things...</p>
246
247 <p>As Adam writes here the preferred name for the toolchain tar image is derived from config.guess:</p>
248
249 <blockquote type=cite>
250 <p>Andrew DeFaria writes:</p>
251
252   <blockquote type=cite>
253   <p>toolchain-i686-pc-linux-gnu-i386.tar.gz</p>
254   </blockquote>
255
256 <p>This. But I think we get this from config.guess so try to see how this nice level of abstraction fails before you hard-code something.</p>
257 </blockquote>
258
259 <p>The "toolchain-" portion is standard for the toolchain. The "i686-pc-linux-gnu" portion comes out of config.guess:</p>
260
261 <div class="code"><pre>
262 [int@dopey 20050207]$ /export/build1/LYNXOS_500/work_area/toolchain/3.2.2/toolchain/src/config.guess
263     i686-pc-linux-gnu
264 </pre></div>
265
266 <p>However the int_tools uses the following code to determine the name of the toolchain tar image:</p>
267
268 <div class="code"><pre>
269 proc Unload_com { platform dir comp_release format host } {
270
271   switch "$host" {
272     <font color="red"><b>"linux"  { set host_platform "i686-pc-linux-<u>gnuaout</u>" }</b></font>
273     "win32"  { set host_platform "i686-pc-cygwin" }
274     "sunos"  { set host_platform "sparc-sun-solaris2.7" }
275     "lynxos" { if { "$platform" == "x86" } {
276                    set host_platform "i386-lynx-lynxos"
277                }
278                if { "$platform" == "ppc" } {
279                      set host_platform "powerpc-lynx-lynxos"
280                }
281              }
282   }
283   if { "$platform" == "x86" } {
284         set target_platform "i386"
285   } else {
286         set target_platform "$platform"
287   }
288   set COMPILER_TAR_GZ "toolchain-$host_platform-$target_platform.tar.gz"
289 </pre></div>
290
291 <p>The highlighted portion above is the line in error and the underlined portion should change to simply "gnu". The int_tools do not have the benefit of being able to call config.guess so this could likely break in the future again.</p>
292
293 <p>I will perform this change, along with other int_tool changes required for the new tag labeling under and ECR.</p>
294
295                            </div>
296                         </div>
297                         <p class="entry-footer">
298                            <span class="post-footers">Posted by  on March 28, 2005  6:30 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000324.html">Permalink</a>
299                         </p>
300                      </div>
301
302                      
303
304                      
305                   </div>
306                </div>
307             </div>
308          </div>
309       </div>
310    </div>
311 </body>
312 </html>