1<!--$Id: introae.so,v 1.8 2002/10/01 19:38:33 sue Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB Reference Guide: Building for VxWorks AE</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<a name="2"><!--meow--></a>
12<table width="100%"><tr valign=top>
13<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for VxWorks systems</dl></b></td>
14<td align=right><a href="/build_vxworks/intro.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/build_vxworks/notes.html"><img src="/images/next.gif" alt="Next"></a>
15</td></tr></table>
16<p align=center><b>Building for VxWorks AE</b></p>
17<p>The build_vxworks directory in the Berkeley DB distribution contains component
18files for Tornado 3.1.  The Berkeley DB distribution also contains workspace
19and project files for Tornado 2.X.  See
20<a href="/ref/build_vxworks/intro.html">Building for VxWorks</a> for
21information about Tornado 2.0/VxWorks 5.4 and Tornado 2.2/VxWorks 5.5.</p>
22The VxWorks AE component files are all within subdirectories, and
23all component files are named <i>component.wpj</i>.
24<table border=1 align=center>
25<tr><th>File</th><th>Description</th></tr>
26<tr>    <td align=left>Berkeley DB/</td>    <td align=left>Berkeley DB component directory</td>    </tr>
27<tr>    <td align=left>dbdemo/dbdemo</td>    <td align=left><a href="/ref/build_vxworks/notes.html">Demo program</a> component directory</td>    </tr>
28<tr>    <td align=left>db_*/db_*</td>    <td align=left><a href="/ref/build_vxworks/notes.html">Support utilities</a> component directories</td>    </tr>
29</table>
30<b>Building With Tornado 3.1</b>
31<p>This document assumes you already have a workspace set up and you
32want to add Berkeley DB as a component in that workspace.  You may include
33this component in any domain deemed appropriate for your application.</p>
34<p>To add the Berkeley DB component into your workspace, right-click on the
35"Components" and choose <i>Add existing...</i>.  Enter
36the pathname to your Berkeley DB distribution in the form
37<i>&lt;pathname to your Berkeley DB distribution&gt;</i>
38<b>/build_vxworks/Berkeley DB/</b>.
39You will see <b>component.wpj</b> listed under the "Files".
40Choose that filename and click "Ok".  You will now have
41a Berkeley DB component in your workspace.</p>
42<p>There are essentially three options regarding protection
43domains and the Berkeley DB component.  The first option is to add
44the Berkeley DB component directly into your application domain.  You may
45choose to do this by downloading Berkeley DB into that domain on your
46target, or by adding the component to the domain itself and it will
47be built when the application domain is built.  The disadvantage
48of this option is that no other application domain will have access to
49the Berkeley DB interfaces. </p>
50<p>The second option is to add the Berkeley DB component directly into your
51<i>vxKernel</i> domain.  The advantage is that any application
52using the Berkeley DB interface would have access to them and no changes
53would be necessary to the linkage path.  The disadvantage is that
54all Berkeley DB code would run with system privileges. </p>
55<p>The third option is to add a Berkeley DB shared library domain to your
56system.  Then add or download the Berkeley DB component to that shared
57library domain.  The advantage is that all application domains
58using the Berkeley DB interfaces can access a single copy of the library
59running in user mode.  The disadvantages are that one must
60remember to add the Berkeley DB shared library domain to the linkage
61path of every application domain using Berkeley DB and that shared library
62domains may not link against one another, a consideration if the
63application using Berkeley DB is itself a shared library.</p>
64<p>We believe the options outlined above are the most common methods
65that the Berkeley DB component will be used.  We believe that the third
66option, creating a shared library domain, is the most useful option.
67Ultimately, the responsibility of choosing the correct mechanism
68for including the Berkeley DB component into the appropriate domain falls
69to the application developer.</p>
70<p>The remainder of this document assumes that you already have a
71VxWorks AE target and a target server, both up and running.  It also
72assumes that your VxWorks AE image is configured properly for your
73needs.  It also assumes that you
74have an acceptable file system already available.  See
75<a href="/ref/build_vxworks/faq.html">VxWorks FAQ</a> for more
76information about file system requirements.</p>
77<p>To build Berkeley DB, first, you need to set the build selection.  To do
78this, right-click on the Berkeley DB component name and choose the
79<i>Build settings...</i> selection.  If you look at the
80<i>Active Build Specification</i> drop down list, you will see
81several different builds, containing different configurations. </p>
82<table border=1 align=center>
83<tr><th>Build</th><th>Description</th></tr>
84<tr>    <td align=left>PENTIUM2gnu.debug</td>    <td align=left>PII BSP with debugging</td>    </tr>
85<tr>    <td align=left>PENTIUM2gnu.release</td>    <td align=left>PII BSP no debugging</td>    </tr>
86</table>
87<p>You have to add a new build specification if you use a
88different BSP, want to add a build for the simulator or
89want to customize further.  For instance, if you have the Power PC (PPC)
90BSP, you need to add a new build for the PPC tool chain.  To do so,
91select the "Add..." button in the <i>Build Settings</i> window.
92A new window will appear giving you a list of all the BSPs
93you have available from which to choose.
94For your new build target, you need to decide whether it should be built for
95debugging.  See the <i>C/C++ compiler</i> tab of the Pentium
96builds for ways to
97configure for each case.  After you add this build, you still need
98to configure the include directories correctly, as described in the
99sections that follow.</p>
100<p>If you are running with a different
101BSP, you should remove the build specifications that do not apply to
102your hardware.  We recommend that you do this after you configure any
103new build specifications first. </p>
104<p>If you are adding a new build you must set the include directories
105correctly.  After you have added the new build in the "Build Settings"
106window, click on the <i>C/C++ compiler</i> tab.
107In the edit box, you need to add the pathname of the
108<i>build_vxworks</i> subdirectory of Berkeley DB, followed by the
109pathname of Berkeley DB.  You should add these directories
110relative to the project directory, using the <b>PRJ_DIR</b>
111macro, which is the Berkeley DB subdirectory of <i>build_vxworks</i>.
112Then, click OK.  The typical addition of include
113directories will look like:</p>
114<blockquote><pre>-I$(PRJ_DIR)/.. -I$(PRJ_DIR)/../..</pre></blockquote>
115<p>To build and download the Berkeley DB downloadable application for the first time
116requires several steps: </p>
117<ol>
118<p><li>Select the build you are interested in using the <i>Build Settings</i>
119window.  Click OK when done.
120<p><li>Select the Berkeley DB component and right-click.  Choose the
121<i>Clean Build</i> selection.
122<p><li>Select the Berkeley DB component and right-click.  Choose the
123<i>Download...</i> selection.
124</ol>
125<p>You need to repeat this procedure for all builds you are interested in
126building, as well as for all of the utility project builds you want to
127run.</p>
128<table width="100%"><tr><td><br></td><td align=right><a href="/build_vxworks/intro.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/build_vxworks/notes.html"><img src="/images/next.gif" alt="Next"></a>
129</td></tr></table>
130<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
131</body>
132</html>
133