Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / week_2005_06_05.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: June  5, 2005 - June 11, 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_05_29.html" title="May 29, 2005 - June  4, 2005" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/week_2005_06_12.html" title="June 12, 2005 - June 18, 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_05_29.html">&laquo; May 29, 2005 - June  4, 2005</a> |
36                         <a href="http://defaria.com/blogs/Status/">Main</a>
37                         | <a href="http://defaria.com/blogs/Status/archives/week_2005_06_12.html">June 12, 2005 - June 18, 2005 &raquo;</a>
38                      </p>
39                      
40                      
41                      
42
43                      <h2 class="date-header">June 10, 2005</h2>
44                      <a id="a000370"></a>
45                      <div class="entry" id="entry-370">
46                         <h3 class="entry-header">Issues building LOS178 with 3.4.3 toolchain</h3>
47                         <div class="entry-content">
48                            <div class="entry-body">
49                               <p>I experienced the following issues when attempting to build LOS178 with the 3.4.3 toolchain:</p>
50
51 <h3>Need to have xcoff cdk</h3>
52
53 <p>In order to perform the build the xcoff version of the cdk needs to be untarred. This was obtained from 2.0.0 (98r2) tarball:</p>
54
55 <div class="code"><pre>
56     $ tar -zxpf ../1033-00.cdklinux.tar.gz
57 </pre></div>
58
59 <br>
60
61 <h3>Need to get files from ppc.cdksol.tar.gz from sys/miscgcc</h3>
62
63 <p>In order to perform the build one needs to extract files from bin-image/ppc.cdksol.tar.gz, specifically the sys/miscgcc area:</p>
64
65 <div class="code"><pre>
66     $ tar -zxpf ../bin-image/ppc.cdksol.tar.gz sys/miscgcc
67 </pre></div>
68
69 <br>
70
71 <h3>Need to extract 3.4.3 toolchain</h3>
72
73 <p>After successfully building 3.4.3 gcc, package it up and then use it to extract here:</p>
74
75 <div class="code"><pre>
76 $ tar -zxpf ../toolchain/toolchain-i686-pc-linux-gnu-powerpc178.tar.gz
77 </pre></div>
78
79 <br>
80
81 <h3>Toolchain's cdk/linux-elf-ppc lacks a bin directory</h3>
82
83 <p>Normally under cdk/linux-xcoff-ppc there is both a usr and a bin directory. Some entities are just a symlink back to their counterparts in ../usr/bin (e.g. ld -> ../usr/bin/ld). This bin directory structure is not present after untarring toolchain-i686-pc-linux-gnu-powerpc178.tar.gz. For building purposes the following was done:</p>
84
85 <ol>
86   <li>Create a bin directory in cdk/linux-xcoff.ppc</li>
87
88   <li>Create symlinks to ../usr/bin:
89
90 <div class="code"><pre>
91       $ for link in ar as byacc c++ cmp diff diff3 expect flex gcc ld \
92       > make nm ranlib size strip; do
93       > ln -s ../usr/bin/$link $link
94       > done
95 </pre></div>
96
97       Note: Some of these are probably not necessary</li>
98
99   <li>Copy the following files from linux-xcoff-ppc/bin -> linux-elf-ppc/bin:
100
101 <div class="code"><pre>
102       $ for file in bison bison.hairy bison.simple coffcorrupt cofflook \
103       > config crc elflook gnutar gunzip gzcat gzexe gzip install mkbootprep \
104       > mkimage mktimestamp prepend-crc vctchk yacc zcmp zdiff zforce zgrep \
105       > zmore znew; do
106       > cp ../../linux-xcoff-ppc/bin/$file $file
107       > done
108 </pre></div>
109
110       Note: Some of these are probably not necessary</li>
111 </ol>
112
113 <h3>libgcc.a not present</h3>
114
115 <p>The build failed because it was unable to find libgcc.a. The solution was to copy libgcc.a into the right place:</p>
116
117 <div class="code"><pre>
118     $ mkdir lib
119     $ cp cdk/linux-elf-ppc/usr/lib/gcc/powerpc-lynx-lynxos178/3.4.3/libgcc.a lib
120 </pre></div>
121                               
122                               <p class="entry-footer">
123                                  <span class="post-footers">Posted by  at  3:53 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000370.html">Permalink</a>
124                                  
125                                  
126                               </p>
127                            </div>
128                         </div>
129                      </div>
130                      
131                      
132
133                      <h2 class="date-header">June  9, 2005</h2>
134                      <a id="a000369"></a>
135                      <div class="entry" id="entry-369">
136                         <h3 class="entry-header">3.4.3 toolchain build/LOS178 Makefile global clean/clobber</h3>
137                         <div class="entry-content">
138                            <div class="entry-body">
139                               <ul>
140   <li>As Moscow had checked in changes I was instructed to reattempt to build 3.4.3 toolchain again. Toolchain builds on both RH 8.0 and 9.0 but LOS178 fails to build</li>
141
142   <li>Made changes to LOS178 top level Makefile to support global clean and clobber targets. Need CR to check this in...</li>
143 </ul>
144                               
145                               <h3>3.4.3 Toolchain builds</h3>
146 Vinnie So wrote:
147
148 <blockquote type=cite>
149 <p>Andrew,</p>
150
151 <p>On the other part I just wrote the high level instruction you know what to do.</p>
152
153 <p>--Vinnie</p>
154
155 <p>1. check out compiler TOT from t3:/cvs/gcc-cvs</p>
156
157 <div class="code"><pre>
158 # cvs co -P toolchain
159 </pre></div>
160 </blockquote>
161
162 OK.
163
164 <blockquote type=cite>
165 <p>2. Apply tag DEV_LOS178_3p0p0_ppc_20050609</p>
166 </blockquote>
167
168 <p>To the toolchain?!?</p>
169
170 <blockquote type=cite>
171 <p>3. check out los178 & check out bin-image (TOT)</p>
172 <div class="code"><pre>
173 # cvs co -P bin-image
174 # cvs co -P los178
175 </pre></div>
176 </blockquote>
177
178 <p>OK.</p>
179
180 <blockquote type=cite>
181 <p>4. Apply tag DEV....... you know what this is</p>
182 </blockquote>
183
184 <p>I assume you mean to los178... (bin-image?)</p>
185
186 <blockquote type=cite>
187 <p>5. extract linux cdk (98r2) into the los178 build tree</p>
188
189 <div class="code"><pre>
190 t3:/export/dev_archive/los178/2p0p0/20050228/solaris/media/ppc/1033-00.cdklinux.tar.gz
191 </pre></div>
192 </blockquote>
193
194 <p>OK</p>
195
196 <blockquote type=cite>
197 <p>6. extract sys/miscgcc from bin-image/ppc.cdksol.tar.gz into los178 build tree</p>
198
199 <div class="code"><pre>
200 # gnutar zxpf bin-image/ppc.cdksol.tar.gz sys/miscgcc
201 </pre></div>
202
203 <p>This is needed since kernel is still xcoff. Once kernel is elf you will need elf miscgcc object files.</p>
204 </blockquote>
205
206 <p>OK.</p>
207
208 <blockquote type=cite>
209 <p>7. In the los178 build tree source SETUP.bash</p>
210 </blockquote>
211
212 <p>OK.</p>
213
214 <blockquote type=cite>
215 <p>8. Change to the toolchain directory & do whatever setup is needed and build the compiler</p>
216 </blockquote>
217
218 <p>OK. Damn it worked! (RH 9.0 - still waiting for RH 8.0...)</p>
219
220 <blockquote type=cite>
221 <p>9. package the toolchain & extract into the los178 build tree</p>
222 </blockquote>
223
224 <p>OK</p>
225
226 <blockquote type=cite>
227 <p>10. build the los178</p>
228 </blockquote>
229
230 <p>Experienced problems. First problem is that cdk/linux-elf-ppc lacked a bin directory, therefore $ENV_PREFIX/cdk/linux-elf-ppc/bin/make did not exist. Looking at linux-xcoff-ppc/bin I see that some files are simply symlinks to ../usr/bin/<file> and others are actual files. Using the file(1) command I see that the files under linux-xcoff-ppc/bin that are not symlinks are ELF files! Odd.</p>
231
232 <p>So recreating (symlinking symlinks and copying files) $ENV_PREFIX/cdk/linux-xcoff-ppc/bin -> $ENV_PREFIX/cdk/linux-elf-ppc/bin and attempting the build yielded errors. Discussing this with Vinnie we performed the following actions:</p>
233
234 <ul>
235   <li>Copied cdk/linux-elf-ppc/usr/lib/gcc/powerpc-lynx-lynxos178/3.4.3/libgcc.a -> $ENV_PREFIX/lib</li>
236
237   <li>Created the /usr/los178/2.0.0/ppc_dev/cdk/linux-xcoff-ppc/bin directory and placed a copy of bison.simple from cdk/linux-xcoff-ppc/bin into that directory</li>
238
239   <li>Reperformed the build of LOS178</li>
240 </ul>
241
242 <p>Now, on Europa - a RH 8.0 machine - I have many errors all stating:</p>
243
244 <div class="code"><pre>
245     /build/los178/cdk/linux-xcoff-ppc/bin/ar: /build/los178/sys/lib/libdrivers.a: File format is ambiguous
246     /build/los178/cdk/linux-xcoff-ppc/bin/ar: Matching formats: elf32-powerpc elf32-little elf32-big
247     make[5]: *** [/build/los178/sys/lib/libdrivers.a(rddrvr.o)] Error 1
248 </pre></div>
249
250 <p>The log file is on europa:/build/los178/install.log</p>
251
252 <h3>Global clean and clobber targets</h3>
253
254 <p>In order to support global clean and clobber targets on LOS178's top level Makefile the following changes need to be done:</p>
255
256 <ul>
257   <li>Add clean and clobber to .PHONY</li>
258
259   <li>Change help target to describe new targets</li>
260
261   <li>Add clean and clobber targets that essentially loop through $(DIRS) and perform make [clean|clobber]</li>
262 </ul>
263
264 <p>Via cvs diff:</p>
265
266 <div class="code"><pre>
267 Index: Makefile
268 ===================================================================
269 RCS file: /cvs/los178-cvs/los178/Makefile,v
270 retrieving revision 1.7
271 diff -r1.7 Makefile
272 22c22
273 < .PHONY: help all install setup asmstat asmstatclean
274 ---
275 > .PHONY: help all install setup asmstat asmstatclean clean clobber
276 24a25
277 >       @echo "This Makefile is use to build the entire LOS178, for example:"
278 26,27d26
279 <       @echo "This Makefile is use to build the entire LOS178"
280 <       @echo " for example:"
281 31c30,33
282 <
283 ---
284 >       @echo "Additionally the following targets are supported"
285 >       @echo ""
286 >       @echo "     make clean"
287 >       @echo "     make clobber"
288 55a58,66
289 >
290 > # Global clean and clobber targets
291 > clean:
292 >       @for dir in $(DIRS); do \
293 >               (cd $$dir && make clean); done
294 >
295 > clobber:
296 >       @for dir in $(DIRS); do \
297 >               (cd $$dir && make clobber); done
298
299 </pre></div>
300                               
301                               <p class="entry-footer">
302                                  <span class="post-footers">Posted by  at  3:05 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000369.html">Permalink</a>
303                                  
304                                  
305                               </p>
306                            </div>
307                         </div>
308                      </div>
309                      
310                      
311
312                      <h2 class="date-header">June  8, 2005</h2>
313                      <a id="a000368"></a>
314                      <div class="entry" id="entry-368">
315                         <h3 class="entry-header">2.1.0 problem/3.4.3 gcc/GDB 6.0</h3>
316                         <div class="entry-content">
317                            <div class="entry-body">
318                               <ul>
319   <li>Rebuilding LOS178 2.1.0</li>
320
321   <li>Attempted to build 3.4.3 on RH 8.0. Didn't work. Reattempting on RH 9.0 machine, shrike</li>
322
323   <li>Setup coolcat Windows box to attempt to build GDB 6.0</li>
324
325   <li>Changed Logger.pm to set autoflush</li>
326
327   <li>Changed build_los178 to look for sendmail</li>
328
329   <li>Worked on improving rename.sh to handle multiple versions. More works need to be done.</li>
330 </ul>
331                               
332                               <h3>LOS178 2.1.0</h3>
333
334 <p>There was some sort of problem with the recent build of 2.1.0. In looking into it I found the following:</p>
335
336 <p>I found a tagging problem. I used the tag DEV_LOS178_3p0p0_ppc_20050603. Note the 3p0p0. It should have been 2p1p0. I searched dev_archive on t3 and find no 20050603 directory for 3p0p0 but find it instead under 2p1p0. I believe that I should simply rename that tag to DEV_LOS178_2p1p0_20050603.</p>
337
338 <p>The CRs involved in 1 gig support seem to be: 539 and 606. Additionally 620 appears to be picked. Here's the break down:</p>
339
340 <div class="code"><pre>
341     rock:files4cr 539 # Add 1Gb support for LynxOS-178
342     ENVIRONMENT: 1.9.2.2 - Already up to date
343     src/bin/lynxos.boot/Makefile: 1.1.1.1.2.1 - Already up to date
344     src/cdk/common/mkimage/coff.c: 1.1.2.1 - Already up to date
345     sys/bsp.vmpc/bsp_env.c: 1.2.2.1 - Already up to date
346     sys/bsp.vmpc/lowInit.c: 1.3.2.1 - Already up to date
347     sys/bsp.vmpc/procinit.c: 1.3.2.1 - Already up to date
348     sys/csp.970/csp_init.c: 1.2.2.1 - Out of date
349     sys/csp.970/csp_mem_map.c: 1.4.2.1 - Out of date
350     sys/csp.ppc/csp_init.c: 1.2.2.1 - Already up to date
351     sys/csp.ppc/csp_mem_map.c: 1.3.2.1 - Already up to date
352     sys/include/bsps/pmac_g5/board.h: 1.5.2.1 - Out of date
353     sys/include/bsps/vmpc/board.h: 1.2.2.1 - Already up to date
354     sys/include/bsps/vmpc/pwb.h: 1.1.2.1 - Already up to date
355     sys/include/family/ppc/arch_mem.h: 1.1.1.1.2.1 - Already up to date
356
357     rock:files4cr 606 # Fix the 1GB problem on the Apple Power Mac G5 LynxOS-178 BSP
358     sys/bsp.pmac_g5/bsp_env.c: 1.2.2.1 - Already up to date
359     sys/bsp.pmac_g5/bsp_init.c: 1.3.2.2 - Already up to date
360     sys/bsp.pmac_g5/ofw.c: 1.5.2.1 - Already up to date
361     sys/bsp.pmac_g5/ofw.h: 1.3.2.1 - Already up to date
362     sys/bsp.pmac_g5/procinit.c: 1.5.2.1 - Already up to date
363     sys/csp.970/csp_init.c: 1.2.2.2 - Already up to date
364     sys/csp.970/csp_mem_map.c: 1.4.2.2 - Out of date
365     sys/include/bsps/pmac_g5/board.h: 1.5.2.2 - Already up to date
366     sys/kernel/getrusage.c: 1.1.1.1.2.1 - Already up to date
367
368     rock:files4cr 620 # Import G5 bug fixes/improvement from TOT into 2.1.0 branch
369     sys/bsp.pmac_g5/bsp_intr.c: 1.2.2.1 - Already up to date
370     sys/csp.970/csp_mem_map.c: 1.4.2.3 - Already up to date
371     sys/drivers/arinc653/Makefile.real: 1.1.2.1 - Already up to date
372 </pre></div>
373
374 <p>If you look carefully you'll notice that the "Out of date" items for 539 are covered with newer versions in 606 and 620. So it appears as if I was up to date with when I built.</p>
375
376 <p>I am building again and will be rereleasing images using the correct numbering this time.</p>
377
378 <h3>Building 3.4.3 gcc on shrike RH 9.0</h3>
379
380 <p>I attempted to build 3.4.3 gcc on shrike, a RH 9.0 system but it failed with the following:</p>
381
382 <div class="code"><pre>
383     make[2]: Entering directory `/home/adefaria/toolchain/build-powerpc/bison'
384     cd /home/adefaria/toolchain.orig/src/bison && autoheader
385     WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
386     WARNING: and `config.h.top', to define templates for `config.h.in'
387     WARNING: is deprecated and discouraged.
388
389     WARNING: Using the third argument of `AC_DEFINE' and
390     WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
391     WARNING: `acconfig.h':
392
393     WARNING:   AC_DEFINE([NEED_MAIN], 1,
394     WARNING:             [Define if a function `main' is needed.])
395
396     WARNING: More sophisticated templates can also be produced, see the
397     WARNING: documentation.
398     touch /home/adefaria/toolchain.orig/src/bison/config.hin
399     cd . && /bin/sh ./config.status config.h
400     Usage: ./config.status [--recheck] [--version] [--help]
401     make[2]: *** [stamp-h1] Error 1
402     make[2]: Leaving directory `/home/adefaria/toolchain/build-powerpc/bison'
403     make[1]: *** [all-bison] Error 2
404     make[1]: Leaving directory `/home/adefaria/toolchain/build-powerpc'
405     make: *** [stamp-all-powerpc] Error 2
406 </pre></div>
407
408 <p>Here's what I did:</p>
409
410 <ul>
411   <li>Checked out toolchain from my previous tag (DEV_LOS178_3p0p0_ppc_20050607)</li>
412
413   <li>Obtained and applied the patches as before</li>
414
415   <li>Obtained the LOS178 build environment as before</li>
416
417   <li>Performed make install</li>
418 </ul>
419
420 <p>This was done on shrike in my home directory.</p>
421                               
422                               <p class="entry-footer">
423                                  <span class="post-footers">Posted by  at  5:11 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000368.html">Permalink</a>
424                                  
425                                  
426                               </p>
427                            </div>
428                         </div>
429                      </div>
430                      
431                      
432
433                      <h2 class="date-header">June  7, 2005</h2>
434                      <a id="a000367"></a>
435                      <div class="entry" id="entry-367">
436                         <h3 class="entry-header">build_los178 enhancements/3.4.3 toolchain build</h3>
437                         <div class="entry-content">
438                            <div class="entry-body">
439                               <ul>
440   <li>Changed build_los178 to log results using Logger and to report results by emailing them</li>
441
442   <li>Started on 3.4.3 toolchain build</li>
443 </ul>
444                               
445                               <p class="entry-footer">
446                                  <span class="post-footers">Posted by  at  2:29 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000367.html">Permalink</a>
447                                  
448                                  
449                               </p>
450                            </div>
451                         </div>
452                      </div>
453                      
454                   </div>
455                </div>
456             </div>
457          </div>
458       </div>
459    </div>
460 </body>
461 </html>