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

4.115am
Last change on this file since 489740f was 489740f, checked in by Chris Johns <chrisj@…>, on 05/20/16 at 02:47:09

Set SPDX License Identifier in each source file.

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