source: rtems-docs/user/rsb/deployment.rst

Last change on this file was bacecbb, checked in by Joel Sherrill <joel@…>, on 05/20/19 at 18:12:33

user/rsb/deployment.rst: Fix typo.

  • Property mode set to 100644
File size: 6.7 KB
Line 
1.. SPDX-License-Identifier: CC-BY-SA-4.0
2
3.. Copyright (C) 2016 Chris Johns <chrisj@rtems.org>
4
5.. _RSBDeployment:
6
7Building and Deploying Tool Binaries
8------------------------------------
9
10If you wish to create and distribute your build or you want to archive a build
11you can create a tar file. We term this deploying a build. This is a more
12advanced method for binary packaging and installing of tools.
13
14By default the RTEMS Source Builder installs the built packages directly and
15optionally it can also create a *build set tar file* or a *package tar file*
16per package built. The normal and default behaviour is to let the RTEMS Source
17Builder install the tools. The source will be downloaded, built, installed and
18cleaned up.
19
20The tar files are created with the full build prefix present and if you follow
21the examples given in this documentation the path is absolute. This can cause
22problems if you are installing on a host you do not have super user or
23administrator rights on because the prefix path may references part you do not
24have write access too and tar will not extract the files. You can use the
25``--strip-components`` option in tar if your host tar application supports it
26to remove the parts you do not have write access too or you may need to unpack
27the tar file somewhere and copy the file tree from the level you have write
28access from. Embedding the full prefix path in the tar files lets you know what
29the prefix is and is recommended. For example if
30``/home/chris/development/rtems/4.11`` is the prefix used you cannot change
31directory to the root (``/``) and untar the file because the ``/home`` is root
32access only. To install a tar file you have downloaded into your new machine's
33``Downloads`` directory in your home directoty you would enter:
34
35.. code-block:: none
36
37    $ cd /somewhere
38    $ tar --strip-components=3 -xjf \
39          $HOME/Downloads/rtems-4.11-sparc-rtems4.11-1.tar.bz2
40
41A build set tar file is created by adding ``--bset-tar-file`` option to the
42``sb-set-builder`` command:
43
44.. code-block:: none
45
46    $ ../source-builder/sb-set-builder --log=l-sparc.txt \
47             --prefix=$HOME/development/rtems/4.11 \
48             --bset-tar-file \     <1>
49             4.11/rtems-sparc
50    Source Builder - Set Builder, v0.2.0
51    Build Set: 4.11/rtems-sparc
52    config: expat-2.1.0-1.cfg
53    package: expat-2.1.0-x86_64-freebsd9.1-1
54    building: expat-2.1.0-x86_64-freebsd9.1-1
55    config: tools/rtems-binutils-2.22-1.cfg
56    package: sparc-rtems4.11-binutils-2.22-1
57    building: sparc-rtems4.11-binutils-2.22-1
58    config: tools/rtems-gcc-4.7.2-newlib-1.20.0-1.cfg
59    package: sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1
60    building: sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1
61    config: tools/rtems-gdb-7.5.1-1.cfg
62    package: sparc-rtems4.11-gdb-7.5.1-1
63    building: sparc-rtems4.11-gdb-7.5.1-1
64    installing: rtems-4.11-sparc-rtems4.11-1 -> /home/chris/development/rtems/4.11 <2>
65    installing: rtems-4.11-sparc-rtems4.11-1 -> /home/chris/development/rtems/4.11
66    installing: rtems-4.11-sparc-rtems4.11-1 -> /home/chris/development/rtems/4.11
67    installing: rtems-4.11-sparc-rtems4.11-1 -> /home/chris/development/rtems/4.11
68    tarball: tar/rtems-4.11-sparc-rtems4.11-1.tar.bz2      <3>
69    cleaning: expat-2.1.0-x86_64-freebsd9.1-1
70    cleaning: sparc-rtems4.11-binutils-2.22-1
71    cleaning: sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1
72    cleaning: sparc-rtems4.11-gdb-7.5.1-1
73    Build Set: Time 0:15:25.92873
74
75.. topic:: Items
76
77  1. The option to create a build set tar file.
78
79  2. The installation still happens unless you specify ``--no-install``.
80
81  3. Creating the build set tar file.
82
83You can also suppress installing the files using the ``--no-install``
84option. This is useful if your prefix is not accessible, for example when
85building Canadian cross compiled tool sets:
86
87.. code-block:: none
88
89    $ ../source-builder/sb-set-builder --log=l-sparc.txt \
90                --prefix=$HOME/development/rtems/4.11 \
91                --bset-tar-file \
92                --no-install \      <1>
93                4.11/rtems-sparc
94    Source Builder - Set Builder, v0.2.0
95    Build Set: 4.11/rtems-sparc
96    config: expat-2.1.0-1.cfg
97    package: expat-2.1.0-x86_64-freebsd9.1-1
98    building: expat-2.1.0-x86_64-freebsd9.1-1
99    config: tools/rtems-binutils-2.22-1.cfg
100    package: sparc-rtems4.11-binutils-2.22-1
101    building: sparc-rtems4.11-binutils-2.22-1
102    config: tools/rtems-gcc-4.7.2-newlib-1.20.0-1.cfg
103    package: sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1
104    building: sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1
105    config: tools/rtems-gdb-7.5.1-1.cfg
106    package: sparc-rtems4.11-gdb-7.5.1-1
107    building: sparc-rtems4.11-gdb-7.5.1-1
108    tarball: tar/rtems-4.11-sparc-rtems4.11-1.tar.bz2    <2>
109    cleaning: expat-2.1.0-x86_64-freebsd9.1-1
110    cleaning: sparc-rtems4.11-binutils-2.22-1
111    cleaning: sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1
112    cleaning: sparc-rtems4.11-gdb-7.5.1-1
113    Build Set: Time 0:14:11.721274
114    $ ls tar
115    rtems-4.11-sparc-rtems4.11-1.tar.bz2
116
117.. topic:: Items
118
119  1. The option to supressing installing the packages.
120
121  2. Create the build set tar.
122
123A package tar file can be created by adding the ``--pkg-tar-files`` to the
124``sb-set-builder`` command. This creates a tar file per package built in the
125build set:
126
127.. code-block:: none
128
129    $ ../source-builder/sb-set-builder --log=l-sparc.txt \
130            --prefix=$HOME/development/rtems/4.11 \
131            --bset-tar-file \
132            --pkg-tar-files \        <1>
133            --no-install 4.11/rtems-sparc
134    Source Builder - Set Builder, v0.2.0
135    Build Set: 4.11/rtems-sparc
136    config: expat-2.1.0-1.cfg
137    package: expat-2.1.0-x86_64-freebsd9.1-1
138    building: expat-2.1.0-x86_64-freebsd9.1-1
139    config: tools/rtems-binutils-2.22-1.cfg
140    package: sparc-rtems4.11-binutils-2.22-1
141    building: sparc-rtems4.11-binutils-2.22-1
142    config: tools/rtems-gcc-4.7.2-newlib-1.20.0-1.cfg
143    package: sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1
144    building: sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1
145    config: tools/rtems-gdb-7.5.1-1.cfg
146    package: sparc-rtems4.11-gdb-7.5.1-1
147    building: sparc-rtems4.11-gdb-7.5.1-1
148    tarball: tar/rtems-4.11-sparc-rtems4.11-1.tar.bz2
149    cleaning: expat-2.1.0-x86_64-freebsd9.1-1
150    cleaning: sparc-rtems4.11-binutils-2.22-1
151    cleaning: sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1
152    cleaning: sparc-rtems4.11-gdb-7.5.1-1
153    Build Set: Time 0:14:37.658460
154    $ ls tar
155    expat-2.1.0-x86_64-freebsd9.1-1.tar.bz2           sparc-rtems4.11-binutils-2.22-1.tar.bz2
156    sparc-rtems4.11-gdb-7.5.1-1.tar.bz2 <2>           rtems-4.11-sparc-rtems4.11-1.tar.bz2 <3>
157    sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1.tar.bz2
158
159.. topic:: Items
160
161  1. The option to create packages tar files.
162
163  2. The GDB package tar file.
164
165  3. The build set tar file. All the others in a single tar file.
Note: See TracBrowser for help on using the repository browser.