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">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Movable Type 5.2.3" />
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" />
12 <title>Status for Andrew DeFaria: HybridOS built</title>
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" />
22 <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
26 <div id="container-inner" class="pkg">
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>
36 <div id="pagebody-inner" class="pkg">
38 <div id="alpha-inner" class="pkg">
40 <p class="content-nav">
41 <a href="http://defaria.com/blogs/Status/archives/000323.html">« 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 »</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">
52 <li>Built Hybrid OS for GD and performed binary comparison</li>
54 <li>Adding files to CVS on Tomcat</li>
56 <li>Completed GD LOS178 Impact Summary</li>
58 <li>Resolved long standing issue regarding gnuaout vs. gnu</li>
61 <div id="more" class="entry-more">
62 <h2>GD LOS178 Impact Summary</h2>
64 <h3>Export sources from LOS178</h3>
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>
68 <div class="code"><pre>
69 tomcat:export CVSROOT=:pserver:anoncvs@rock:/cvs/los178-cvs
71 Logging in to :pserver:anoncvs@rock:2401/cvs/los178-cvs
73 tomcat:cvs export -r REL_LOS178_2p0p0_ppc_FCS los178
76 <h3>Extract prebuilt CDK</h3>
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>
80 <div class="code"><pre>
81 tomcat:cvs export -r REL_LOS178_2p0p0_ppc_FCS bin-image/ppc.cdksol.tar.gz
84 <h3>Extract other tools</h3>
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>
88 <div class="code"><pre>
89 tomcat:cvs export -r REL_LOS178_2p0p0_ppc_FCS toolbox/package.sh
94 <p>Perform test build.</p>
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
100 <p>Steps performed are:</p>
103 <li>Create ppc_dev area to perform the build in:<br>
105 <div class="code"><pre>
109 <li>Copy in sources:<br>
111 <div class="code"><pre>
112 tomcat:rsync -a los178 ppc_dev
115 <li>Unpack CDK into build area<br>
117 <div class="code"><pre>
119 tomcat:gnutar -zxpf ../bin-image/ppc.cdksol.tar.gz
122 <li>Perform build:<br>
124 <div class="code"><pre>
125 tomcat:make DEVELOPMENT=yes install > install.log
128 <li>Check install.log for errors</li>
131 <h3>Perform binary comparison test</h3>
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>
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>
138 <li>Package up the image just built:<br>
140 <div class="code"><pre>
141 tomcat:toolbox/package.sh ppc_dev dev
144 <li>Unpack images to new area:<br>
146 <div class="code"><pre>
149 tomcat:for tarfile in ../media/*.tar.gz; do
150 > gnutar -zxpf $tarfile
154 <li>Gather all libraries and extract their .o's:<br>
156 <div class="code"><pre>
157 tomcat:mkdir complibs
158 tomcat:../unpack_libs
161 <li>Unpack old images (from t3:/export/scl/los178/2p0p0/FCS/) to old area:<br>
163 <div class="code"><pre>
167 tomcat:# copy old tar images here
168 tomcat:for tarfile in *.tar.gz; do
169 > gnutar -zxpf $tarfile
173 <li>Gather all libraries and extract their .o's:<br>
175 <div class="code"><pre>
176 tomcat:mkdir complibs
177 tomcat:../unpack_libs
182 <div class="code"><pre>
184 tomcat:diff -r old/complibs new/complibs
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>
190 <h3>Import sources into new CVS repository</h3>
192 <p>Sources will be imported into the CVS repository using the following command:</p>
194 <div class="code"><pre>
196 tomcat:export CVSROOT=:pserver:adefaria@tomcat:/cvs/hybrid-os-cvs
198 Logging in to :pserver:adefaria@tomcat:2401/cvs/hybrid-os-cvs
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" {} \;
207 <p>Additionally the binary CDK image was checked into binary-image:</p>
209 <div class="code"><pre>
210 tomcat:cd ../bin-image
211 tomcat:cvs add -m "HybridOS import from LOS178" ppc.cdksol.tar.gz
215 <p>Finally the toolbox/package.sh script as checked into toolbox:</p>
217 <div class="code"><pre>
219 tomcat:cvs add -m "HybridOS import from LOS178" package.sh
223 <h3>Tag initial sources with the tag REL_HYBRIDOS_1p0_ppc_20050328</h3>
225 <p>All sources, bin packages and toolbox scripts are then tagged:</p>
227 <div class="code"><pre>
228 tomcat:cvs tag REL_HYBRIDOS_1p0_ppc_20050328 los178 bin-image toolbox
231 <h3>Check out all sources and prebuilt CDK and perform build procedure again</h3>
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>
235 <h3>Following successful build perform binary comparison test again</h3>
237 <p>Perform the binary comparison described above again.</p>
239 <h3>Package build to archive area</h3>
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>
243 <h2>Long standing issue regarding gnuaout vs. gnu</h2>
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>
247 <p>As Adam writes here the preferred name for the toolchain tar image is derived from config.guess:</p>
249 <blockquote type=cite>
250 <p>Andrew DeFaria writes:</p>
252 <blockquote type=cite>
253 <p>toolchain-i686-pc-linux-gnu-i386.tar.gz</p>
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>
259 <p>The "toolchain-" portion is standard for the toolchain. The "i686-pc-linux-gnu" portion comes out of config.guess:</p>
261 <div class="code"><pre>
262 [int@dopey 20050207]$ /export/build1/LYNXOS_500/work_area/toolchain/3.2.2/toolchain/src/config.guess
266 <p>However the int_tools uses the following code to determine the name of the toolchain tar image:</p>
268 <div class="code"><pre>
269 proc Unload_com { platform dir comp_release format 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"
278 if { "$platform" == "ppc" } {
279 set host_platform "powerpc-lynx-lynxos"
283 if { "$platform" == "x86" } {
284 set target_platform "i386"
286 set target_platform "$platform"
288 set COMPILER_TAR_GZ "toolchain-$host_platform-$target_platform.tar.gz"
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>
293 <p>I will perform this change, along with other int_tool changes required for the new tag labeling under and ECR.</p>
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>