source: rtems-docs/user/installation/developer.rst @ f92357f

4.115
Last change on this file since f92357f was 86518bd, checked in by Chris Johns <chrisj@…>, on 07/04/16 at 02:30:09

Reorganisse the User Manual to make it easier to navigate.

  • Property mode set to 100644
File size: 31.0 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.. _developer:
7.. _development-version:
8.. _unstable:
9
10Developer (Unstable)
11--------------------
12.. index:: Git
13
14RTEMS provides open access to it's development processes. We call this the
15developer set up.  The project encouages all users to inspect, review, comment
16and contribute to the code base. The processes described here are the same
17processes the core development team use when developing and maintaining RTEMS.
18
19.. warning::
20
21   The development version is not for use in production and it can break from
22   time to time.
23
24Please read :ref:`development-host` before continuing. The following procedure
25assumes you have installed and configured your host operating system. It also
26assumes you have installed any dependent packages needed when building the
27tools and the kernel.
28
29You need to select a location to build and install the RTEMS Tool chain and
30RTEMS. Make sure there is plenty of disk space and a fast disk is
31recommended. Our procedure will document building and installing the tools in a
32home directory called :file:`development/rtems`. Using a home directory means
33you can do this without needing to be root. You can also use
34:file:`/opt/rtems/build` if you have access to that path.
35
36The location used to install the tools and kernel is called the `prefix`. It is
37best to have a `prefix` for each different version of RTEMS you are using. If
38you are using RTEMS 4.11 in production it is not a good idea to install a
39development version of 4.12 over the top. A separate `prefix` for each version
40avoids this.
41
42The RTEMS tool chain changes less often than the RTEMS kernel. One method of
43working with development releases is to have a separate `prefix` for the RTEMS
44tools and a different one for the RTEMS kernel. You can then update each
45without interacting with the other. You can also have a number of RTEMS
46versions available to test with.
47
48.. sidebar:: *Downloading the source*
49
50  You need an internet connection to download the source. The downloaded source
51  is cached locally and the RSB checksums it. If you run a build again the
52  download output will be missing. Using the RSB from git will download the
53  source from the upstream project's home site and this could be `http`, `ftp`,
54  or `git`.
55
56.. _posix-host-tools-chain:
57.. _macos-host-tools-chain:
58
59POSIX and OS X Host Tools Chain
60~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
61
62This procedure will build a SPARC tool chain.
63
64Clone the RTEMS Source Builder (RSB) repository:
65
66.. code-block:: shell
67
68  $ cd
69  $ mkdir -p development/rtems
70  $ cd development/rtems
71  $ git clone git://git.rtems.org/rtems-source-builder.git rsb
72  Cloning into 'rsb'...
73  remote: Counting objects: 5837, done.
74  remote: Compressing objects: 100% (2304/2304), done.
75  remote: Total 5837 (delta 4014), reused 5056 (delta 3494)
76  Receiving objects: 100% (5837/5837), 2.48 MiB | 292.00 KiB/s, done.
77  Resolving deltas: 100% (4014/4014), done.
78  Checking connectivity... done.
79
80Check all the host packages you need are present. Current libraries are not
81checked and this includes checking for the python development libraries GDB
82requires:
83
84.. code-block:: shell
85
86  $ cd rsb
87  $ ./source-builder/sb-check
88  RTEMS Source Builder - Check, 4.12 (e645642255cc)
89  Environment is ok
90
91Build a tool chain for the SPARC architecure. We are using the SPARC
92architecture because GDB has a good simulator that lets us run and test the
93samples RTEMS builds by default. The current development version
94is `4.12` and is on master:
95
96.. code-block:: shell
97
98  $ cd rtems
99  $ ../source-builder/sb-set-builder \
100      --prefix=/usr/home/chris/development/rtems/4.12 4.12/rtems-sparc
101  RTEMS Source Builder - Set Builder, 4.12 (e645642255cc)
102  Build Set: 4.12/rtems-sparc
103  Build Set: 4.12/rtems-autotools.bset
104  Build Set: 4.12/rtems-autotools-internal.bset
105  config: tools/rtems-autoconf-2.69-1.cfg
106  package: autoconf-2.69-x86_64-linux-gnu-1
107  Creating source directory: sources
108  download: ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz -> sources/autoconf-2.69.tar.gz
109  downloading: sources/autoconf-2.69.tar.gz - 1.8MB of 1.8MB (100%)
110  building: autoconf-2.69-x86_64-linux-gnu-1
111  config: tools/rtems-automake-1.12.6-1.cfg
112  package: automake-1.12.6-x86_64-linux-gnu-1
113  download: ftp://ftp.gnu.org/gnu/automake/automake-1.12.6.tar.gz -> sources/automake-1.12.6.tar.gz
114  downloading: sources/automake-1.12.6.tar.gz - 2.0MB of 2.0MB (100%)
115  Creating source directory: patches
116  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
117  downloading: patches/automake-1.12.6-bugzilla.redhat.com-1239379.diff - 408.0 bytes of 408.0 bytes (100%)
118  building: automake-1.12.6-x86_64-linux-gnu-1
119  cleaning: autoconf-2.69-x86_64-linux-gnu-1
120  cleaning: automake-1.12.6-x86_64-linux-gnu-1
121  Build Set: Time 0:00:17.465024
122  Build Set: 4.12/rtems-autotools-base.bset
123  config: tools/rtems-autoconf-2.69-1.cfg
124  package: autoconf-2.69-x86_64-linux-gnu-1
125  building: autoconf-2.69-x86_64-linux-gnu-1
126  reporting: tools/rtems-autoconf-2.69-1.cfg -> autoconf-2.69-x86_64-linux-gnu-1.txt
127  reporting: tools/rtems-autoconf-2.69-1.cfg -> autoconf-2.69-x86_64-linux-gnu-1.xml
128  config: tools/rtems-automake-1.12.6-1.cfg
129  package: automake-1.12.6-x86_64-linux-gnu-1
130  building: automake-1.12.6-x86_64-linux-gnu-1
131  reporting: tools/rtems-automake-1.12.6-1.cfg -> automake-1.12.6-x86_64-linux-gnu-1.txt
132  reporting: tools/rtems-automake-1.12.6-1.cfg -> automake-1.12.6-x86_64-linux-gnu-1.xml
133  installing: autoconf-2.69-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
134  installing: automake-1.12.6-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
135  cleaning: autoconf-2.69-x86_64-linux-gnu-1
136  cleaning: automake-1.12.6-x86_64-linux-gnu-1
137  Build Set: Time 0:00:05.358624
138  Build Set: Time 0:00:22.824422
139  config: devel/expat-2.1.0-1.cfg
140  package: expat-2.1.0-x86_64-linux-gnu-1
141  download: http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz -> sources/expat-2.1.0.tar.gz
142    redirect: http://internode.dl.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz
143  downloading: sources/expat-2.1.0.tar.gz - 549.4kB of 549.4kB (100%)
144  building: expat-2.1.0-x86_64-linux-gnu-1
145  reporting: devel/expat-2.1.0-1.cfg -> expat-2.1.0-x86_64-linux-gnu-1.txt
146  reporting: devel/expat-2.1.0-1.cfg -> expat-2.1.0-x86_64-linux-gnu-1.xml
147  config: tools/rtems-binutils-2.26-1.cfg
148  package: sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1
149  download: ftp://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.bz2 -> sources/binutils-2.26.tar.bz2
150  downloading: sources/binutils-2.26.tar.bz2 - 24.4MB of 24.4MB (100%)
151  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
152  downloading: patches/binutils-2.26-rtems-aarch64-x86_64.patch - 3.2kB of 3.2kB (100%)
153  building: sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1
154  reporting: tools/rtems-binutils-2.26-1.cfg -> sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1.txt
155  reporting: tools/rtems-binutils-2.26-1.cfg -> sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1.xml
156  config: tools/rtems-gcc-6-20160228-newlib-2.3.0.20160226-1.cfg
157  package: sparc-rtems4.12-gcc-6-20160228-newlib-2.3.0.20160226-x86_64-linux-gnu-1
158  download: ftp://gcc.gnu.org/pub/gcc/snapshots/6-20160228/gcc-6-20160228.tar.bz2 -> sources/gcc-6-20160228.tar.bz2
159  downloading: sources/gcc-6-20160228.tar.bz2 - 90.8MB of 90.8MB (100%)
160  download: ftp://sourceware.org/pub/newlib/newlib-2.3.0.20160226.tar.gz -> sources/newlib-2.3.0.20160226.tar.gz
161  downloading: sources/newlib-2.3.0.20160226.tar.gz - 16.9MB of 16.9MB (100%)
162  download: http://www.mpfr.org/mpfr-2.4.2/mpfr-2.4.2.tar.bz2 ->
163  sources/mpfr-2.4.2.tar.bz2
164  downloading: sources/mpfr-2.4.2.tar.bz2 - 1.0MB of 1.0MB (100%)
165  download: http://www.multiprecision.org/mpc/download/mpc-0.8.1.tar.gz -> sources/mpc-0.8.1.tar.gz
166  downloading: sources/mpc-0.8.1.tar.gz - 532.2kB of 532.2kB (100%)
167  download: ftp://ftp.gnu.org/gnu/gmp/gmp-4.3.2.tar.bz2 -> sources/gmp-4.3.2.tar.bz2
168  downloading: sources/gmp-4.3.2.tar.bz2 - 1.8MB of 1.8MB (100%)
169  building: sparc-rtems4.12-gcc-6-20160228-newlib-2.3.0.20160226-x86_64-linux-gnu-1
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.txt
171  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
172  config: tools/rtems-gdb-7.9-1.cfg
173  package: sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1
174  download: http://ftp.gnu.org/gnu/gdb/gdb-7.9.tar.xz -> sources/gdb-7.9.tar.xz
175  downloading: sources/gdb-7.9.tar.xz - 17.0MB of 17.0MB (100%)
176  download: https://git.rtems.org/rtems-tools/plain/tools/4.12/gdb/gdb-sim-arange-inline.diff -> patches/gdb-sim-arange-inline.diff
177  downloading: patches/gdb-sim-arange-inline.diff - 761.0 bytes of 761.0 bytes (100%)
178  download: https://git.rtems.org/rtems-tools/plain/tools/4.12/gdb/gdb-sim-cgen-inline.diff -> patches/gdb-sim-cgen-inline.diff
179  downloading: patches/gdb-sim-cgen-inline.diff - 706.0 bytes of 706.0 bytes (100%)
180  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
181  downloading: patches/gdb-7.9-aarch64-x86_64.patch - 1.7kB of 1.7kB (100%)
182  building: sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1
183  reporting: tools/rtems-gdb-7.9-1.cfg -> sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1.txt
184  reporting: tools/rtems-gdb-7.9-1.cfg -> sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1.xml
185  config: tools/rtems-tools-4.12-1.cfg
186  package: rtems-tools-HEAD-1
187  Creating source directory: sources/git
188  git: clone: git://git.rtems.org/rtems-tools.git -> sources/git/rtems-tools.git
189  git: reset: git://git.rtems.org/rtems-tools.git
190  git: fetch: git://git.rtems.org/rtems-tools.git -> sources/git/rtems-tools.git
191  git: checkout: git://git.rtems.org/rtems-tools.git => HEAD
192  git: pull: git://git.rtems.org/rtems-tools.git
193  building: rtems-tools-HEAD-1
194  reporting: tools/rtems-tools-4.12-1.cfg -> rtems-tools-HEAD-1.txt
195  reporting: tools/rtems-tools-4.12-1.cfg -> rtems-tools-HEAD-1.xml
196  installing: expat-2.1.0-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
197  installing: sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
198  installing: sparc-rtems4.12-gcc-6-20160228-newlib-2.3.0.20160226-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
199  installing: sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1 -> /usr/home/chris/development/rtems/4.12
200  installing: rtems-tools-HEAD-1 -> /usr/home/chris/development/rtems/4.12
201  cleaning: expat-2.1.0-x86_64-linux-gnu-1
202  cleaning: sparc-rtems4.12-binutils-2.26-x86_64-linux-gnu-1
203  cleaning: sparc-rtems4.12-gcc-6-20160228-newlib-2.3.0.20160226-x86_64-linux-gnu-1
204  cleaning: sparc-rtems4.12-gdb-7.9-x86_64-linux-gnu-1
205  cleaning: rtems-tools-HEAD-1
206  Build Set: Time 0:31:09.754219
207
208.. _windows-tool-chain:
209
210Windows Host Tool Chain
211~~~~~~~~~~~~~~~~~~~~~~~
212.. index:: Microsoft Windows Installation
213
214This section details how you create an RTEMS development environment on
215Windows. The installation documented here is on `Windows 7 64bit
216Professional`. Building on `Windows 10` has been reported as working.
217
218Please see :ref:`microsoft-windows` before continuing.
219
220.. note::
221
222   If the RSB reports ``error: no hosts defaults found; please add`` you have
223   probably opened an MSYS2 32bit Shell. Close all 32bit Shell windows and open
224   the MSYS2 64bit Shell.
225
226RTEMS Windows Tools
227^^^^^^^^^^^^^^^^^^^
228
229Create a workspace for RTEMS using the following shell command:
230
231.. sidebar:: *Creating Tool Archives*
232
233  Add ``--bset-tar-file`` to the ``sb-set-builder`` command line to create
234  tar files of the built package set.
235
236.. code-block:: shell
237
238   ~
239  $ mkdir -p /c/opt/rtems
240
241The ``/c`` path is an internal MSYS2 mount point of the ``C:`` drive. The
242command creates the RTEMS work space on the ``C:`` drive. If you wish to use
243another drive please subsitute ``/c`` with your drive letter.
244
245We build and install all RTEMS packages under the `prefix` we just
246created. Change to that directory and get a copy of the RSB:
247
248.. code-block:: shell
249
250   ~
251  $ cd /c/opt/rtems
252   /c/opt/rtems
253  $ git clone git://git.rtems.org/rtems-source-builder.git rsb
254  Cloning into 'rsb'...
255  remote: Counting objects: 5716, done.
256  remote: Compressing objects: 100% (2183/2183), done.
257  remote: Total 5716 (delta 3919), reused 5071 (delta 3494)
258  Receiving objects: 100% (5716/5716), 2.46 MiB | 656.00 KiB/s, done.
259  Resolving deltas: 100% (3919/3919), done.
260  Checking connectivity... done.
261  Checking out files: 100% (630/630), done.
262   /c/opt/rtems
263  $ cd rsb
264
265We are building RTEMS 4.11 tools so select the *4.11* branch:
266
267.. code-block:: shell
268
269   /c/opt/rtems/rsb
270  $ git checkout 4.11
271  Branch 4.11 set up to track remote branch 4.11 from origin.
272  Switched to a new branch '4.11'
273   /c/opt/rtems/rsb
274  $
275
276Check the RSB has a valid environment:
277
278.. code-block:: shell
279
280   /c/opt/rtems/rsb
281  $ cd rtems
282   /c/opt/rtems/rsb/rtems
283  $ ../source-builder/sb-check
284  RTEMS Source Builder - Check, 4.11 (01ac76f2f90f)
285  Environment is ok
286   /c/opt/rtems/rsb/rtems
287  $
288
289To build a set of RTEMS tools for the Intel ``i386`` architecture. The build
290runs a single job rather than a job per CPU in your machine and will take a
291long time so please be patient. The RSB creates a log file containing all the
292build output and it will be changing size. The RSB command to build ``i386``
293tools is:
294
295.. code-block:: shell
296
297   /c/opt/rtems/rsb/rtems
298  $ ../source-builder/sb-set-builder --prefix=/c/opt/rtems/4.11 \
299                                     --jobs=none 4.11/rtems-i386
300  RTEMS Source Builder - Set Builder, 4.11 (01ac76f2f90f)
301  Build Set: 4.11/rtems-i386
302  Build Set: 4.11/rtems-autotools.bset
303  Build Set: 4.11/rtems-autotools-internal.bset
304  config: tools/rtems-autoconf-2.69-1.cfg
305  package: autoconf-2.69-x86_64-w64-mingw32-1
306  Creating source directory: sources
307  download: ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz -> sources/autoconf-2.69.tar.gz
308  downloading: sources/autoconf-2.69.tar.gz - 1.8MB of 1.8MB (100%)
309   building: autoconf-2.69-x86_64-w64-mingw32-1
310  config: tools/rtems-automake-1.12.6-1.cfg
311  package: automake-1.12.6-x86_64-w64-mingw32-1
312  download: ftp://ftp.gnu.org/gnu/automake/automake-1.12.6.tar.gz -> sources/automake-1.12.6.tar.gz
313  downloading: sources/automake-1.12.6.tar.gz - 2.0MB of 2.0MB (100%)
314   building: automake-1.12.6-x86_64-w64-mingw32-1
315  cleaning: autoconf-2.69-x86_64-w64-mingw32-1
316  cleaning: automake-1.12.6-x86_64-w64-mingw32-1
317  Build Set: Time 0:00:42.515625
318  Build Set: 4.11/rtems-autotools-base.bset
319  config: tools/rtems-autoconf-2.69-1.cfg
320  package: autoconf-2.69-x86_64-w64-mingw32-1
321  building: autoconf-2.69-x86_64-w64-mingw32-1
322  reporting: tools/rtems-autoconf-2.69-1.cfg -> autoconf-2.69-x86_64-w64-mingw32-1.txt
323  reporting: tools/rtems-autoconf-2.69-1.cfg -> autoconf-2.69-x86_64-w64-mingw32-1.xml
324  config: tools/rtems-automake-1.12.6-1.cfg
325  package: automake-1.12.6-x86_64-w64-mingw32-1
326  building: automake-1.12.6-x86_64-w64-mingw32-1
327  reporting: tools/rtems-automake-1.12.6-1.cfg -> automake-1.12.6-x86_64-w64-mingw32-1.txt
328  reporting: tools/rtems-automake-1.12.6-1.cfg -> automake-1.12.6-x86_64-w64-mingw32-1.xml
329  tarball: tar/rtems-4.11-autotools-x86_64-w64-mingw32-1.tar.bz2
330  installing: autoconf-2.69-x86_64-w64-mingw32-1 -> C:\opt\rtems\4.11
331  installing: automake-1.12.6-x86_64-w64-mingw32-1 -> C:\opt\rtems\4.11
332  cleaning: autoconf-2.69-x86_64-w64-mingw32-1
333  cleaning: automake-1.12.6-x86_64-w64-mingw32-1
334  Build Set: Time 0:00:37.718750
335  Build Set: Time 0:01:20.234375
336  config: devel/expat-2.1.0-1.cfg
337  package: expat-2.1.0-x86_64-w64-mingw32-1
338  download: http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz -> sources/expat-2.1.0.tar.gz
339   redirect: http://iweb.dl.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz
340  downloading: sources/expat-2.1.0.tar.gz - 549.4kB of 549.4kB (100%)
341  building: expat-2.1.0-x86_64-w64-mingw32-1
342  reporting: devel/expat-2.1.0-1.cfg -> expat-2.1.0-x86_64-w64-mingw32-1.txt
343  reporting: devel/expat-2.1.0-1.cfg -> expat-2.1.0-x86_64-w64-mingw32-1.xml
344  config: tools/rtems-binutils-2.24-1.cfg
345  package: i386-rtems4.11-binutils-2.24-x86_64-w64-mingw32-1
346  download: ftp://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2 -> sources/binutils-2.24.tar.bz2
347  downloading: sources/binutils-2.24.tar.bz2 - 21.7MB of 21.7MB (100%)
348  building: i386-rtems4.11-binutils-2.24-x86_64-w64-mingw32-1
349  reporting: tools/rtems-binutils-2.24-1.cfg -> i386-rtems4.11-binutils-2.24-x86_64-w64-mingw32-1.txt
350  reporting: tools/rtems-binutils-2.24-1.cfg -> i386-rtems4.11-binutils-2.24-x86_64-w64-mingw32-1.xml
351  config: tools/rtems-gcc-4.9.3-newlib-2.2.0-20150423-1.cfg
352  package: i386-rtems4.11-gcc-4.9.3-newlib-2.2.0.20150423-x86_64-w64-mingw32-1
353  download: ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2 -> sources/gcc-4.9.3.tar.bz2
354  downloading: sources/gcc-4.9.3.tar.bz2 - 85.8MB of 85.8MB (100%)
355  download: ftp://sourceware.org/pub/newlib/newlib-2.2.0.20150423.tar.gz -> sources/newlib-2.2.0.20150423.tar.gz
356  downloading: sources/newlib-2.2.0.20150423.tar.gz - 16.7MB of 16.7MB (100%)
357  download: http://www.mpfr.org/mpfr-3.0.1/mpfr-3.0.1.tar.bz2 -> sources/mpfr-3.0.1.tar.bz2
358  downloading: sources/mpfr-3.0.1.tar.bz2 - 1.1MB of 1.1MB (100%)
359  download: http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz -> sources/mpc-0.8.2.tar.gz
360  downloading: sources/mpc-0.8.2.tar.gz - 535.5kB of 535.5kB (100%)
361  download: ftp://ftp.gnu.org/gnu/gmp/gmp-5.0.5.tar.bz2 -> sources/gmp-5.0.5.tar.bz2
362  downloading: sources/gmp-5.0.5.tar.bz2 - 2.0MB of 2.0MB (100%)
363  building: i386-rtems4.11-gcc-4.9.3-newlib-2.2.0.20150423-x86_64-w64-mingw32-1
364  reporting: tools/rtems-gcc-4.9.3-newlib-2.2.0-20150423-1.cfg ->
365  i386-rtems4.11-gcc-4.9.3-newlib-2.2.0.20150423-x86_64-w64-mingw32-1.txt
366  reporting: tools/rtems-gcc-4.9.3-newlib-2.2.0-20150423-1.cfg ->
367  i386-rtems4.11-gcc-4.9.3-newlib-2.2.0.20150423-x86_64-w64-mingw32-1.xml
368  config: tools/rtems-gdb-7.9-1.cfg
369  package: i386-rtems4.11-gdb-7.9-x86_64-w64-mingw32-1
370  download: http://ftp.gnu.org/gnu/gdb/gdb-7.9.tar.xz -> sources/gdb-7.9.tar.xz
371  downloading: sources/gdb-7.9.tar.xz - 17.0MB of 17.0MB (100%)
372  download: https://git.rtems.org/rtems-tools/plain/tools/4.11/gdb/gdb-sim-arange-inline.diff -> patches/gdb-sim-arange-inline.diff
373  downloading: patches/gdb-sim-arange-inline.diff - 761.0 bytes of 761.0 bytes (100%)
374  download: https://git.rtems.org/rtems-tools/plain/tools/4.11/gdb/gdb-sim-cgen-inline.diff -> patches/gdb-sim-cgen-inline.diff
375  downloading: patches/gdb-sim-cgen-inline.diff - 706.0 bytes of 706.0 bytes (100%)
376  building: i386-rtems4.11-gdb-7.9-x86_64-w64-mingw32-1
377  reporting: tools/rtems-gdb-7.9-1.cfg ->
378  i386-rtems4.11-gdb-7.9-x86_64-w64-mingw32-1.txt
379  reporting: tools/rtems-gdb-7.9-1.cfg ->
380  i386-rtems4.11-gdb-7.9-x86_64-w64-mingw32-1.xml
381  config: tools/rtems-tools-4.11-1.cfg
382  package: rtems-tools-4.11-1
383  Creating source directory: sources/git
384  git: clone: git://git.rtems.org/rtems-tools.git -> sources/git/rtems-tools.git
385  git: reset: git://git.rtems.org/rtems-tools.git
386  git: fetch: git://git.rtems.org/rtems-tools.git -> sources/git/rtems-tools.git
387  git: checkout: git://git.rtems.org/rtems-tools.git => 4.11
388  git: pull: git://git.rtems.org/rtems-tools.git
389  building: rtems-tools-4.11-1
390  reporting: tools/rtems-tools-4.11-1.cfg -> rtems-tools-4.11-1.txt
391  reporting: tools/rtems-tools-4.11-1.cfg -> rtems-tools-4.11-1.xml
392  config: tools/rtems-kernel-4.11.cfg
393  installing: expat-2.1.0-x86_64-w64-mingw32-1 -> C:\opt\rtems\4.11
394  installing: i386-rtems4.11-binutils-2.24-x86_64-w64-mingw32-1 -> C:\opt\rtems\4.11
395  installing: i386-rtems4.11-gcc-4.9.3-newlib-2.2.0.20150423-x86_64-w64-mingw32-1 -> C:\opt\rtems\4.11
396  installing: i386-rtems4.11-gdb-7.9-x86_64-w64-mingw32-1 -> C:\opt\rtems\4.11
397  installing: rtems-tools-4.11-1 -> C:\opt\rtems\4.11
398  cleaning: expat-2.1.0-x86_64-w64-mingw32-1
399  cleaning: i386-rtems4.11-binutils-2.24-x86_64-w64-mingw32-1
400  cleaning: i386-rtems4.11-gcc-4.9.3-newlib-2.2.0.20150423-x86_64-w64-mingw32-1
401  cleaning: i386-rtems4.11-gdb-7.9-x86_64-w64-mingw32-1
402  cleaning: rtems-tools-4.11-1
403  Build Set: Time 1:32:58.972919
404   /c/opt/rtems/rsb/rtems
405  $
406
407.. _rtems-kernel-install:
408
409Building the Kernel
410^^^^^^^^^^^^^^^^^^^
411
412We can now build the RTEMS kernel using the RTEMS tools we have just
413built. First we need to set the path to the tools:
414
415.. code-block:: shell
416
417   /c
418  $ cd /c/opt/rtems
419   /c/opt/rtems
420  $ export PATH=/c/opt/rtems/4.11/bin:$PATH
421   /c/opt/rtems
422  $
423
424We currently build RTEMS from the git release branch for 4.11:
425
426.. code-block:: shell
427
428   /c/opt/rtems
429  $ mkdir kernel
430   /c/opt/rtems
431  $ cd kernel
432   /c/opt/rtems/kernel
433  $ git clone git://git.rtems.org/rtems.git rtems
434  Cloning into 'rtems'...
435  remote: Counting objects: 482766, done.
436  remote: Compressing objects: 100% (88781/88781), done.
437  remote: Total 482766 (delta 389610), reused 475155 (delta 383437)
438  Receiving objects: 100% (482766/482766), 69.77 MiB | 697.00 KiB/s, done.
439  Resolving deltas: 100% (389610/389610), done.
440  Checking connectivity... done.
441  Checking out files: 100% (10626/10626), done.
442   /c/opt/rtems/kernel
443  $ cd rtems
444   /c/opt/rtems/kernel/rtems
445  $ git checkout 4.11
446  Checking out files: 100% (2553/2553), done.
447  Branch 4.11 set up to track remote branch 4.11 from origin.
448  Switched to a new branch '4.11'
449   /c/opt/rtems/kernel
450  $
451
452The kernel code cloned from git needs to be `bootstrapped`. Bootstrapping
453creates ``autoconf`` and ``automake`` generated files. To bootstrap we first
454clean away any files, then generate the pre-install header file lists and
455finally we generate the ``autoconf`` and ``automake`` files using the RSB's
456bootstrap tool. First we clean any generated files that exist:
457
458.. code-block:: shell
459
460   /c/opt/rtems/kernel/rtems
461  $ ./bootstrap -c
462  removing automake generated Makefile.in files
463  removing configure files
464  removing aclocal.m4 files
465
466Then we generate the pre-install header file automake make files:
467
468.. code-block:: shell
469
470   /c/opt/rtems/kernel/rtems
471  $ ./bootstrap -p
472  Generating ./c/src/ada/preinstall.am
473  Generating ./c/src/lib/libbsp/arm/altera-cyclone-v/preinstall.am
474  Generating ./c/src/lib/libbsp/arm/atsam/preinstall.am
475  Generating ./c/src/lib/libbsp/arm/beagle/preinstall.am
476  Generating ./c/src/lib/libbsp/arm/csb336/preinstall.am
477  Generating ./c/src/lib/libbsp/arm/csb337/preinstall.am
478  Generating ./c/src/lib/libbsp/arm/edb7312/preinstall.am
479  Generating ./c/src/lib/libbsp/arm/gdbarmsim/preinstall.am
480    .......
481  Generating ./cpukit/score/cpu/mips/preinstall.am
482  Generating ./cpukit/score/cpu/moxie/preinstall.am
483  Generating ./cpukit/score/cpu/nios2/preinstall.am
484  Generating ./cpukit/score/cpu/no_cpu/preinstall.am
485  Generating ./cpukit/score/cpu/or1k/preinstall.am
486  Generating ./cpukit/score/cpu/powerpc/preinstall.am
487  Generating ./cpukit/score/cpu/sh/preinstall.am
488  Generating ./cpukit/score/cpu/sparc/preinstall.am
489  Generating ./cpukit/score/cpu/sparc64/preinstall.am
490  Generating ./cpukit/score/cpu/v850/preinstall.am
491  Generating ./cpukit/score/preinstall.am
492  Generating ./cpukit/telnetd/preinstall.am
493  Generating ./cpukit/wrapup/preinstall.am
494  Generating ./cpukit/zlib/preinstall.am
495   /c/opt/rtems/kernel/rtems
496
497Finally we run the RSB's parallel ``bootstrap`` command:
498
499.. code-block:: shell
500
501  $ /c/opt/rtems/rsb/source-builder/sb-bootstrap
502  RTEMS Source Builder - RTEMS Bootstrap, 4.11 (76188ee494dd)
503    1/139: autoreconf: configure.ac
504    2/139: autoreconf: c/configure.ac
505    3/139: autoreconf: c/src/configure.ac
506    4/139: autoreconf: c/src/ada-tests/configure.ac
507    5/139: autoreconf: c/src/lib/libbsp/arm/configure.ac
508    6/139: autoreconf: c/src/lib/libbsp/arm/altera-cyclone-v/configure.ac
509    7/139: autoreconf: c/src/lib/libbsp/arm/atsam/configure.ac
510    8/139: autoreconf: c/src/lib/libbsp/arm/beagle/configure.ac
511    9/139: autoreconf: c/src/lib/libbsp/arm/csb336/configure.ac
512   10/139: autoreconf: c/src/lib/libbsp/arm/csb337/configure.ac
513   11/139: autoreconf: c/src/lib/libbsp/arm/edb7312/configure.ac
514    .......
515  129/139: autoreconf: testsuites/samples/configure.ac
516  130/139: autoreconf: testsuites/smptests/configure.ac
517  131/139: autoreconf: testsuites/sptests/configure.ac
518  132/139: autoreconf: testsuites/tmtests/configure.ac
519  133/139: autoreconf: testsuites/tools/configure.ac
520  134/139: autoreconf: testsuites/tools/generic/configure.ac
521  135/139: autoreconf: tools/build/configure.ac
522  136/139: autoreconf: tools/cpu/configure.ac
523  137/139: autoreconf: tools/cpu/generic/configure.ac
524  138/139: autoreconf: tools/cpu/nios2/configure.ac
525  139/139: autoreconf: tools/cpu/sh/configure.ac
526  Bootstrap time: 0:20:38.759766
527   /c/opt/rtems/kernel/rtems
528  $
529
530We will build the RTEMS kernel for the ``i386`` target and the ``pc686``
531BSP. You can check the available BSPs by running the ``rtems-bsps`` command
532found in the top directory of the RTEMS kernel source. We build the Board
533Support Package (BSP) outside the kernel source tree:
534
535.. code-block:: shell
536
537   /c/opt/rtems/kernel/rtems
538  $ cd ..
539   /c/opt/rtems/kernel
540  $ mkdir pc686
541   /c/opt/rtems/kernel
542  $ cd pc686
543   /c/opt/rtems/kernel/pc686
544  $
545
546Configure the RTEMS kernel to build ``pc686`` BSP for the ``i386`` target with
547networking disabled, We will build the external libBSD stack later:
548
549.. code-block:: shell
550
551   /c/opt/rtems/kernel/pc686
552  $ /c/opt/rtems/kernel/rtems/configure --prefix=/c/opt/rtems/4.11 \
553         --target=i386-rtems4.11 --disable-networking --enable-rtemsbsp=pc686
554  checking for gmake... no
555  checking for make... make
556  checking for RTEMS Version... 4.11.99.0
557  checking build system type... x86_64-pc-mingw64
558  checking host system type... x86_64-pc-mingw64
559  checking target system type... i386-pc-rtems4.11
560  checking for a BSD-compatible install... /usr/bin/install -c
561  checking whether build environment is sane... yes
562  checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
563  checking for gawk... gawk
564  checking whether make sets $(MAKE)... yes
565  checking whether to enable maintainer-specific portions of Makefiles... no
566  checking that generated files are newer than configure... done
567  configure: creating ./config.status
568  configure: configuring in ./tools/build
569    .......
570  checking whether make sets $(MAKE)... yes
571  checking whether to enable maintainer-specific portions of Makefiles... no
572  checking that generated files are newer than configure... done
573  configure: creating ./config.status
574  config.status: creating Makefile
575
576  target architecture: i386.
577  available BSPs: pc686.
578  'make all' will build the following BSPs: pc686.
579  other BSPs can be built with 'make RTEMS_BSP="bsp1 bsp2 ..."'
580
581  config.status: creating Makefile
582   /c/opt/rtems/kernel/pc686
583  $
584
585Build the kernel:
586
587.. code-block:: shell
588
589   /c/opt/rtems/kernel/pc686
590  $ make
591  Making all in tools/build
592  make[1]: Entering directory '/c/opt/rtems/kernel/pc686/tools/build'
593  make  all-am
594  make[2]: Entering directory '/c/opt/rtems/kernel/pc686/tools/build'
595  gcc -DHAVE_CONFIG_H -I. -I/c/opt/rtems/kernel/rtems/tools/build     -g -O2 -MT
596  cklength.o -MD -MP -MF .deps/cklength.Tpo -c -o cklength.o
597  /c/opt/rtems/kernel/rtems/tools/build/cklength.c
598  gcc -DHAVE_CONFIG_H -I. -I/c/opt/rtems/kernel/rtems/tools/build     -g -O2 -MT
599  eolstrip.o -MD -MP -MF .deps/eolstrip.Tpo -c -o eolstrip.o
600  /c/opt/rtems/kernel/rtems/tools/build/eolstrip.c
601    ..........
602  i386-rtems4.11-objcopy -O binary nsecs.nxe nsecs.bin
603  ../../../../../pc686/build-tools/bin2boot -v nsecs.ralf 0x00097E00
604  ../../../../../pc686/lib/start16.bin 0x00097C00 0 nsecs.bin 0x00100000 0
605  header address       0x00097e00, its memory size 0xzx
606  first  image address 0x00097c00, its memory size 0x00000200
607  second image address 0x00100000, its memory size 0x0003d800
608  rm -f nsecs.nxe
609  make[6]: Leaving directory '/c/opt/rtems/kernel/pc686/i386-rtems4.11/c/pc686/testsuites/samples/nsecs'
610  make[5]: Leaving directory '/c/opt/rtems/kernel/pc686/i386-rtems4.11/c/pc686/testsuites/samples'
611  make[4]: Leaving directory '/c/opt/rtems/kernel/pc686/i386-rtems4.11/c/pc686/testsuites/samples'
612  make[4]: Entering directory '/c/opt/rtems/kernel/pc686/i386-rtems4.11/c/pc686/testsuites'
613  make[4]: Nothing to be done for 'all-am'.
614  make[4]: Leaving directory '/c/opt/rtems/kernel/pc686/i386-rtems4.11/c/pc686/testsuites'
615  make[3]: Leaving directory '/c/opt/rtems/kernel/pc686/i386-rtems4.11/c/pc686/testsuites'
616  make[2]: Leaving directory '/c/opt/rtems/kernel/pc686/i386-rtems4.11/c/pc686'
617  make[1]: Leaving directory '/c/opt/rtems/kernel/pc686/i386-rtems4.11/c'
618  make[1]: Entering directory '/c/opt/rtems/kernel/pc686'
619  make[1]: Nothing to be done for 'all-am'.
620  make[1]: Leaving directory '/c/opt/rtems/kernel/pc686'
621   /c/opt/rtems/kernel/pc696
622  $
623
624Install the kernel to our prefix:
625
626.. code-block:: shell
627
628   /c/opt/rtems/kernel/pc686
629  $ make install
630  Making install in tools/build
631  make[1]: Entering directory '/c/opt/rtems/kernel/pc686/tools/build'
632  make[2]: Entering directory '/c/opt/rtems/kernel/pc686/tools/build'
633   /usr/bin/mkdir -p '/c/opt/rtems/4.11/bin'
634    /usr/bin/install -c cklength.exe eolstrip.exe packhex.exe unhex.exe
635    rtems-bin2c.exe '/c/opt/rtems/4.11/bin'
636   /usr/bin/mkdir -p '/c/opt/rtems/4.11/bin'
637   /usr/bin/install -c install-if-change '/c/opt/rtems/4.11/bin'
638  make[2]: Nothing to be done for 'install-data-am'.
639  make[2]: Leaving directory '/c/opt/rtems/kernel/pc686/tools/build'
640  make[1]: Leaving directory '/c/opt/rtems/kernel/pc686/tools/build'
641  Making install in tools/cpu
642  make[1]: Entering directory '/c/opt/rtems/kernel/pc686/tools/cpu'
643  Making install in generic
644  make[2]: Entering directory '/c/opt/rtems/kernel/pc686/tools/cpu/generic'
645  make[3]: Entering directory '/c/opt/rtems/kernel/pc686/tools/cpu/generic'
646  make[3]: Nothing to be done for 'install-exec-am'.
647  make[3]: Nothing to be done for 'install-data-am'.
648  make[3]: Leaving directory '/c/opt/rtems/kernel/pc686/tools/cpu/generic'
649  make[2]: Leaving directory '/c/opt/rtems/kernel/pc686/tools/cpu/generic'
650  make[2]: Entering directory '/c/opt/rtems/kernel/pc686/tools/cpu'
651  make[3]: Entering directory '/c/opt/rtems/kernel/pc686/tools/cpu'
652  make[3]: Nothing to be done for 'install-exec-am'.
653  make[3]: Nothing to be done for 'install-data-am'.
654    ..........
655  make[2]: Entering directory '/c/opt/rtems/kernel/pc686'
656  make[2]: Nothing to be done for 'install-exec-am'.
657   /usr/bin/mkdir -p '/c/opt/rtems/4.11/make'
658   /usr/bin/install -c -m 644 /c/opt/rtems/kernel/rtems/make/main.cfg
659   /c/opt/rtems/kernel/rtems/make/leaf.cfg '/c/opt/rtems/4.11/make'
660   /usr/bin/mkdir -p '/c/opt/rtems/4.11/share/rtems4.11/make/Templates'
661   /usr/bin/install -c -m 644
662   /c/opt/rtems/kernel/rtems/make/Templates/Makefile.dir
663   /c/opt/rtems/kernel/rtems/make/Templates/Makefile.leaf
664   /c/opt/rtems/kernel/rtems/make/Templates/Makefile.lib
665   '/c/opt/rtems/4.11/share/rtems4.11/make/Templates'
666   /usr/bin/mkdir -p '/c/opt/rtems/4.11/make/custom'
667   /usr/bin/install -c -m 644 /c/opt/rtems/kernel/rtems/make/custom/default.cfg
668   '/c/opt/rtems/4.11/make/custom'
669  make[2]: Leaving directory '/c/opt/rtems/kernel/pc686'
670  make[1]: Leaving directory '/c/opt/rtems/kernel/pc686'
671   /c/opt/rtems/kernel/pc686
672  $
Note: See TracBrowser for help on using the repository browser.