source: rtems-docs/user/start/development.rst @ 4e3cf2b

4.115
Last change on this file since 4e3cf2b was 4e3cf2b, checked in by Chris Johns <chrisj@…>, on 03/10/16 at 02:25:27

Split installation into separate files.

  • Property mode set to 100644
File size: 32.1 KB
Line 
1.. comment: Copyright (c) 2016 Chris Johns <chrisj@rtems.org>
2.. comment: All rights reserved.
3
4.. _development-version:
5
6Development Version
7-------------------
8.. index:: Git
9
10RTEMS provides open access to it's development processes. The project encouages
11all users to inspect, review, comment and contribute to the code base. The
12processes described here are the same processes the core development team use
13when developing and maintaining RTEMS.
14
15.. warning::
16
17   The development version is not for use in production and it can break from
18   time to time.
19
20.. sidebar:: *GDB and Python*
21
22   RTEMS uses Python in GDB to aid debugging which means GDB needs to be built
23   with Python development libraries. Please check the RSB documentation and
24   install the packages specified for your host. Make sure a python development
25   package is included.
26
27The following procedure assumes you have installed and configured your host
28operating. It also assumes you have installed any dependent packages needed
29when building the tools and the kernel.
30
31You need to select a location to build and install the RTEMS Tool chain and
32RTEMS. Make sure there is plenty of disk space and a fast disk is
33recommended. Our procedure will document building and installing the tools in a
34home directory called :file:`development/rtems`. Using a home directory means
35you can do this without needing to be root. You can also use
36:file:`/opt/rtems/build` if you have access to that path.
37
38The location used to install the tools and kernel is called the `prefix`. It is
39best to have a `prefix` for each different version of RTEMS you are using. If
40you are using RTEMS 4.11 in production it is not a good to install a
41development version of 4.12 over the top. A separate `prefix` for each version
42avoids this.
43
44The RTEMS tool chain changes less often than the RTEMS kernel. One method of
45working with development releases is to have a separate `prefix` for the RTEMS
46tools and a different one for the RTEMS kernel. You can then update each
47without interacting with the other. You can also have a number of RTEMS
48versions available to test with.
49
50This procedure will build a SPARC tool chain.
51
52RTEMS Tools Chain
53~~~~~~~~~~~~~~~~~
54
55Clone the RTEMS Source Builder (RSB) repository:
56
57.. code-block:: shell
58
59  $ cd
60  $ mkdir -p development/rtems
61  $ cd development/rtems
62  $ git clone git://git.rtems.org/rtems-source-builder.git rsb
63  Cloning into 'rsb'...
64  remote: Counting objects: 5837, done.
65  remote: Compressing objects: 100% (2304/2304), done.
66  remote: Total 5837 (delta 4014), reused 5056 (delta 3494)
67  Receiving objects: 100% (5837/5837), 2.48 MiB | 292.00 KiB/s, done.
68  Resolving deltas: 100% (4014/4014), done.
69  Checking connectivity... done.
70
71.. sidebar:: *Downloading the source*
72
73  You need an internet connection to download the source. The downloaded source
74  is cached locally and the RSB checksums it. If you run a build again the
75  download output will be missing. Using the RSB from git will download the
76  source from the upstream project's home site and this could be `http`, `ftp`,
77  or `git`.
78
79Check all the host packages you need are present. Current libraries are not
80checked and this includes checking for the python development libraries GDB
81requires:
82
83.. code-block:: shell
84
85  $ cd rsb
86  $ ./source-builder/sb-check
87  RTEMS Source Builder - Check, 4.12 (e645642255cc)
88  Environment is ok
89
90Build a tool chain for the SPARC architecure. We are using the SPARC
91architecture because GDB has a good simulator that lets us run and test the
92samples RTEMS builds by default. The current development version
93is `4.12` and is on master:
94
95.. code-block:: shell
96
97  $ cd rtems
98  $ ../source-builder/sb-set-builder \
99      --prefix=/usr/home/chris/development/rtems/4.12 4.12/rtems-sparc
100  RTEMS Source Builder - Set Builder, 4.12 (e645642255cc)
101  Build Set: 4.12/rtems-sparc
102  Build Set: 4.12/rtems-autotools.bset
103  Build Set: 4.12/rtems-autotools-internal.bset
104  config: tools/rtems-autoconf-2.69-1.cfg
105  package: autoconf-2.69-x86_64-linux-gnu-1
106  Creating source directory: sources
107  download: ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz -> sources/autoconf-2.69.tar.gz
108  downloading: sources/autoconf-2.69.tar.gz - 1.8MB of 1.8MB (100%)
109  building: autoconf-2.69-x86_64-linux-gnu-1
110  config: tools/rtems-automake-1.12.6-1.cfg
111  package: automake-1.12.6-x86_64-linux-gnu-1
112  download: ftp://ftp.gnu.org/gnu/automake/automake-1.12.6.tar.gz -> sources/automake-1.12.6.tar.gz
113  downloading: sources/automake-1.12.6.tar.gz - 2.0MB of 2.0MB (100%)
114  Creating source directory: patches
115  download: https://git.rtems.org/rtems-tools/plain/tools/4.12/automake/automake-1.12.6-bugzilla.redhat.com-1239379.diff -> patches/automake-1.12.6-bugzilla.redhat.com-1239379.diff
116  downloading: patches/automake-1.12.6-bugzilla.redhat.com-1239379.diff - 408.0 bytes of 408.0 bytes (100%)
117  building: automake-1.12.6-x86_64-linux-gnu-1
118  cleaning: autoconf-2.69-x86_64-linux-gnu-1
119  cleaning: automake-1.12.6-x86_64-linux-gnu-1
120  Build Set: Time 0:00:17.465024
121  Build Set: 4.12/rtems-autotools-base.bset
122  config: tools/rtems-autoconf-2.69-1.cfg
123  package: autoconf-2.69-x86_64-linux-gnu-1
124  building: autoconf-2.69-x86_64-linux-gnu-1
125  reporting: tools/rtems-autoconf-2.69-1.cfg -> autoconf-2.69-x86_64-linux-gnu-1.txt
126  reporting: tools/rtems-autoconf-2.69-1.cfg -> autoconf-2.69-x86_64-linux-gnu-1.xml
127  config: tools/rtems-automake-1.12.6-1.cfg
128  package: automake-1.12.6-x86_64-linux-gnu-1
129  building: automake-1.12.6-x86_64-linux-gnu-1
130  reporting: tools/rtems-automake-1.12.6-1.cfg -> automake-1.12.6-x86_64-linux-gnu-1.txt
131  reporting: tools/rtems-automake-1.12.6-1.cfg -> automake-1.12.6-x86_64-linux-gnu-1.xml
132  installing: autoconf-2.69-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
133  installing: automake-1.12.6-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
134  cleaning: autoconf-2.69-x86_64-linux-gnu-1
135  cleaning: automake-1.12.6-x86_64-linux-gnu-1
136  Build Set: Time 0:00:05.358624
137  Build Set: Time 0:00:22.824422
138  config: devel/expat-2.1.0-1.cfg
139  package: expat-2.1.0-x86_64-linux-gnu-1
140  download: http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz -> sources/expat-2.1.0.tar.gz
141    redirect: http://internode.dl.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz
142  downloading: sources/expat-2.1.0.tar.gz - 549.4kB of 549.4kB (100%)
143  building: expat-2.1.0-x86_64-linux-gnu-1
144  reporting: devel/expat-2.1.0-1.cfg -> expat-2.1.0-x86_64-linux-gnu-1.txt
145  reporting: devel/expat-2.1.0-1.cfg -> expat-2.1.0-x86_64-linux-gnu-1.xml
146  config: tools/rtems-binutils-2.26-1.cfg
147  package: sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1
148  download: ftp://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.bz2 -> sources/binutils-2.26.tar.bz2
149  downloading: sources/binutils-2.26.tar.bz2 - 24.4MB of 24.4MB (100%)
150  download: https://git.rtems.org/rtems-tools/plain/tools/4.12/binutils/binutils-2.26-rtems-aarch64-x86_64.patch -> patches/binutils-2.26-rtems-aarch64-x86_64.patch
151  downloading: patches/binutils-2.26-rtems-aarch64-x86_64.patch - 3.2kB of 3.2kB (100%)
152  building: sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1
153  reporting: tools/rtems-binutils-2.26-1.cfg -> sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1.txt
154  reporting: tools/rtems-binutils-2.26-1.cfg -> sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1.xml
155  config: tools/rtems-gcc-6-20160228-newlib-2.3.0.20160226-1.cfg
156  package: sparc-rtems4.12-gcc-6-20160228-newlib-2.3.0.20160226-x86_64-linux-gnu-1
157  download: ftp://gcc.gnu.org/pub/gcc/snapshots/6-20160228/gcc-6-20160228.tar.bz2 -> sources/gcc-6-20160228.tar.bz2
158  downloading: sources/gcc-6-20160228.tar.bz2 - 90.8MB of 90.8MB (100%)
159  download: ftp://sourceware.org/pub/newlib/newlib-2.3.0.20160226.tar.gz -> sources/newlib-2.3.0.20160226.tar.gz
160  downloading: sources/newlib-2.3.0.20160226.tar.gz - 16.9MB of 16.9MB (100%)
161  download: http://www.mpfr.org/mpfr-2.4.2/mpfr-2.4.2.tar.bz2 ->
162  sources/mpfr-2.4.2.tar.bz2
163  downloading: sources/mpfr-2.4.2.tar.bz2 - 1.0MB of 1.0MB (100%)
164  download: http://www.multiprecision.org/mpc/download/mpc-0.8.1.tar.gz -> sources/mpc-0.8.1.tar.gz
165  downloading: sources/mpc-0.8.1.tar.gz - 532.2kB of 532.2kB (100%)
166  download: ftp://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2 -> sources/gmp-4.3.2.tar.bz2
167  downloading: sources/gmp-4.3.2.tar.bz2 - 1.8MB of 1.8MB (100%)
168  building: sparc-rtems4.12-gcc-6-20160228-newlib-2.3.0.20160226-x86_64-linux-gnu-1
169  reporting: tools/rtems-gcc-6-20160228-newlib-2.3.0.20160226-1.cfg -> sparc-rtems4.12-gcc-6-20160228-newlib-2.3.0.20160226-x86_64-linux-gnu-1.txt
170  reporting: tools/rtems-gcc-6-20160228-newlib-2.3.0.20160226-1.cfg -> sparc-rtems4.12-gcc-6-20160228-newlib-2.3.0.20160226-x86_64-linux-gnu-1.xml
171  config: tools/rtems-gdb-7.9-1.cfg
172  package: sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1
173  download: http://ftp.gnu.org/gnu/gdb/gdb-7.9.tar.xz -> sources/gdb-7.9.tar.xz
174  downloading: sources/gdb-7.9.tar.xz - 17.0MB of 17.0MB (100%)
175  download: https://git.rtems.org/rtems-tools/plain/tools/4.12/gdb/gdb-sim-arange-inline.diff -> patches/gdb-sim-arange-inline.diff
176  downloading: patches/gdb-sim-arange-inline.diff - 761.0 bytes of 761.0 bytes (100%)
177  download: https://git.rtems.org/rtems-tools/plain/tools/4.12/gdb/gdb-sim-cgen-inline.diff -> patches/gdb-sim-cgen-inline.diff
178  downloading: patches/gdb-sim-cgen-inline.diff - 706.0 bytes of 706.0 bytes (100%)
179  download: https://git.rtems.org/rtems-tools/plain/tools/4.12/gdb/gdb-7.9-aarch64-x86_64.patch -> patches/gdb-7.9-aarch64-x86_64.patch
180  downloading: patches/gdb-7.9-aarch64-x86_64.patch - 1.7kB of 1.7kB (100%)
181  building: sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1
182  reporting: tools/rtems-gdb-7.9-1.cfg -> sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1.txt
183  reporting: tools/rtems-gdb-7.9-1.cfg -> sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1.xml
184  config: tools/rtems-tools-4.12-1.cfg
185  package: rtems-tools-HEAD-1
186  Creating source directory: sources/git
187  git: clone: git://git.rtems.org/rtems-tools.git -> sources/git/rtems-tools.git
188  git: reset: git://git.rtems.org/rtems-tools.git
189  git: fetch: git://git.rtems.org/rtems-tools.git -> sources/git/rtems-tools.git
190  git: checkout: git://git.rtems.org/rtems-tools.git => HEAD
191  git: pull: git://git.rtems.org/rtems-tools.git
192  building: rtems-tools-HEAD-1
193  reporting: tools/rtems-tools-4.12-1.cfg -> rtems-tools-HEAD-1.txt
194  reporting: tools/rtems-tools-4.12-1.cfg -> rtems-tools-HEAD-1.xml
195  installing: expat-2.1.0-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
196  installing: sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
197  installing: sparc-rtems4.12-gcc-6-20160228-newlib-2.3.0.20160226-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
198  installing: sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
199  installing: rtems-tools-HEAD-1 -> /usr/home/chris/development/rtems/4.12
200  cleaning: expat-2.1.0-x86_64-linux-gnu-1
201  cleaning: sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1
202  cleaning: sparc-rtems4.12-gcc-6-20160228-newlib-2.3.0.20160226-x86_64-linux-gnu-1
203  cleaning: sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1
204  cleaning: rtems-tools-HEAD-1
205  Build Set: Time 0:31:09.754219
206
207RTEMS Kernel
208~~~~~~~~~~~~
209
210We need to set our path to include the RTEMS tools we built in the previous
211section. The RTEMS tools needs to be first in your path because RTEMS provides
212specific versions of the ``autoconf`` and ``automake`` tools. We want to use
213the RTEMS version and not your host's versions:
214
215
216.. code-block:: shell
217
218  $ export PATH=$HOME/development/rtems/4.12/bin:$PATH
219
220Create a new location to build the RTEMS kernel:
221
222.. code-block:: shell
223
224  $ cd
225  $ cd development/rtems
226  $ mkdir kernel
227  $ cd kernel
228
229Clone the RTEMS respository:
230
231.. code-block:: shell
232
233  $ git clone git://git.rtems.org/rtems.git rtems
234  Cloning into 'rtems'...
235  remote: Counting objects: 483342, done.
236  remote: Compressing objects: 100% (88974/88974), done.
237  remote: Total 483342 (delta 390053), reused 475669 (delta 383809)
238  Receiving objects: 100% (483342/483342), 69.88 MiB | 1.37 MiB/s, done.
239  Resolving deltas: 100% (390053/390053), done.
240  Checking connectivity... done.
241
242The developers version of the code from git requires ``bootstrapping``. This is
243an ``autoconf`` and ``automake`` bootstrap to create the various files generated
244by ``autoconf`` and ``automake``. RTEMS does not keep these generated files
245under version control. The bootstrap process is slow so to speed it up the RSB
246provides a command that can perform the bootstrap in parallel using your
247available cores:
248
249.. code-block:: shell
250
251  $ ./bootstrap -c && ./bootstrap -p && \
252              $HOME/development/rtems/rsb/rsb/source-builder/sb-bootstrap
253  removing automake generated Makefile.in files
254  removing configure files
255  removing aclocal.m4 files
256  Generating ./cpukit/dtc/libfdt/preinstall.am
257  Generating ./cpukit/zlib/preinstall.am
258  Generating ./cpukit/libdl/preinstall.am
259  Generating ./cpukit/posix/preinstall.am
260  Generating ./cpukit/pppd/preinstall.am
261  Generating ./cpukit/librpc/preinstall.am
262  Generating ./cpukit/preinstall.am
263  Generating ./cpukit/sapi/preinstall.am
264  Generating ./cpukit/score/preinstall.am
265  Generating ./cpukit/score/cpu/mips/preinstall.am
266  Generating ./cpukit/score/cpu/sh/preinstall.am
267  Generating ./cpukit/score/cpu/sparc/preinstall.am
268  Generating ./cpukit/score/cpu/no_cpu/preinstall.am
269  Generating ./cpukit/score/cpu/arm/preinstall.am
270  Generating ./cpukit/score/cpu/m32c/preinstall.am
271  Generating ./cpukit/score/cpu/moxie/preinstall.am
272  Generating ./cpukit/score/cpu/v850/preinstall.am
273  Generating ./cpukit/score/cpu/sparc64/preinstall.am
274  Generating ./cpukit/score/cpu/or1k/preinstall.am
275  Generating ./cpukit/score/cpu/i386/preinstall.am
276  Generating ./cpukit/score/cpu/nios2/preinstall.am
277  Generating ./cpukit/score/cpu/epiphany/preinstall.am
278  Generating ./cpukit/score/cpu/m68k/preinstall.am
279  Generating ./cpukit/score/cpu/lm32/preinstall.am
280  Generating ./cpukit/score/cpu/powerpc/preinstall.am
281  Generating ./cpukit/score/cpu/bfin/preinstall.am
282  Generating ./cpukit/libpci/preinstall.am
283  Generating ./cpukit/libcrypt/preinstall.am
284  Generating ./cpukit/rtems/preinstall.am
285  Generating ./cpukit/telnetd/preinstall.am
286  Generating ./cpukit/libnetworking/preinstall.a
287   ......
288  Generating ./c/src/lib/libbsp/powerpc/gen5200/preinstall.am
289  Generating ./c/src/lib/libbsp/powerpc/mpc55xxevb/preinstall.am
290  Generating ./c/src/lib/libbsp/bfin/TLL6527M/preinstall.am
291  Generating ./c/src/lib/libbsp/bfin/bf537Stamp/preinstall.am
292  Generating ./c/src/lib/libbsp/bfin/eZKit533/preinstall.am
293  Generating ./c/src/librtems++/preinstall.am
294  Generating ./c/src/libchip/preinstall.am
295  Generating ./c/src/wrapup/preinstall.am
296  Generating ./c/src/ada/preinstall.am
297  RTEMS Source Builder - RTEMS Bootstrap, 4.12 (e645642255cc modified)
298    1/139: autoreconf: configure.ac
299    2/139: autoreconf: cpukit/configure.ac
300    3/139: autoreconf: tools/cpu/configure.ac
301    4/139: autoreconf: tools/cpu/generic/configure.ac
302    5/139: autoreconf: tools/cpu/sh/configure.ac
303    6/139: autoreconf: tools/cpu/nios2/configure.ac
304    7/139: autoreconf: tools/build/configure.ac
305    8/139: autoreconf: doc/configure.ac
306   ......
307  124/139: autoreconf: c/src/make/configure.ac
308  125/139: autoreconf: c/src/librtems++/configure.ac
309  126/139: autoreconf: c/src/ada-tests/configure.ac
310  127/139: autoreconf: testsuites/configure.ac
311  128/139: autoreconf: testsuites/libtests/configure.ac
312  129/139: autoreconf: testsuites/mptests/configure.ac
313  130/139: autoreconf: testsuites/fstests/configure.ac
314  131/139: autoreconf: testsuites/sptests/configure.ac
315  132/139: autoreconf: testsuites/tmtests/configure.ac
316  133/139: autoreconf: testsuites/smptests/configure.ac
317  134/139: autoreconf: testsuites/tools/configure.ac
318  135/139: autoreconf: testsuites/tools/generic/configure.ac
319  136/139: autoreconf: testsuites/psxtests/configure.ac
320  137/139: autoreconf: testsuites/psxtmtests/configure.ac
321  138/139: autoreconf: testsuites/rhealstone/configure.ac
322  139/139: autoreconf: testsuites/samples/configure.ac
323  Bootstrap time: 0:02:47.398824
324
325We build RTEMS in a directory outside of the source tree we have just cloned
326and ``bootstrapped``. You cannot build RTEMS while in the source tree. Lets
327create a suitable directory using the name of the BSP we are going to build:
328
329.. code-block:: shell
330
331  $ cd ..
332  $ mkdir erc32
333  $ cd erc32
334
335Configure RTEMS using the ``configure`` command. We use a full path to
336``configure`` so the object files built contain the absolute path of the source
337files. If you are source level debugging you will be able to access the source
338code to RTEMS from the debugger. We will build for the ``erc32`` BSP with POSIX
339enabled and the networking stack disabled:
340
341.. code-block:: shell
342
343  $ $HOME/development/rtems/kernel/rtems/configure --prefix=$HOME/development/rtems/4.12 \
344                     --target=sparc-rtems4.12 --enable-rtemsbsp=erc32 --enable-posix \
345                     --disable-networking
346  checking for gmake... no
347  checking for make... make
348  checking for RTEMS Version... 4.11.99.0
349  checking build system type... x86_64-pc-linux-gnu
350  checking host system type... x86_64-pc-linux-gnu
351  checking target system type... sparc-unknown-rtems4.12
352  checking for a BSD-compatible install... /usr/bin/install -c
353  checking whether build environment is sane... yes
354  checking for a thread-safe mkdir -p... /bin/mkdir -p
355  checking for gawk... no
356  checking for mawk... mawk
357  checking whether make sets $(MAKE)... yes
358  checking whether to enable maintainer-specific portions of Makefiles... no
359  checking that generated files are newer than configure... done
360   ......
361  checking target system type... sparc-unknown-rtems4.12
362  checking rtems target cpu... sparc
363  checking for a BSD-compatible install... /usr/bin/install -c
364  checking whether build environment is sane... yes
365  checking for sparc-rtems4.12-strip... sparc-rtems4.12-strip
366  checking for a thread-safe mkdir -p... /bin/mkdir -p
367  checking for gawk... no
368  checking for mawk... mawk
369  checking whether make sets $(MAKE)... yes
370  checking whether to enable maintainer-specific portions of Makefiles... no
371  checking that generated files are newer than configure... done
372  configure: creating ./config.status
373  config.status: creating Makefile
374
375  target architecture: sparc.
376  available BSPs: erc32.
377  'make all' will build the following BSPs: erc32.
378  other BSPs can be built with 'make RTEMS_BSP="bsp1 bsp2 ..."'
379
380  config.status: creating Makefile
381
382Build RTEMS using two cores:
383
384.. code-block:: shell
385
386  $ make -j 2
387  Making all in tools/build
388  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
389  make  all-am
390  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
391  gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build     -g -O2 -MT cklength.o -MD -MP -MF .deps/cklength.Tpo -c -o cklength.o /home/chris/development/rtems/kernel/rtems/tools/build/cklength.c
392  gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build     -g -O2 -MT eolstrip.o -MD -MP -MF .deps/eolstrip.Tpo -c -o eolstrip.o /home/chris/development/rtems/kernel/rtems/tools/build/eolstrip.c
393  mv -f .deps/cklength.Tpo .deps/cklength.Po
394  mv -f .deps/eolstrip.Tpo .deps/eolstrip.Po
395  gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build     -g -O2 -MT compat.o -MD -MP -MF .deps/compat.Tpo -c -o compat.o /home/chris/development/rtems/kernel/rtems/tools/build/compat.c
396  gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build     -g -O2 -MT packhex.o -MD -MP -MF .deps/packhex.Tpo -c -o packhex.o /home/chris/development/rtems/kernel/rtems/tools/build/packhex.c
397  mv -f .deps/compat.Tpo .deps/compat.Po
398  gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build     -g -O2 -MT unhex.o -MD -MP -MF .deps/unhex.Tpo -c -o unhex.o /home/chris/development/rtems/kernel/rtems/tools/build/unhex.c
399  mv -f .deps/packhex.Tpo .deps/packhex.Po
400  gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build     -g -O2 -MT rtems-bin2c.o -MD -MP -MF .deps/rtems-bin2c.Tpo -c -o rtems-bin2c.o /home/chris/development/rtems/kernel/rtems/tools/build/rtems-bin2c.c
401  mv -f .deps/unhex.Tpo .deps/unhex.Po
402  gcc -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/tools/build     -g -O2 -MT binpatch.o -MD -MP -MF .deps/binpatch.Tpo -c -o binpatch.o /home/chris/development/rtems/kernel/rtems/tools/build/binpatch.c
403  mv -f .deps/rtems-bin2c.Tpo .deps/rtems-bin2c.Po
404  gcc  -g -O2   -o cklength cklength.o
405  mv -f .deps/binpatch.Tpo .deps/binpatch.Po
406  gcc  -g -O2   -o eolstrip eolstrip.o compat.o
407  gcc  -g -O2   -o packhex packhex.o
408  gcc  -g -O2   -o rtems-bin2c rtems-bin2c.o compat.o
409  gcc  -g -O2   -o unhex unhex.o compat.o
410  gcc  -g -O2   -o binpatch binpatch.o
411  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
412  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
413  Making all in tools/cpu
414  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
415  Making all in generic
416  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
417  make[2]: Nothing to be done for 'all'.
418  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
419  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
420  make[2]: Nothing to be done for 'all-am'.
421  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
422  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
423  Making all in testsuites/tools
424  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
425  Making all in generic
426  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools/generic'
427  make[2]: Nothing to be done for 'all'.
428  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools/generic'
429  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
430  make[2]: Nothing to be done for 'all-am'.
431  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
432  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
433  Making all in sparc-rtems4.12/c
434  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c'
435  Making all in .
436  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c'
437  Configuring RTEMS_BSP=erc32
438  checking for gmake... no
439  checking for make... make
440  checking build system type... x86_64-pc-linux-gnu
441  checking host system type... sparc-unknown-rtems4.12
442   ......
443  cp paranoia.exe paranoia.ralf
444  make[6]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c/erc32/testsuites/samples/paranoia'
445  Making all in nsecs
446  make[6]: Entering directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c/erc32/testsuites/samples/nsecs'
447  sparc-rtems4.12-gcc -B../../../../../erc32/lib/ -specs bsp_specs -qrtems -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/nsecs -I.. -I/home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/../support/include   -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT init.o -MD -MP -MF .deps/init.Tpo -c -o init.o /home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/nsecs/init.c
448  sparc-rtems4.12-gcc -B../../../../../erc32/lib/ -specs bsp_specs -qrtems -DHAVE_CONFIG_H -I. -I/home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/nsecs -I.. -I/home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/../support/include   -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT empty.o -MD -MP -MF .deps/empty.Tpo -c -o empty.o /home/chris/development/rtems/kernel/rtems/c/src/../../testsuites/samples/nsecs/empty.c
449  mv -f .deps/empty.Tpo .deps/empty.Po
450  mv -f .deps/init.Tpo .deps/init.Po
451  sparc-rtems4.12-gcc -B../../../../../erc32/lib/ -specs bsp_specs -qrtems -mcpu=cypress -O2 -g -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -Wl,--gc-sections  -mcpu=cypress   -o nsecs.exe init.o empty.o
452  sparc-rtems4.12-nm -g -n nsecs.exe > nsecs.num
453  sparc-rtems4.12-size nsecs.exe
454     text    data     bss     dec     hex filename
455   121392    1888    6624  129904   1fb70 nsecs.exe
456  cp nsecs.exe nsecs.ralf
457  make[6]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c/erc32/testsuites/samples/nsecs'
458  make[5]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c/erc32/testsuites/samples'
459  make[4]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c/erc32/testsuites/samples'
460  make[4]: Entering directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c/erc32/testsuites'
461  make[4]: Nothing to be done for 'all-am'.
462  make[4]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c/erc32/testsuites'
463  make[3]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c/erc32/testsuites'
464  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c/erc32'
465  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c'
466  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32'
467  make[1]: Nothing to be done for 'all-am'.
468  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32'
469
470All that remains to be done is to install the kernel. Installing RTEMS copies
471the API headers and architecture specific libraries to a locaiton under the
472`prefix` you provide. You can install any number of BSPs under the same
473`prefix`. We recommend you have a separate `prefix` for different versions of
474RTEMS. Do not mix versions of RTEMS under the same `prefix`. Make installs
475RTEMS with the following command:
476
477.. code-block:: shell
478
479  $ make install
480  Making install in tools/build
481  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
482  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
483  /bin/mkdir -p '/home/chris/development/rtems/4.12/bin'
484  /usr/bin/install -c cklength eolstrip packhex unhex rtems-bin2c '/home/chris/development/rtems/4.12/bin'
485  /bin/mkdir -p '/home/chris/development/rtems/4.12/bin'
486  /usr/bin/install -c install-if-change '/home/chris/development/rtems/4.12/bin'
487  make[2]: Nothing to be done for 'install-data-am'.
488  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
489  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
490  Making install in tools/cpu
491  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
492  Making install in generic
493  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
494  make[3]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
495  make[3]: Nothing to be done for 'install-exec-am'.
496  make[3]: Nothing to be done for 'install-data-am'.
497  make[3]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
498  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
499  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
500  make[3]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
501  make[3]: Nothing to be done for 'install-exec-am'.
502  make[3]: Nothing to be done for 'install-data-am'.
503  make[3]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
504  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
505  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu
506   ......
507  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c'
508  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32'
509  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32'
510  make[2]: Nothing to be done for 'install-exec-am'.
511  /bin/mkdir -p '/home/chris/development/rtems/4.12/make'
512  /usr/bin/install -c -m 644 /home/chris/development/rtems/kernel/rtems/make/main.cfg /home/chris/development/rtems/kernel/rtems/make/leaf.cfg '/home/chris/development/rtems/4.12/make'
513  /bin/mkdir -p '/home/chris/development/rtems/4.12/share/rtems4.12/make/Templates'
514  /usr/bin/install -c -m 644 /home/chris/development/rtems/kernel/rtems/make/Templates/Makefile.dir /home/chris/development/rtems/kernel/rtems/make/Templates/Makefile.leaf /home/chris/development/rtems/kernel/rtems/make/Templates/Makefile.lib '/home/chris/development/rtems/4.12/share/rtems4.12/make/Templates'
515  /bin/mkdir -p '/home/chris/development/rtems/4.12/make/custom'
516  /usr/bin/install -c -m 644 /home/chris/development/rtems/kernel/rtems/make/custom/default.cfg '/home/chris/development/rtems/4.12/make/custom'
517  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32'
518  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32'
519
520Contributing Patches
521~~~~~~~~~~~~~~~~~~~~
522
523RTEMS welcomes fixes to bugs and new features. The RTEMS Project likes to have
524bugs fixed against a ticket created on our :r:url:`devel`. Please raise a
525ticket if you have a bug. Any changes that are made can be tracked against the
526ticket. If you want to add a new a feature please post a message to
527:r:list:`devel` describing what you would like to implement. The RTEMS
528maintainer will help decide if the feature is in the best interest of the
529project. Not everything is and the maintainers need to evalulate how much
530effort it is to maintain the feature. Once accepted into the source tree it
531becomes the responsibility of the maintainers to keep the feature updated and
532working.
533
534Changes to the source tree are tracked using git. If you have not made changes
535and enter the source tree and enter a git status command you will see nothing
536has changed:
537
538.. code-block:: shell
539
540  $ cd ../rtems
541  $ git status
542  On branch master
543  Your branch is up-to-date with 'origin/master'.
544  nothing to commit, working directory clean
545
546We will make a change to the source code. In this example I change the help
547message to the RTEMS shell's ``halt`` command. Running the same git status
548command reports:
549
550.. code-block:: shell
551
552  $ git status
553  On branch master
554  Your branch is up-to-date with 'origin/master'.
555  Changes not staged for commit:
556    (use "git add <file>..." to update what will be committed)
557    (use "git checkout -- <file>..." to discard changes in working directory)
558
559          modified:   cpukit/libmisc/shell/main_halt.c
560
561  no changes added to commit (use "git add" and/or "git commit -a")
562
563As an example I have a ticket open and the ticket number is 9876. I commit the
564change with the follow git command:
565
566.. code-block:: shell
567
568  $ git commit cpukit/libmisc/shell/main_halt.c
569
570An editor is opened and I enter my commit message. The first line is a title
571and the following lines form a body. My message is:
572
573.. code-block:: shell
574
575  shell: Add more help detail to the halt command.
576
577  Closes #9876.
578
579  # Please enter the commit message for your changes. Lines starting
580  # with '#' will be ignored, and an empty message aborts the commit.
581  # Explicit paths specified without -i or -o; assuming --only paths...
582  #
583  # Committer: Chris Johns <chrisj@rtems.org>
584  #
585  # On branch master
586  # Your branch is up-to-date with 'origin/master'.
587  #
588  # Changes to be committed:
589  #       modified:   cpukit/libmisc/shell/main_halt.c
590
591When you save and exit the editor git will report the commit's status:
592
593.. code-block:: shell
594
595  $ git commit cpukit/libmisc/shell/main_halt.c
596  [master 9f44dc9] shell: Add more help detail to the halt command.
597   1 file changed, 1 insertion(+), 1 deletion(-)
598
599You can either email the patch to :r:list:`devel` with the following git
600command:
601
602.. code-block:: shell
603
604  $ git send-email --to=devel@rtems.org -1
605   <add output here>
606
607Or you can ask git to create a patch file using:
608
609.. code-block:: shell
610
611  $ git format-patch -1
612  0001-shell-Add-more-help-detail-to-the-halt-command.patch
613
614This patch can be attached to a ticket.
Note: See TracBrowser for help on using the repository browser.