-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.INSTALL
282 lines (215 loc) · 10.6 KB
/
README.INSTALL
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
278
279
280
281
282
Installing Xenomai
==================
1. How to build
===============
1.1 Standard procedure
----------------------
1.1.1 Interactive configuration
-------------------------------
From a fresh build directory, either run:
$ make -f $source_tree/makefile xconfig # (Qt-based)
$ make -f $source_tree/makefile gconfig # (GTK-based)
$ make -f $source_tree/makefile menuconfig # (Dialog-based)
If "make" complains about not being able to locate the source tree
(make_version < 3.80), simply add "xeno_srctree=$source_tree" to the
command above.
1.1.2 Non-interactive configuration
-----------------------------------
People needing automatic non-interactive configuration can directly
use the provided GNU configure script for this purpose. The available
configuration switches can be listed by running ./configure
--help. The xeno-specific switches are:
--enable-pervasive Enable pervasive real-time support in user-space
--enable-native-skin Build native skin
--enable-native-registry-slots=<val> Set maximum number of registry slots
--enable-native-pipe Enable pipe support in native skin
--enable-native-pipe-bufsz Set the size of the pipe fill space
--enable-native-sem Enable semaphore support in native skin
--enable-native-event Enable event flag support in native skin
--enable-native-mutex Enable mutex support in native skin
--enable-native-cond Enable condition variable support in native skin
--enable-native-heap Enable heap support in native skin
--enable-native-queue Enable queue support in native skin
--enable-native-alarm Enable alarm support in native skin
--enable-native-mps Enable message passing support in native skin
--enable-native-intr Enable interrupt API in native skin
--enable-uart-16550A Build 16550A UART driver
--enable-psos-skin Build pSOS+ emulator
--enable-posix-skin Build POSIX skin
--enable-vxworks-skin Build VxWorks emulator
--enable-vrtx-skin Build VRTX emulator
--enable-uitron-skin Build uITRON API skin
--enable-rtai-skin Build RTAI skin
--enable-user-vm Build user-space VMs
--enable-nucleus-heap-size Set the size of the system heap (Kb)
--enable-nucleus-stats Enable nucleus statistics collection
--enable-nucleus-ishield Enable interrupt shield
--enable-nucleus-debug Enable debug support in nucleus
--enable-nucleus-watchdog Enable nucleus watchdog support
--enable-nucleus-scalable-sched Enable the scalable O(1) scheduler
--enable-nucleus-scalable-prios Set the maximum number of priority levels
--enable-nucleus-config-gz Make gzipped config file available from /proc
--enable-fpu Enable FPU support
--enable-udev Enable UDEV support
--enable-periodic_timer Enable periodic timer support
--enable-module-debug Enable debug information in kernel modules
--enable-user-debug Enable debug information in user-space programs
--enable-timer-latency Set timer tuning latency (0=autocalibrate)
--enable-sched-latency Set scheduling latency (0=autocalibrate)
--enable-sim Build simulator
--enable-dox-doc Build Doxygen documentation
--enable-dbx Build Docbook XML documentation.
--enable-dbx-network Access Docbook DTD and XSL stylesheets through
the network
--enable-latex-doc Build LaTeX documentation
--enable-verbose-latex Uses LaTeX non-stop mode
--enable-x86-sep Enable SEP instructions for syscalls
1.1.3 Recycling a configuration file
------------------------------------
You can also recycle an existing .xeno_config file from a previous
build by running:
$ cp -p $old_builddir/.xeno_config $new_builddir
$ cd $new_builddir
$ make -f $source_tree/makefile xeno_srctree=$source_tree oldconfig
1.1.4 Selecting alternate compilers
-----------------------------------
Compiler selection must be done at _configuration_ time. One only
needs to pass the right values for the standard environment variables
CC and CXX, respectively for compiling C and C++ source files. In any
case, using a GCC toolchain is mandatory. When unspecified, these
variables's values respectively default to "gcc" and "g++".
WARNING: this selection is not aimed at toggling the cross-compilation
mode on. In order to do so, please refer to 1.2.
Examples:
# Start configuring using the Qt-based GUI with alternate compilers
$ make xconfig CC=/my/favourite/c/compiler CXX=/my/favourite/c++/compiler
# Reconfiguring a previous build tree, changing the compilers on-the-fly.
$ make reconfig CC=/my/favourite/c/compiler CXX=/my/favourite/c++/compiler
# Rebuild all [and optionally install]
$ make [all [install]]
CAVEAT: Since the autoconf-based engine needs to analyze the
compilers's features and crams the CC and CXX values into the
Makefiles it produces, passing CC and CXX variables at build time
simply does _not_ work for the purpose of selecting alternate compiler
toolchains. Again, you need to let the configuration engine know about
these new settings as explained above.
1.2 Cross-compilation support
-----------------------------
Simply add ARCH and CROSS_COMPILE variables as usual to the standard
command lines, e.g.
$ make -f $source_tree/makefile ARCH=arm CROSS_COMPILE=arm-linux-
Names of available architectures can be found under arch/*.
1.3 Installing the software
---------------------------
When the standard (or cross-) compilation has finished:
$ cd $builddir
$ make install
Everything needed to use the Xenomai distribution will be copied there
out of the build tree. From now on, you should be able to refer to the
installation directory as the root of a complete standalone binary
Xenomai distribution.
One may also choose to install the Xenomai programs under a temporary
staging tree by passing the standard DESTDIR variable to "make" while
installing. e.g.
$ make install DESTDIR=/mnt/target
will create a standard Xenomai hierarchy under /mnt/target, keeping the
original prefix information unmodified. If the installation directory
selected at configuration time was "/usr/realtime", then the command
above will put the Xenomai binary distribution under
/mnt/target/usr/realtime.
WARNING: running "make install" is required to run several standard
Xenomai programs correctly. Xenomai enforces the actual split between the
source distribution tree, the build tree where it is going to be
compiled, and the final installation directory where Xenomai programs
can be run eventually. In any case, you should only rely on the
installation directory contents to run Xenomai programs.
When installing Xenomai, a few devices nodes are created, using the
"mknod" command. This command requires root privileges, so "make
install" will try hard to get these privileges, using the sudo command
if necessary. If the "sudo" command is installed but will not grant
root privileges to the current user, the devices nodes are not be
created, a warning is issued, and the installation will continue
normally.
To avoid the creation of these nodes, use :
$ make install-nodev
But be careful: Xenomai tests and examples WILL NOT WORK if these
devices nodes do not exit, unless udev is available on your target
system, in which case these devices entries will be created
dynamically as needed by Xenomai's kernel modules.
1.4 Compiling parts of the tree
-------------------------------
Xenomai developers may want to recompile parts of the tree from
times to times. This automake-based build system allows it: just go to
the proper directory level, then issue "make", as usual. This process
will recurse as needed.
The "makefile" (small caps) found in the root source directory is used
to bootstrap the build system when it is about to be configured for
the first time. After the first configuration has been successful, one
just need to run "make xconfig|gconfig|menuconfig|..." as usual.
1.5 Changing the configuration
------------------------------
Each time you want to change your configuration, just run "make
xconfig|gconfig|menuconfig" in your build dir, then "make" (or "make
all").
If you only want to rerun the "configure" script using the current
Xenomai configuration, just run "make reconfig", there is no need to
restart any GUI for that.
When invoked for the first time in an empty build directory, the
default "make" goal is "menuconfig" in a regular terminal, or
"xconfig" in an emacs-term.
1.6 Modifying the autotool template files
-----------------------------------------
If you have to change some template files used by any of the autotools
(i.e. Makefile.am, configure.in, acinclude.m4), then you will need the
following pack to rebuild the derived files:
o autoconf 2.59
o automake 1.9.5
o aclocal 1.9.5
o libtool 1.5.6
Note: the above is _not_ needed unless you want to change Xenomai's
internal build directives, which you don't for normal use.
2. Bootstrapping with Xenomai in 7 steps
=============================================
Xenomai is exclusively Adeos-based, so the general steps include
adding the Adeos support to a vanilla Linux kernel first, then build
Xenomai against the resulting kernel tree. Here is how to do this:
>1. patch and build a vanilla Linux kernel tree with the Adeos support.
For instance, Adeos patches for x86 are available from
Xenomai/arch/i386/patches/. Apply only one of them
that matches the Linux kernel version, like this:
$ cd $linux-src-dir
$ patch -p1 < arch/$arch/patches/adeos-linux-$version.patch
>2. $ mkdir $builddir && cd $builddir
>3. $ make -f ../xenomai/makefile
>4. a GUI should pop up, allowing you to configure Xenomai:
o default settings should be ok for most platforms
o in the "General" section, set your site values for the Xenomai
installation directory (defaults to /usr/realtime) and
Linux kernel tree (defaults to /usr/src/linux).
o save and exit.
--
At this point, you should see the typical output of a GNU configure
script. Your Xenomai settings are being used to setup the
autoconf/automake-based build system.
You may reboot on the Adeos-enabled kernel before or after Xenomai has
been built, the exact order of operations has no incidence.
--
>5. $ make install
Xenomai will be compiled then installed under the directory you specified
at configuration time (ensure that your shell can write to the
destination directory).
Remember to add $installdir/bin to your shell PATH variable, where
$installdir is your site value for the Xenomai installation directory.
--
Once you have rebooted on the Adeos-enabled kernel:
>6. $ cd $installdir/testsuite/latency
>7. $ ./run
If "sudo" is installed on your box, the application loader script
(xeno-load) will attempt to use it for running privileged commands
(e.g. insmod, rmmod et al.) If sudo is not available, just "su"
manually before running the run script. You should then see the
typical output of the latency calibration program running in kernel
space. Hit ^C to stop it.
--
10/17/2004