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