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

4.115am
Last change on this file since 27bcdfb was 27bcdfb, checked in by Chris Johns <chrisj@…>, on 03/22/16 at 01:54:39

Add a basics section to Getting Started. Rearrange the content.

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