Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / week_2005_03_27.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: March 27, 2005 - April  2, 2005 Archives</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/week_2005_03_20.html" title="March 20, 2005 - March 26, 2005" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2005_04_03.html" title="April  3, 2005 - April  9, 2005" />
17 </head>
18 <body class="layout-one-column">
19    <div id="container">
20       <div id="container-inner" class="pkg">
21
22          <div id="banner">
23             <div id="banner-inner" class="pkg">
24                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
25                <h2 id="banner-description">Searchable status reports and work log</h2>
26             </div>
27          </div>
28
29          <div id="pagebody">
30             <div id="pagebody-inner" class="pkg">
31                <div id="alpha">
32                   <div id="alpha-inner" class="pkg">
33                      
34                      <p class="content-nav">
35                         <a href="http://defaria.com/blogs/Status/archives/week_2005_03_20.html">&laquo; March 20, 2005 - March 26, 2005</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/week_2005_04_03.html">April  3, 2005 - April  9, 2005 &raquo;</a>
38                      </p>
39                      
40                      
41                      
42
43                      <h2 class="date-header">April  1, 2005</h2>
44                      <a id="a000328"></a>
45                      <div class="entry" id="entry-328">
46                         <h3 class="entry-header">Tagged HybridOS/Bluecat RH 8.0 building</h3>
47                         <div class="entry-content">
48                            <div class="entry-body">
49                               <ul>
50   <li>Tagged HybridOS with the proper release tag</li>
51
52   <li>Started attempting to build BlueCat on Europa (RH 8.0)</li>
53 </ul>
54                               
55                               <h3>Building BlueCat on Europa Notes</h3>
56
57 <p>Some setup issues. Had to get int to be able to rsh without a password to t3. Additionally cvs was not being found once the rsh to t3 was working. This was because the PATH was merely /usr/bin. Tried for a long time to get rsh to execute int's ~/.bashrc but it wouldn't. Turns out the problem was the int's shell on t3 was not set to bash in /etc/passwd.</p>
58
59 <p>Additionally make sure you set CVSROOT=:ext:int@t3:/cm/CVS! I think I'll put this in int@europa's ~/.bashrc!</p>
60                               
61                               <p class="entry-footer">
62                                  <span class="post-footers">Posted by  at  4:24 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000328.html">Permalink</a>
63                                  
64                                  
65                               </p>
66                            </div>
67                         </div>
68                      </div>
69                      
70                      
71
72                      <h2 class="date-header">March 31, 2005</h2>
73                      <a id="a000327"></a>
74                      <div class="entry" id="entry-327">
75                         <h3 class="entry-header">Finalized HybridOS</h3>
76                         <div class="entry-content">
77                            <div class="entry-body">
78                               <ul>
79   <li>Finished up CR 1 for HybridOS checkin - assigned to Thu for review</li>
80 </ul>
81                               
82                               <p class="entry-footer">
83                                  <span class="post-footers">Posted by  at  4:10 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000327.html">Permalink</a>
84                                  
85                                  
86                               </p>
87                            </div>
88                         </div>
89                      </div>
90                      
91                      
92
93                      <h2 class="date-header">March 30, 2005</h2>
94                      <a id="a000326"></a>
95                      <div class="entry" id="entry-326">
96                         <h3 class="entry-header">HybridOS Binary Comparison problems</h3>
97                         <div class="entry-content">
98                            <div class="entry-body">
99                               <ul>
100   <li>Managed to perform binary comparison of HybridOS</li>
101 </ul>
102                               
103                               <h3>HybridOS Binary Comparison</h3>
104
105 <p>HybridOS has been checked in and built. As you know the binary comparison procedure described in the GS: LOS178 Impact Summary discovered more differences. Specifically 227 .o files had differences. Further investigation revealed that the action of committing the sources to CVS caused $Header/ident strings to change. The following describes the changes to the $Header strings due to cvs commit:</p>
106
107 <div class="code"><pre>
108 tomcat:strings -a orig.uipc_usrreq.o | grep Header
109 $Header: /cvs/<font color="blue"><b>los178-cvs</b></font>/los178/sys/networking/tcpip/general/uipc_usrreq.c,v  <font color="orange"><b>1.1.1.1</b></font> <font color="green"><b>2004/03/03 00:59:24</b></font> <font color="purple"><b>emooring</b></font> Exp $
110 tomcat:strings -a new.uipc_usrreq.o | grep Header
111 $Header: /cvs/<font color="blue"><b>hybrid-os-cvs</b></font>/los178/sys/networking/tcpip/general/uipc_usrreq.c,v <font color="orange"><b>1.1</b></font> <font color="green"><b>2005/03/30 00:39:03</b></font> <font color="purple"><b>adefaria</b></font> Exp $
112 </pre></div>
113
114 <p>The changes are as follows:</p>
115
116 <ol>
117   <li>CVS Repository name changed from los178-cvs -> hybrid-os-cvs (<font color="blue">blue</font>)</li>
118
119   <li>Revision changed from whatever it was -> 1.1 (<font color="orange">orange</font>) All revisions for HybridOS are now 1.1</li>
120
121   <li>Date changed to reflect time of cvs commit to new CVS repository (<font color="green">green</font>)</li>
122
123   <li>User changed from whatever it was -> adefaria (<font color="purple">purple</font>) since I was the user to perform the commit</li>
124 </ol>
125
126 <p>Using objdump once again to disassemble these .o files and comparing the output left us with the following .o files that were still different:</p>
127
128 <ol>
129   <li>/sys/lib/libcsp_970.a (context_asm.o)</li>
130
131   <li>/sys/lib/libcsp_970.a (csp_cpu_asm.o)</li>
132
133   <li>/sys/lib/libcsp_970.a (flih.o)</li>
134
135   <li>/sys/lib/libcsp_970.a (fpu_asm.o)</li>
136
137   <li>/sys/lib/libcsp_970.a (launch_asm.o)</li>
138
139   <li>/sys/lib/libcsp_970.a (tlbmiss.o)</li>
140 </ol>
141
142 <p>Closer examination of these .o files reveals that the also contained ident strings in the text segment that had the same differences as the $Header differences described above. In other words the code was the same but the version strings and dates changed, as is expected.</p>
143
144                               
145                               <p class="entry-footer">
146                                  <span class="post-footers">Posted by  at  4:59 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000326.html">Permalink</a>
147                                  
148                                  
149                               </p>
150                            </div>
151                         </div>
152                      </div>
153                      
154                      
155
156                      <h2 class="date-header">March 29, 2005</h2>
157                      <a id="a000325"></a>
158                      <div class="entry" id="entry-325">
159                         <h3 class="entry-header">Hybrid OS</h3>
160                         <div class="entry-content">
161                            <div class="entry-body">
162                               <ul>
163   <li>Checked HybridOS into CVS</li>
164
165   <li>Rebuilt HybridOS</li>
166
167   <li>Attempted binary comparison - fails due to $Header$ strings</li>
168 </ul>
169                               
170                               <h3>Binary Differences</h3>
171
172 <p>Well the build finished but the binary comparison as per the Impact Summary failed. For a while I thought I did something wrong so I went back and re-extracted from the SCL and rebuild the old LOS178 that I had stored on the side, etc. Still it kept failing! Not only 25 files that were different and needed to be disassembled and compared but more like 228 files! What's going on?!?</p>
173
174 <p>So I dug deeper... Seems that $Header is embedded in some .o files and the $Headers differ (picking at random a .o that didn't compare):</p>
175
176 <div class="code"><pre>
177 tomcat:strings -a new.uipc_usrreq.o | grep Header
178 $Header: /cvs/hybrid-os-cvs/los178/sys/networking/tcpip/general/uipc_usrreq.c,v 1.1 2005/03/30 00:39:03 adefaria Exp $
179 tomcat:strings -a orig.uipc_usrreq.o | grep Header
180 $Header: /cvs/los178-cvs/los178/sys/networking/tcpip/general/uipc_usrreq.c,v 1.1.1.1 2004/03/03 00:59:24 emooring Exp $
181 tomcat:
182 </pre></div>
183
184 <p>So as you can see, we have differences. I don't know why all 2543 .o files extracted from the .a files didn't all differ.</p>
185                               
186                               <p class="entry-footer">
187                                  <span class="post-footers">Posted by  at 11:08 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000325.html">Permalink</a>
188                                  
189                                  
190                               </p>
191                            </div>
192                         </div>
193                      </div>
194                      
195                      
196
197                      <h2 class="date-header">March 28, 2005</h2>
198                      <a id="a000324"></a>
199                      <div class="entry" id="entry-324">
200                         <h3 class="entry-header">HybridOS built</h3>
201                         <div class="entry-content">
202                            <div class="entry-body">
203                               <ul>
204   <li>Built Hybrid OS for GD and performed binary comparison</li>
205
206   <li>Adding files to CVS on Tomcat</li>
207
208   <li>Completed GD LOS178 Impact Summary</li>
209
210   <li>Resolved long standing issue regarding gnuaout vs. gnu</li>
211 </ul>
212                               
213                               <h2>GD LOS178 Impact Summary</h2>
214
215 <h3>Export sources from LOS178</h3>
216
217 <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>
218
219 <div class="code"><pre>
220 tomcat:export CVSROOT=:pserver:anoncvs@rock:/cvs/los178-cvs
221 tomcat:cvs login
222 Logging in to :pserver:anoncvs@rock:2401/cvs/los178-cvs
223 CVS password:
224 tomcat:cvs export -r REL_LOS178_2p0p0_ppc_FCS los178
225 </pre></div>
226
227 <h3>Extract prebuilt CDK</h3>
228
229 <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>
230
231 <div class="code"><pre>
232 tomcat:cvs export -r REL_LOS178_2p0p0_ppc_FCS bin-image/ppc.cdksol.tar.gz
233 </pre></div>
234
235 <h3>Extract other tools</h3>
236
237 <p>The package.sh script from the toolbox area is used to package up the images so we need to extract that too:</p>
238
239 <div class="code"><pre>
240 tomcat:cvs export -r REL_LOS178_2p0p0_ppc_FCS toolbox/package.sh
241 </pre></div>
242
243 <h3>Test Build</h3>
244
245 <p>Perform test build.</p>
246
247 <div class="note">
248 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
249 </div>
250
251 <p>Steps performed are:</p>
252
253 <ol>
254   <li>Create ppc_dev area to perform the build in:<br>
255
256 <div class="code"><pre>
257 tomcat:mkdir ppc_dev
258 </pre></div></li>
259
260   <li>Copy in sources:<br>
261
262 <div class="code"><pre>
263 tomcat:rsync -a los178 ppc_dev
264 </pre></div></li>
265
266   <li>Unpack CDK into build area<br>
267
268 <div class="code"><pre>
269 tomcat:cd ppc_dev
270 tomcat:gnutar -zxpf ../bin-image/ppc.cdksol.tar.gz
271 </pre></div></li>
272
273   <li>Perform build:<br>
274
275 <div class="code"><pre>
276 tomcat:make DEVELOPMENT=yes install > install.log
277 </pre></div></li>
278
279   <li>Check install.log for errors</li>
280 </ol>
281
282 <h3>Perform binary comparison test</h3>
283
284 <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>
285
286 <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>
287
288 <ol>
289   <li>Package up the image just built:<br>
290
291 <div class="code"><pre>
292 tomcat:toolbox/package.sh ppc_dev dev
293 </pre></div></li>
294
295     <li>Unpack images to new area:<br>
296
297 <div class="code"><pre>
298 tomcat:mkdir new
299 tomcat:cd new
300 tomcat:for tarfile in ../media/*.tar.gz; do
301 > gnutar -zxpf $tarfile
302 > done
303 </pre></div></li>
304
305   <li>Gather all libraries and extract their .o's:<br>
306
307 <div class="code"><pre>
308 tomcat:mkdir complibs
309 tomcat:../unpack_libs
310 </pre></div></li>
311
312   <li>Unpack old images (from  t3:/export/scl/los178/2p0p0/FCS/) to old area:<br>
313
314 <div class="code"><pre>
315 tomcat:cd ..
316 tomcat:mkdir old
317 tomcat:cd old
318 tomcat:# copy old tar images here
319 tomcat:for tarfile in *.tar.gz; do
320 > gnutar -zxpf $tarfile
321 > done
322 </pre></div></li>
323
324   <li>Gather all libraries and extract their .o's:<br>
325
326 <div class="code"><pre>
327 tomcat:mkdir complibs
328 tomcat:../unpack_libs
329 </pre></div></li>
330
331   <li>Perform diff<br>
332
333 <div class="code"><pre>
334 tomcat:cd ..
335 tomcat:diff -r old/complibs new/complibs
336 </pre></div></li>
337
338   <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>
339 </ol>
340
341 <h3>Import sources into new CVS repository</h3>
342
343 <p>Sources  will be  imported into the CVS repository using the following command:</p>
344
345 <div class="code"><pre>
346 tomcat:cd los178
347 tomcat:export CVSROOT=:pserver:adefaria@tomcat:/cvs/hybrid-os-cvs
348 tomcat:cvs login
349 Logging in to :pserver:adefaria@tomcat:2401/cvs/hybrid-os-cvs
350 CVS password:
351 tomcat:# First add all directories
352 tomcat:find . ! -name CVS -type d -exec cvs add -m "HybridOS import from LOS178" {} \;
353 tomcat:# Now add all files
354 tomcat:find . -type f -exec cvs add -m "HybridOS import from LOS178" {} \;
355 tomcat:cvs commit
356 </pre></div>
357
358 <p>Additionally the binary CDK image was checked into binary-image:</p>
359
360 <div class="code"><pre>
361 tomcat:cd ../bin-image
362 tomcat:cvs add -m "HybridOS import from LOS178" ppc.cdksol.tar.gz
363 tomcat:cvs commit
364 </pre></div>
365
366 <p>Finally the toolbox/package.sh script as checked into toolbox:</p>
367
368 <div class="code"><pre>
369 tomcat:cd ../toolbox
370 tomcat:cvs add -m "HybridOS import from LOS178" package.sh
371 tomcat:cvs commit
372 </pre></div>
373
374 <h3>Tag initial sources with the tag REL_HYBRIDOS_1p0_ppc_20050328</h3>
375
376 <p>All sources, bin packages and toolbox scripts are then tagged:</p>
377
378 <div class="code"><pre>
379 tomcat:cvs tag REL_HYBRIDOS_1p0_ppc_20050328 los178 bin-image toolbox
380 </pre></div>
381
382 <h3>Check out all sources and prebuilt CDK and perform build procedure again</h3>
383
384 <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>
385
386 <h3>Following successful build perform binary comparison test again</h3>
387
388 <p>Perform the binary comparison described above again.</p>
389
390 <h3>Package build to archive area</h3>
391
392 <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>
393
394 <h2>Long standing issue regarding gnuaout vs. gnu</h2>
395
396 <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>
397
398 <p>As Adam writes here the preferred name for the toolchain tar image is derived from config.guess:</p>
399
400 <blockquote type=cite>
401 <p>Andrew DeFaria writes:</p>
402
403   <blockquote type=cite>
404   <p>toolchain-i686-pc-linux-gnu-i386.tar.gz</p>
405   </blockquote>
406
407 <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>
408 </blockquote>
409
410 <p>The "toolchain-" portion is standard for the toolchain. The "i686-pc-linux-gnu" portion comes out of config.guess:</p>
411
412 <div class="code"><pre>
413 [int@dopey 20050207]$ /export/build1/LYNXOS_500/work_area/toolchain/3.2.2/toolchain/src/config.guess
414     i686-pc-linux-gnu
415 </pre></div>
416
417 <p>However the int_tools uses the following code to determine the name of the toolchain tar image:</p>
418
419 <div class="code"><pre>
420 proc Unload_com { platform dir comp_release format host } {
421
422   switch "$host" {
423     <font color="red"><b>"linux"  { set host_platform "i686-pc-linux-<u>gnuaout</u>" }</b></font>
424     "win32"  { set host_platform "i686-pc-cygwin" }
425     "sunos"  { set host_platform "sparc-sun-solaris2.7" }
426     "lynxos" { if { "$platform" == "x86" } {
427                    set host_platform "i386-lynx-lynxos"
428                }
429                if { "$platform" == "ppc" } {
430                      set host_platform "powerpc-lynx-lynxos"
431                }
432              }
433   }
434   if { "$platform" == "x86" } {
435         set target_platform "i386"
436   } else {
437         set target_platform "$platform"
438   }
439   set COMPILER_TAR_GZ "toolchain-$host_platform-$target_platform.tar.gz"
440 </pre></div>
441
442 <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>
443
444 <p>I will perform this change, along with other int_tool changes required for the new tag labeling under and ECR.</p>
445
446                               
447                               <p class="entry-footer">
448                                  <span class="post-footers">Posted by  at  6:30 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000324.html">Permalink</a>
449                                  
450                                  
451                               </p>
452                            </div>
453                         </div>
454                      </div>
455                      
456                   </div>
457                </div>
458             </div>
459          </div>
460       </div>
461    </div>
462 </body>
463 </html>