Debian Codegraph @

docs/installation/build_vxworks_faq.html

raw
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>VxWorks FAQ</title>
7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" />
10 <link rel="up" href="build_vxworks.html" title="Chapter 8.  Building Berkeley DB for VxWorks" />
11 <link rel="prev" href="build_vxworks_notes.html" title="VxWorks notes" />
12 <link rel="next" href="upgrade_53_toc.html" title="Chapter 9.  Upgrading Berkeley DB 11.2.5.2 applications to Berkeley DB 11.2.5.3" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">VxWorks FAQ</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="build_vxworks_notes.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 8. 
26 Building Berkeley DB for VxWorks
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="upgrade_53_toc.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="build_vxworks_faq"></a>VxWorks FAQ</h2>
38 </div>
39 </div>
40 </div>
41 <div class="itemizedlist">
42 <ul type="disc">
43 <li>
44 <span class="bold">
45 <strong>I get the error "Workspace open failed: This project workspace is an
46 older format.", when trying to open the supplied workspace on Tornado 2.0
47 under Windows.</strong>
48 </span>
49 <p>This error will occur if the files were extracted in a manner that adds
50 a CR/LF to lines in the file. Make sure that you download the Berkeley DB
51 ".zip" version of the Berkeley DB distribution, and, when extracting the Berkeley DB
52 sources, that you use an unzipper program that will not do any
53 conversion.</p>
54 </li>
55 <li>
56 <span class="bold">
57 <strong>I sometimes see spurious output errors about temporary directories.</strong>
58 </span>
59 <p>These messages are coming from the <code class="literal">stat</code>(2) function call
60 in VxWorks. Unlike other systems, there may not be a well known
61 temporary directory on the target. Therefore, we highly recommend that
62 all applications use <a href="../api_reference/C/envset_tmp_dir.html" class="olink">DB_ENV-&gt;set_tmp_dir()</a> to
63 specify a temporary directory for the application.</p>
64 </li>
65 <li>
66 <span class="bold">
67 <strong>How can I build Berkeley DB without using Tornado?</strong>
68 </span>
69 <p>The simplest way to build Berkeley DB without using Tornado is to configure
70 Berkeley DB on a UNIX system, and then use the Makefile and include files
71 generated by that configuration as the starting point for your build.
72 The Makefile and include files are created during configuration, in the
73 current directory, based on your configuration decisions (for example,
74 debugging vs. non-debugging builds), so you'll need to configure the
75 system for the way you want Berkeley DB to be built.</p>
76 <p>Additionally, you'll need to account for the slight difference between
77 the set of source files used in a UNIX build and the set used in a
78 VxWorks build. You can use the following command to create a list of
79 the Berkeley DB VxWorks files. The commands assume you are in the build_vxworks
80 directory of the Berkeley DB distribution:</p>
81 <pre class="programlisting">% cat &gt; /tmp/files.sed
82 s/&lt;BEGIN&gt; FILE_//
83 s/_objects//
84 ^D
85 % grep FILE_ BerkeleyDB.wpj | grep _objects | sed -f /tmp/files.sed \
86 &gt; /tmp/db.files</pre>
87 <p>You will then have a template Makefile and include files, and a list of
88 VxWorks-specific source files. You will need to convert this Makefile
89 and list of files into a form that is acceptable to your specific build
90 environment.</p>
91 </li>
92 <li>
93 <span class="bold">
94 <strong>Does Berkeley DB use floating point registers?</strong>
95 </span>
96 <p>Yes, there are a few places in Berkeley DB where floating point computations
97 are performed. As a result, all applications that call
98 <span class="emphasis"><em>taskSpawn</em></span> should specify the <span class="bold"><strong>VX_FP_TASK</strong></span> option.</p>
99 </li>
100 <li>
101 <span class="bold">
102 <strong>Can I run the test suite under VxWorks?</strong>
103 </span>
104 <p>The test suite requires the Berkeley DB Tcl library. In turn, this library
105 requires Tcl 8.5 or greater. In order to run the test suite, you would
106 need to port Tcl 8.5 or greater to VxWorks. The Tcl shell included in
107 <span class="emphasis"><em>windsh</em></span> is not adequate for two reasons. First, it is based on
108 Tcl 8.0. Second, it does not include the necessary Tcl components for
109 adding a Tcl extension.</p>
110 </li>
111 <li>
112 <span class="bold">
113 <strong>Are all Berkeley DB features available for VxWorks?</strong>
114 </span>
115 <p>All Berkeley DB features are available for VxWorks with the exception of the
116 <a href="../api_reference/C/dbopen.html#open_DB_TRUNCATE" class="olink">DB_TRUNCATE</a> flag for <a href="../api_reference/C/dbopen.html" class="olink">DB-&gt;open()</a>. The underlying mechanism
117 needed for that flag is not available consistently across different file
118 systems for VxWorks.</p>
119 </li>
120 <li>
121 <span class="bold">
122 <strong>Are there any constraints using particular filesystem drivers?</strong>
123 </span>
124 <p>There are constraints using the dosFs filesystems with Berkeley DB. Namely,
125 you must configure your dosFs filesystem to support long filenames if
126 you are using Berkeley DB logging in your application. The VxWorks' dosFs
127 1.0 filesystem, by default, uses the old MS-DOS 8.3 file-naming
128 constraints, restricting to 8 character filenames with a 3 character
129 extension. If you have configured with VxWorks' dosFs 2.0 you should
130 be compatible with Windows FAT32 filesystems which supports long
131 filenames.</p>
132 </li>
133 <li>
134 <span class="bold">
135 <strong>Are there any dependencies on particular filesystem drivers?</strong>
136 </span>
137 <p>There is one dependency on specifics of filesystem drivers in the port
138 of Berkeley DB to VxWorks. Berkeley DB synchronizes data using the FIOSYNC function
139 to ioctl() (another option would have been to use the FIOFLUSH function
140 instead). The FIOSYNC function was chosen because the NFS client driver,
141 nfsDrv, only supports it and doesn't support FIOFLUSH. All local file
142 systems, as of VxWorks 5.4, support FIOSYNC -- with the exception of
143 rt11fsLib, which only supports FIOFLUSH. To use rt11fsLib, you will need
144 to modify the os/os_fsync.c file to use the FIOFLUSH function; note that
145 rt11fsLib cannot work with NFS clients.</p>
146 </li>
147 <li>
148 <p>
149 <span class="bold">
150 <strong>Are there any known filesystem problems?</strong>
151 </span>
152 </p>
153 <p>During the course of our internal testing, we came across three problems
154 with the dosFs 2.0 filesystem that warranted patches from Wind River Systems.
155 We strongly recommend you upgrade to dosFs 2.2, <span class="bold"><strong>SPR 79795 (x86)</strong></span>
156 and <span class="bold"><strong>SPR 79569 (PPC)</strong></span> which fixes all of these problems and
157 many more. You should ask Wind River Systems for the patches to these
158 problems if you encounter them and are unable to upgrade to dosFs 2.2.</p>
159 <p>The first problem is that files will seem to disappear. You should
160 look at <span class="bold"><strong>SPR 31480</strong></span> in the Wind River Systems' Support pages for
161 a more detailed description of this problem.</p>
162 <p>The second problem is a semaphore deadlock within the dosFs filesystem
163 code. Looking at a stack trace via CrossWind, you will see two or more of
164 your application's tasks waiting in semaphore code within dosFs. The patch
165 for this problem is under <span class="bold"><strong>SPR 33221</strong></span> at Wind River Systems.
166 There are several SPR numbers at Wind River Systems that refer to this
167 particular problem.</p>
168 <p>The third problem is that all tasks will hang on a dosFs semaphore. You should
169 look at <span class="bold"><strong>SPR 72063</strong></span> in the Wind River Systems' Support pages for
170 a more detailed description of this problem.</p>
171 </li>
172 <li>
173 <p>
174 <span class="bold">
175 <strong>Are there any filesystems I cannot use?</strong>
176 </span>
177 </p>
178 <p>Currently both the Target Server File System (TSFS) and NFS are not able
179 to be used.</p>
180 <p>The Target Server File System (TSFS) uses the netDrv driver. This driver
181 does not support any ioctl that allows flushing to the disk, nor does
182 it allow renaming of files via FIORENAME.
183 The NFS file system uses nfsDrv and that driver
184 does not support FIORENAME and cannot be used
185 with Berkeley DB. </p>
186 </li>
187 <li>
188 <span class="bold">
189 <strong>What VxWorks primitives are used for mutual exclusion in Berkeley DB?</strong>
190 </span>
191 <p>Mutexes inside of Berkeley DB use the basic binary semaphores in VxWorks. The
192 mutexes are created using the FIFO queue type.</p>
193 </li>
194 <li>
195 <span class="bold">
196 <strong>What are the implications of VxWorks' mutex implementation
197 using microkernel resources?</strong>
198 </span>
199 <p>On VxWorks, the semaphore primitives implementing mutexes consume system
200 resources. Therefore, if an application unexpectedly fails, those
201 resources could leak. Berkeley DB solves this problem by always allocating
202 mutexes in the persistent shared memory regions. Then, if an
203 application fails, running recovery or explicitly removing the database
204 environment by calling the <a href="../api_reference/C/envremove.html" class="olink">DB_ENV-&gt;remove()</a> method will allow Berkeley DB to
205 release those previously held mutex resources. If an application
206 specifies the <a href="../api_reference/C/envopen.html#envopen_DB_PRIVATE" class="olink">DB_PRIVATE</a> flag (choosing not to use persistent
207 shared memory), and then fails, mutexes allocated in that private memory
208 may leak their underlying system resources. Therefore, the
209 <a href="../api_reference/C/envopen.html" class="olink">DB_ENV-&gt;open()</a> flag should be used with caution on VxWorks.</p>
210 </li>
211 </ul>
212 </div>
213 </div>
214 <div class="navfooter">
215 <hr />
216 <table width="100%" summary="Navigation footer">
217 <tr>
218 <td width="40%" align="left"><a accesskey="p" href="build_vxworks_notes.html">Prev</a> </td>
219 <td width="20%" align="center">
220 <a accesskey="u" href="build_vxworks.html">Up</a>
221 </td>
222 <td width="40%" align="right"> <a accesskey="n" href="upgrade_53_toc.html">Next</a></td>
223 </tr>
224 <tr>
225 <td width="40%" align="left" valign="top">VxWorks notes </td>
226 <td width="20%" align="center">
227 <a accesskey="h" href="index.html">Home</a>
228 </td>
229 <td width="40%" align="right" valign="top"> Chapter 9. 
230 Upgrading Berkeley DB 11.2.5.2 applications to Berkeley DB 11.2.5.3
231 </td>
232 </tr>
233 </table>
234 </div>
235 </body>
236 </html>