File: build_vxworks_notes.html

package info (click to toggle)
db 5.1.29-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 148,952 kB
  • sloc: ansic: 400,169; java: 94,399; tcl: 71,008; sh: 37,399; cs: 30,758; cpp: 21,132; perl: 14,227; xml: 9,854; makefile: 3,848; yacc: 1,003; awk: 942; sql: 801; erlang: 461; python: 216; php: 24; asm: 14
file content (184 lines) | stat: -rw-r--r-- 9,822 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>VxWorks notes</title>
    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" />
    <link rel="up" href="build_vxworks.html" title="Chapter 7.  Building Berkeley DB for VxWorks" />
    <link rel="prev" href="build_vxworks_intro6x.html" title="Building for VxWorks 6.x" />
    <link rel="next" href="build_vxworks_faq.html" title="VxWorks FAQ" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">VxWorks notes</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="build_vxworks_intro6x.html">Prev</a> </td>
          <th width="60%" align="center">Chapter 7. 
		Building Berkeley DB for VxWorks
        </th>
          <td width="20%" align="right"> <a accesskey="n" href="build_vxworks_faq.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title" style="clear: both"><a id="build_vxworks_notes"></a>VxWorks notes</h2>
          </div>
        </div>
      </div>
      <div class="toc">
        <dl>
          <dt>
            <span class="sect2">
              <a href="build_vxworks_notes.html#idp50929904">Building and Running the Demo Program</a>
            </span>
          </dt>
          <dt>
            <span class="sect2">
              <a href="build_vxworks_notes.html#idp50930984">Building and Running the Utility Programs</a>
            </span>
          </dt>
          <dt>
            <span class="sect2">
              <a href="build_vxworks_notes.html#idp50932544">VxWorks 5.4/5.5: shared memory</a>
            </span>
          </dt>
          <dt>
            <span class="sect2">
              <a href="build_vxworks_notes.html#idp50931296">VxWorks 5.4/5.5: building a small memory footprint library</a>
            </span>
          </dt>
          <dt>
            <span class="sect2">
              <a href="build_vxworks_notes.html#idp50920880">Support for Replication Manager</a>
            </span>
          </dt>
        </dl>
      </div>
      <p>Berkeley DB currently disallows the <a href="../api_reference/C/dbopen.html#open_DB_TRUNCATE" class="olink">DB_TRUNCATE</a> flag to the
<a href="../api_reference/C/dbopen.html" class="olink">DB-&gt;open()</a> method on VxWorks because the operations this flag represents
are not fully supported under VxWorks.</p>
      <p>The <a href="../api_reference/C/dbsync.html" class="olink">DB-&gt;sync()</a> method is implemented using an ioctl call into the file
system driver with the FIOSYNC command.  Most, but not all file system
drivers support this call.  Berkeley DB requires the use of a file system
that supports FIOSYNC.</p>
      <div class="sect2" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h3 class="title"><a id="idp50929904"></a>Building and Running the Demo Program</h3>
            </div>
          </div>
        </div>
        <p>The demo program should be built in a manner very similar to building
Berkeley DB.  If you want different or additional BSP build specifications you
should add them by following the directions indicated in
<a class="xref" href="build_vxworks.html#build_vxworks_intro" title="Building for VxWorks 5.4 and 5.5">Building for VxWorks 5.4 and 5.5</a>.</p>
        <p>The demo program can be downloaded and run by calling the entry function
<span class="bold"><strong>dbdemo</strong></span> with the pathname of a database to use.  The demo
program will ask for some input keys.  It creates a database and adds
those keys into the database, using the reverse of the key as the data
value.  When complete you can either enter EOF (control-D) or
<span class="bold"><strong>quit</strong></span> and the demo program will display all of the key/data
items in the database.</p>
      </div>
      <div class="sect2" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h3 class="title"><a id="idp50930984"></a>Building and Running the Utility Programs</h3>
            </div>
          </div>
        </div>
        <p>The Berkeley DB utilities can be downloaded and run by calling the function equivalent to the utility's name.  The utility functions take a string containing all the supported arguments.  The program will then decompose that string into a traditional argc/argv used internally.  For example, to execute <a href="../api_reference/C/db_stat.html" class="olink">db_stat utility</a> on a database within an environment you would execute the following from the windsh prompt.  Obviously you would change the pathname and database name to reflect
your system.</p>
        <pre class="programlisting">&gt; db_stat "-h /tmp/myenvhome -d mydatabase.db"</pre>
      </div>
      <div class="sect2" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h3 class="title"><a id="idp50932544"></a>VxWorks 5.4/5.5: shared memory</h3>
            </div>
          </div>
        </div>
        <p>The memory on VxWorks is always resident and fully shared among all
tasks running on the target.  For this reason, the <a href="../api_reference/C/envopen.html#envopen_DB_LOCKDOWN" class="olink">DB_LOCKDOWN</a>
flag has no effect and the <a href="../api_reference/C/envopen.html#envopen_DB_SYSTEM_MEM" class="olink">DB_SYSTEM_MEM</a> flag is implied for any
application that does not specify the <a href="../api_reference/C/envopen.html#envopen_DB_PRIVATE" class="olink">DB_PRIVATE</a> flag.   Note
that the <a href="../api_reference/C/envopen.html#envopen_DB_SYSTEM_MEM" class="olink">DB_SYSTEM_MEM</a> flag requires all applications use a
segment ID to ensure the applications do not overwrite each other's
database environments: see the <a href="../api_reference/C/envset_shm_key.html" class="olink">DB_ENV-&gt;set_shm_key()</a> method for more
information.</p>
      </div>
      <div class="sect2" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h3 class="title"><a id="idp50931296"></a>VxWorks 5.4/5.5: building a small memory footprint library</h3>
            </div>
          </div>
        </div>
        <p>A default small footprint build is provided.  This default provides
equivalent to the <span class="bold"><strong>--enable-smallbuild</strong></span> configuration option
described in <a class="xref" href="build_unix_small.html" title="Building a small memory footprint library">Building a small memory footprint library</a>.  In order to build the small
footprint, you should move <code class="filename">db_config.h</code> aside and copy
<code class="filename">db_config_small.h</code> to <code class="filename">db_config.h</code>.  Then open up
the appropriate small workspace file via Tornado and build as usual.</p>
      </div>
      <div class="sect2" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h3 class="title"><a id="idp50920880"></a>Support for Replication Manager</h3>
            </div>
          </div>
        </div>
        <p>The Berkeley DB Replication Manager component is available on Vxworks 6.x because it provides support for TCP/IP sockets and POSIX 1003.1
		style networking and threads. You must build Berkley DB for Vxworks using the command line. Prior to building Berkeley DB, ensure you set appropriate values for the variables 
		specified in Step 1 of <a class="xref" href="build_vxworks_intro6x.html" title="Building for VxWorks 6.x">Building for VxWorks 6.x</a>. To use Berkeley DB Replication Manager, <code class="literal">netLib</code> and <code class="literal">ioLib</code> must be present in the Vxworks image.
	</p>
        <p>	To use the Berkeley DB on Vxworks 5.x, make the following manual changes.
	</p>
        <div class="itemizedlist">
          <ul type="disc">
            <li>
              <p> Undefine the HAVE_GETADDRINFO, HAVE_REPLICATION_THREADS, and HAVE_SYS_SOCKET_H macros in the Berkeley DB include files <code class="literal">db_config.h</code> and <code class="literal">db_config_small.h</code>.</p>
            </li>
            <li>
              <p>Remove this line: #include &lt;pthread.h&gt;, present in the Berkeley DB include file <code class="literal">db.h</code>.</p>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="build_vxworks_intro6x.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="build_vxworks.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="build_vxworks_faq.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">Building for VxWorks 6.x </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> VxWorks FAQ</td>
        </tr>
      </table>
    </div>
  </body>
</html>