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

4.115am
Last change on this file since 5353914 was 5353914, checked in by Chris Johns <chrisj@…>, on 03/20/16 at 23:27:52

Updates from user reviews.

  • Property mode set to 100644
File size: 31.9 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 we ``bootstrap`` the
243source code. This is an ``autoconf`` and ``automake`` bootstrap to create the
244various files generated by ``autoconf`` and ``automake``. RTEMS does not keep
245these generated files under version control. The bootstrap process is slow so
246to speed it up the RSB provides a command that can perform the bootstrap in
247parallel using your available cores. We need to enter the cloned source
248directory then run the bootsrap commands:
249
250.. code-block:: shell
251
252  $ cd rtems
253  $ ./bootstrap -c && ./bootstrap -p && \
254              $HOME/development/rtems/rsb/source-builder/sb-bootstrap
255  removing automake generated Makefile.in files
256  removing configure files
257  removing aclocal.m4 files
258  Generating ./cpukit/dtc/libfdt/preinstall.am
259  Generating ./cpukit/zlib/preinstall.am
260  Generating ./cpukit/libdl/preinstall.am
261  Generating ./cpukit/posix/preinstall.am
262  Generating ./cpukit/pppd/preinstall.am
263  Generating ./cpukit/librpc/preinstall.am
264  Generating ./cpukit/preinstall.am
265  Generating ./cpukit/sapi/preinstall.am
266  Generating ./cpukit/score/preinstall.am
267  Generating ./cpukit/score/cpu/mips/preinstall.am
268  Generating ./cpukit/score/cpu/sh/preinstall.am
269  Generating ./cpukit/score/cpu/sparc/preinstall.am
270  Generating ./cpukit/score/cpu/no_cpu/preinstall.am
271  Generating ./cpukit/score/cpu/arm/preinstall.am
272  Generating ./cpukit/score/cpu/m32c/preinstall.am
273  Generating ./cpukit/score/cpu/moxie/preinstall.am
274  Generating ./cpukit/score/cpu/v850/preinstall.am
275  Generating ./cpukit/score/cpu/sparc64/preinstall.am
276  Generating ./cpukit/score/cpu/or1k/preinstall.am
277  Generating ./cpukit/score/cpu/i386/preinstall.am
278  Generating ./cpukit/score/cpu/nios2/preinstall.am
279  Generating ./cpukit/score/cpu/epiphany/preinstall.am
280  Generating ./cpukit/score/cpu/m68k/preinstall.am
281  Generating ./cpukit/score/cpu/lm32/preinstall.am
282  Generating ./cpukit/score/cpu/powerpc/preinstall.am
283  Generating ./cpukit/score/cpu/bfin/preinstall.am
284  Generating ./cpukit/libpci/preinstall.am
285  Generating ./cpukit/libcrypt/preinstall.am
286  Generating ./cpukit/rtems/preinstall.am
287  Generating ./cpukit/telnetd/preinstall.am
288  Generating ./cpukit/libnetworking/preinstall.a
289   ......
290  Generating ./c/src/lib/libbsp/powerpc/gen5200/preinstall.am
291  Generating ./c/src/lib/libbsp/powerpc/mpc55xxevb/preinstall.am
292  Generating ./c/src/lib/libbsp/bfin/TLL6527M/preinstall.am
293  Generating ./c/src/lib/libbsp/bfin/bf537Stamp/preinstall.am
294  Generating ./c/src/lib/libbsp/bfin/eZKit533/preinstall.am
295  Generating ./c/src/librtems++/preinstall.am
296  Generating ./c/src/libchip/preinstall.am
297  Generating ./c/src/wrapup/preinstall.am
298  Generating ./c/src/ada/preinstall.am
299  RTEMS Source Builder - RTEMS Bootstrap, 4.12 (e645642255cc modified)
300    1/139: autoreconf: configure.ac
301    2/139: autoreconf: cpukit/configure.ac
302    3/139: autoreconf: tools/cpu/configure.ac
303    4/139: autoreconf: tools/cpu/generic/configure.ac
304    5/139: autoreconf: tools/cpu/sh/configure.ac
305    6/139: autoreconf: tools/cpu/nios2/configure.ac
306    7/139: autoreconf: tools/build/configure.ac
307    8/139: autoreconf: doc/configure.ac
308   ......
309  124/139: autoreconf: c/src/make/configure.ac
310  125/139: autoreconf: c/src/librtems++/configure.ac
311  126/139: autoreconf: c/src/ada-tests/configure.ac
312  127/139: autoreconf: testsuites/configure.ac
313  128/139: autoreconf: testsuites/libtests/configure.ac
314  129/139: autoreconf: testsuites/mptests/configure.ac
315  130/139: autoreconf: testsuites/fstests/configure.ac
316  131/139: autoreconf: testsuites/sptests/configure.ac
317  132/139: autoreconf: testsuites/tmtests/configure.ac
318  133/139: autoreconf: testsuites/smptests/configure.ac
319  134/139: autoreconf: testsuites/tools/configure.ac
320  135/139: autoreconf: testsuites/tools/generic/configure.ac
321  136/139: autoreconf: testsuites/psxtests/configure.ac
322  137/139: autoreconf: testsuites/psxtmtests/configure.ac
323  138/139: autoreconf: testsuites/rhealstone/configure.ac
324  139/139: autoreconf: testsuites/samples/configure.ac
325  Bootstrap time: 0:02:47.398824
326
327We build RTEMS in a directory outside of the source tree we have just cloned
328and ``bootstrapped``. You cannot build RTEMS while in the source tree. Lets
329create a suitable directory using the name of the BSP we are going to build:
330
331.. code-block:: shell
332
333  $ cd ..
334  $ mkdir erc32
335  $ cd erc32
336
337Configure RTEMS using the ``configure`` command. We use a full path to
338``configure`` so the object files built contain the absolute path of the source
339files. If you are source level debugging you will be able to access the source
340code to RTEMS from the debugger. We will build for the ``erc32`` BSP with POSIX
341enabled and the networking stack disabled:
342
343.. code-block:: shell
344
345  $ $HOME/development/rtems/kernel/rtems/configure --prefix=$HOME/development/rtems/4.12 \
346                     --target=sparc-rtems4.12 --enable-rtemsbsp=erc32 --enable-posix \
347                     --disable-networking
348  checking for gmake... no
349  checking for make... make
350  checking for RTEMS Version... 4.11.99.0
351  checking build system type... x86_64-pc-linux-gnu
352  checking host system type... x86_64-pc-linux-gnu
353  checking target system type... sparc-unknown-rtems4.12
354  checking for a BSD-compatible install... /usr/bin/install -c
355  checking whether build environment is sane... yes
356  checking for a thread-safe mkdir -p... /bin/mkdir -p
357  checking for gawk... no
358  checking for mawk... mawk
359  checking whether make sets $(MAKE)... yes
360  checking whether to enable maintainer-specific portions of Makefiles... no
361  checking that generated files are newer than configure... done
362   ......
363  checking target system type... sparc-unknown-rtems4.12
364  checking rtems target cpu... sparc
365  checking for a BSD-compatible install... /usr/bin/install -c
366  checking whether build environment is sane... yes
367  checking for sparc-rtems4.12-strip... sparc-rtems4.12-strip
368  checking for a thread-safe mkdir -p... /bin/mkdir -p
369  checking for gawk... no
370  checking for mawk... mawk
371  checking whether make sets $(MAKE)... yes
372  checking whether to enable maintainer-specific portions of Makefiles... no
373  checking that generated files are newer than configure... done
374  configure: creating ./config.status
375  config.status: creating Makefile
376
377  target architecture: sparc.
378  available BSPs: erc32.
379  'make all' will build the following BSPs: erc32.
380  other BSPs can be built with 'make RTEMS_BSP="bsp1 bsp2 ..."'
381
382  config.status: creating Makefile
383
384Build RTEMS using two cores:
385
386.. code-block:: shell
387
388  $ make -j 2
389  Making all in tools/build
390  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
391  make  all-am
392  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
393  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
394  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
395  mv -f .deps/cklength.Tpo .deps/cklength.Po
396  mv -f .deps/eolstrip.Tpo .deps/eolstrip.Po
397  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
398  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
399  mv -f .deps/compat.Tpo .deps/compat.Po
400  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
401  mv -f .deps/packhex.Tpo .deps/packhex.Po
402  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
403  mv -f .deps/unhex.Tpo .deps/unhex.Po
404  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
405  mv -f .deps/rtems-bin2c.Tpo .deps/rtems-bin2c.Po
406  gcc  -g -O2   -o cklength cklength.o
407  mv -f .deps/binpatch.Tpo .deps/binpatch.Po
408  gcc  -g -O2   -o eolstrip eolstrip.o compat.o
409  gcc  -g -O2   -o packhex packhex.o
410  gcc  -g -O2   -o rtems-bin2c rtems-bin2c.o compat.o
411  gcc  -g -O2   -o unhex unhex.o compat.o
412  gcc  -g -O2   -o binpatch binpatch.o
413  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
414  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
415  Making all in tools/cpu
416  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
417  Making all in generic
418  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
419  make[2]: Nothing to be done for 'all'.
420  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
421  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
422  make[2]: Nothing to be done for 'all-am'.
423  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
424  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
425  Making all in testsuites/tools
426  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
427  Making all in generic
428  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools/generic'
429  make[2]: Nothing to be done for 'all'.
430  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools/generic'
431  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
432  make[2]: Nothing to be done for 'all-am'.
433  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
434  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/testsuites/tools'
435  Making all in sparc-rtems4.12/c
436  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c'
437  Making all in .
438  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c'
439  Configuring RTEMS_BSP=erc32
440  checking for gmake... no
441  checking for make... make
442  checking build system type... x86_64-pc-linux-gnu
443  checking host system type... sparc-unknown-rtems4.12
444   ......
445  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
446  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
447  mv -f .deps/empty.Tpo .deps/empty.Po
448  mv -f .deps/init.Tpo .deps/init.Po
449  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
450  sparc-rtems4.12-nm -g -n nsecs.exe > nsecs.num
451  sparc-rtems4.12-size nsecs.exe
452     text    data     bss     dec     hex filename
453   121392    1888    6624  129904   1fb70 nsecs.exe
454  cp nsecs.exe nsecs.ralf
455  make[6]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/ c/erc32/testsuites/samples/nsecs'
456  make[5]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/ c/erc32/testsuites/samples'
457  make[4]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/ c/erc32/testsuites/samples'
458  make[4]: Entering directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/ c/erc32/testsuites'
459  make[4]: Nothing to be done for 'all-am'.
460  make[4]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/ c/erc32/testsuites'
461  make[3]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/ c/erc32/testsuites'
462  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/ c/erc32'
463  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c'
464  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32'
465  make[1]: Nothing to be done for 'all-am'.
466  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32'
467
468All that remains to be done is to install the kernel. Installing RTEMS copies
469the API headers and architecture specific libraries to a locaiton under the
470`prefix` you provide. You can install any number of BSPs under the same
471`prefix`. We recommend you have a separate `prefix` for different versions of
472RTEMS. Do not mix versions of RTEMS under the same `prefix`. Make installs
473RTEMS with the following command:
474
475.. code-block:: shell
476
477  $ make install
478  Making install in tools/build
479  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
480  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/build'
481  /bin/mkdir -p '/home/chris/development/rtems/4.12/bin'
482  /usr/bin/install -c cklength eolstrip packhex unhex rtems-bin2c '/home/chris/development/rtems/4.12/bin'
483  /bin/mkdir -p '/home/chris/development/rtems/4.12/bin'
484  /usr/bin/install -c install-if-change '/home/chris/development/rtems/4.12/bin'
485  make[2]: Nothing to be done for 'install-data-am'.
486  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
487  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/build'
488  Making install in tools/cpu
489  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
490  Making install in generic
491  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
492  make[3]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
493  make[3]: Nothing to be done for 'install-exec-am'.
494  make[3]: Nothing to be done for 'install-data-am'.
495  make[3]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
496  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu/generic'
497  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
498  make[3]: Entering directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
499  make[3]: Nothing to be done for 'install-exec-am'.
500  make[3]: Nothing to be done for 'install-data-am'.
501  make[3]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
502  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu'
503  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/tools/cpu
504   ......
505  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32/sparc-rtems4.12/c'
506  make[1]: Entering directory '/home/chris/development/rtems/kernel/erc32'
507  make[2]: Entering directory '/home/chris/development/rtems/kernel/erc32'
508  make[2]: Nothing to be done for 'install-exec-am'.
509  /bin/mkdir -p '/home/chris/development/rtems/4.12/make'
510  /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'
511  /bin/mkdir -p '/home/chris/development/rtems/4.12/share/rtems4.12/make/Templates'
512  /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'
513  /bin/mkdir -p '/home/chris/development/rtems/4.12/make/custom'
514  /usr/bin/install -c -m 644 /home/chris/development/rtems/kernel/rtems/make/custom/default.cfg '/home/chris/development/rtems/4.12/make/custom'
515  make[2]: Leaving directory '/home/chris/development/rtems/kernel/erc32'
516  make[1]: Leaving directory '/home/chris/development/rtems/kernel/erc32'
517
518Contributing Patches
519~~~~~~~~~~~~~~~~~~~~
520
521RTEMS welcomes fixes to bugs and new features. The RTEMS Project likes to have
522bugs fixed against a ticket created on our :r:url:`devel`. Please raise a
523ticket if you have a bug. Any changes that are made can be tracked against the
524ticket. If you want to add a new a feature please post a message to
525:r:list:`devel` describing what you would like to implement. The RTEMS
526maintainer will help decide if the feature is in the best interest of the
527project. Not everything is and the maintainers need to evalulate how much
528effort it is to maintain the feature. Once accepted into the source tree it
529becomes the responsibility of the maintainers to keep the feature updated and
530working.
531
532Changes to the source tree are tracked using git. If you have not made changes
533and enter the source tree and enter a git status command you will see nothing
534has changed:
535
536.. code-block:: shell
537
538  $ cd ../rtems
539  $ git status
540  On branch master
541  Your branch is up-to-date with 'origin/master'.
542  nothing to commit, working directory clean
543
544We will make a change to the source code. In this example I change the help
545message to the RTEMS shell's ``halt`` command. Running the same git status
546command reports:
547
548.. code-block:: shell
549
550  $ git status
551  On branch master
552  Your branch is up-to-date with 'origin/master'.
553  Changes not staged for commit:
554    (use "git add <file>..." to update what will be committed)
555    (use "git checkout -- <file>..." to discard changes in working directory)
556
557          modified:   cpukit/libmisc/shell/main_halt.c
558
559  no changes added to commit (use "git add" and/or "git commit -a")
560
561As an example I have a ticket open and the ticket number is 9876. I commit the
562change with the follow git command:
563
564.. code-block:: shell
565
566  $ git commit cpukit/libmisc/shell/main_halt.c
567
568An editor is opened and I enter my commit message. The first line is a title
569and the following lines form a body. My message is:
570
571.. code-block:: shell
572
573  shell: Add more help detail to the halt command.
574
575  Closes #9876.
576
577  # Please enter the commit message for your changes. Lines starting
578  # with '#' will be ignored, and an empty message aborts the commit.
579  # Explicit paths specified without -i or -o; assuming --only paths...
580  #
581  # Committer: Chris Johns <chrisj@rtems.org>
582  #
583  # On branch master
584  # Your branch is up-to-date with 'origin/master'.
585  #
586  # Changes to be committed:
587  #       modified:   cpukit/libmisc/shell/main_halt.c
588
589When you save and exit the editor git will report the commit's status:
590
591.. code-block:: shell
592
593  $ git commit cpukit/libmisc/shell/main_halt.c
594  [master 9f44dc9] shell: Add more help detail to the halt command.
595   1 file changed, 1 insertion(+), 1 deletion(-)
596
597You can either email the patch to :r:list:`devel` with the following git
598command:
599
600.. code-block:: shell
601
602  $ git send-email --to=devel@rtems.org -1
603   <add output here>
604
605Or you can ask git to create a patch file using:
606
607.. code-block:: shell
608
609  $ git format-patch -1
610  0001-shell-Add-more-help-detail-to-the-halt-command.patch
611
612This patch can be attached to a ticket.
Note: See TracBrowser for help on using the repository browser.