File: vxworks.html

package info (click to toggle)
erlang-doc-html 1%3A11.b.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 23,284 kB
  • ctags: 10,724
  • sloc: erlang: 505; ansic: 323; makefile: 62; perl: 61; sh: 45
file content (277 lines) | stat: -rw-r--r-- 6,983 bytes parent folder | download
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This document was generated using DocBuilder 3.3.3 -->
<HTML>
<HEAD>
  <TITLE>VxWorks</TITLE>
  <SCRIPT type="text/javascript" src="../../doc/erlresolvelinks.js">
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF00FF"
      ALINK="#FF0000">
<CENTER>
<A HREF="http://www.erlang.se"><IMG BORDER=0 ALT="[Ericsson AB]" SRC="min_head.gif"></A>
</CENTER>
<A NAME="3"><!-- Empty --></A>
<H2>3 VxWorks</H2>

<P> This chapter describes the OS specific parts of OTP which relate
to VxWorks.

<A NAME="3.1"><!-- Empty --></A>
<H3>3.1 Introduction</H3>

<P> The Erlang/OTP distribution for VxWorks is limited to what
Switchboard requires (Switchboard is a general purpose
switching hardware developed by Ericsson).


<P> Please consult the README file, included at root level in the
installation, for latest information on the distribution.

<A NAME="3.2"><!-- Empty --></A>
<H3>3.2 Memory Usage</H3>

<P> Memory required is 32 Mbyte.

<A NAME="3.3"><!-- Empty --></A>
<H3>3.3 Disk Usage</H3>

<P> The disk space required is 22 Mbyte, the documentation included. 

<A NAME="3.4"><!-- Empty --></A>
<H3>3.4 Installation</H3>

<P> OTP/VxWorks is supplied in a distribution file named
<CODE>&#60;PREFIX&#62;.tar.gz</CODE>; i.e. a tar archive that is
compressed with gzip. <CODE>&#60;PREFIX&#62;</CODE> represents the
name of the release,
e.g. <CODE>otp_LXA12345_vxworks_cpu32_R42A</CODE>. Assuming you are
installing to a Solaris file system, the installation is
performed by following these steps: &#60;


<P>

<P>
<UL>

<LI>
        Change to the directory where you want to install
        OTP/VxWorks (<CODE>&#60;ROOTDIR&#62;</CODE>): <CODE>cd &#60;ROOTDIR&#62;</CODE>

</LI>


<LI>
        Make a directory to put OTP/VxWorks in: <CODE>mkdir
         otp_vxworks_cpu32</CODE> (or whatever you want to call it)

</LI>


<LI>
        Change directory to the newly created one: <CODE>cd
         otp_vxworks_cpu32</CODE>

</LI>


<LI>
        Copy the distribution file there from where it is located
        (<CODE>&#60;RELDIR&#62;</CODE>): <CODE>cp
         &#60;RELDIR&#62;/&#60;PREFIX&#62;.tar.gz .</CODE>

</LI>


<LI>
        Unzip the distribution file: <CODE>gunzip &#60;PREFIX&#62;.tar.gz</CODE>

</LI>


<LI>
        Untar <CODE>&#60;PREFIX&#62;.tar</CODE>: <CODE>tar xvf &#60;PREFIX&#62;.tar</CODE>

</LI>


<LI>
        Create a bin directory: <CODE>mkdir bin</CODE>

</LI>


<LI>
        Copy the VxWorks Erlang/OTP start-up script to the bin directory:
        <CODE>cp erts-Vsn/bin/erl bin/.</CODE>

</LI>


<LI>
        Copy the example start scripts to the bin directory: 
        <CODE>cp releases/R42A/*.boot bin/.</CODE>

</LI>


</UL>

<P> If you use VxWorks nfs mounting facility to mount the Solaris
file system, this installation may be directly used. An other
possibility is to copy the installation to a local VxWorks DOS
file system, from where it is used.

<A NAME="3.5"><!-- Empty --></A>
<H3>3.5 OS Specific Functionality/Information</H3>

<P> There are a couple of files that are unique to the VxWorks
distribution of Erlang/OTP, these files are described here.


<P>
<UL>

<LI>
        README - this files has some information on VxWorks
        specifics that you are advised to consult. This includes the
        latest information on what parts of OTP are included in the
        VxWorks distribution of Erlang/OTP. If you want us to
        include more parts, please contact us to discuss
        this.

</LI>


<LI>
        erts-Vsn/bin/resolv.conf - A resolver configuration EXAMPLE file. 
        You have to edit this file.

</LI>


<LI>
        erts-Vsn/bin/erl - This is an EXAMPLE start script for VxWorks.
        You have to edit this file to suit your needs.

</LI>


<LI>
        erts-Vsn/bin/erl_io - One possible solution to the problem
        of competing Erlang and VxWorks shell. Contains the function
        'start_erl' called by the erl script. Also contains the
        function 'to_erl' to be used when connecting to the Erlang
        shell from VxWorks' shell.

</LI>


<LI>
        erts-Vsn/bin/erl_exec - Rearranges command line arguments
        and starts Erlang.

</LI>


<LI>
        erts-Vsn/bin/vxcall - Allows spawning of standard VxWorks
        shell functions (which is just about any function in the
        system...) from open_port/2. E.g. open_port({spawn, 'vxcall
        func arg1 arg2'}, []) will cause the output that 'func arg1,
        arg2' would have given in the shell to be received from the
        port.

</LI>


<LI>
        erts-Vsn/bin/rdate - Set the time from a networked host,
        like the SunOS command. Nothing Erlang-specific, but nice
        if you want date/0 and time/0 to give meaningful values (you
        also need a TIMEZONE environment setting if GMT isn't
        acceptable). For example: <CODE>putenv
         &#34;TIMEZONE=CET::-60:033002:102603&#34;</CODE> sets central european
        time.

</LI>


<LI>
        erts-Vsn/src - Contains source for the above files, and
        additionally config.c, driver.h, preload.c and
        reclaim.h. Reclaim.h defines the interface to a simple
        mechanism for &#34;resource reclamation&#34; that is part of the
        Erlang runtime system - may be useful to &#34;port program&#34; writers (and
        possibly others). Take careful note of the caveats listed in
        the file!

</LI>


</UL>
<A NAME="3.6"><!-- Empty --></A>
<H3>3.6 Starting Erlang</H3>

<P> Start (and restart) of the system depends on what file system
is used. To be able to start the system from a nfs mounted
file system you can use VxWorks start script facility to run a
start script similar to the example below. Note that the
Erlang/OTP start-up script is run at the end of this script.


<PRE>
#  start.script v1.0 1997/09/08 patrik
#  
#  File name:  start.script 
#  Purpose:    Starting the VxWorks/cpu32 erlang/OTP
#  Author:     patrik@erix.ericsson.se
#  Resides in: ~tornado/wind/target/config/ads360/

#
# Set shell prompt
#
shellPromptSet(&#34;sauron-&#62; &#34;)

#
# Set default gateway
#
hostAdd &#34;router-20&#34;,&#34;150.236.20.251&#34;
routeAdd &#34;0&#34;,&#34;router-20&#34;

#
# Mount /home from gandalf
#
hostAdd &#34;gandalf&#34;,&#34;150.236.20.16&#34;
usergroup=10 
nfsAuthUnixSet(&#34;gandalf&#34;, 452, 10, 1, &#38;usergroup) 
nfsMount(&#34;gandalf&#34;, &#34;/export/home&#34;, &#34;/home&#34;)

#
# Load and run rdate.o to set correct date on the target
#
ld &#60; /home/gandalf/tornado/wind/target/config/ads360/rdate.o
rdate(&#34;gandalf&#34;)

#
# Setup timezone information (Central European time)
#
putenv &#34;TIMEZONE=CET::-60:033002:102603&#34;

#
# Run the Erlang/OTP start script
#
cd &#34;/home/gandalf/tornado/wind/target/erlang_cpu32_R42A/bin&#34;
&#60;erl
    
</PRE>
<CENTER>
<HR>
<SMALL>
Copyright &copy; 1991-2006
<A HREF="http://www.erlang.se">Ericsson AB</A><BR>
</SMALL>
</CENTER>
</BODY>
</HTML>