Ticket #4187: mueller-version-5-6-replacements.patch
-
From 52d62aed61f3496cac767354da97cf175ca8c37b Mon Sep 17 00:00:00 2001
From: Robin Mueller <robin.mueller.m@gmail.com>
Date: Wed, 2 Dec 2020 14:38:24 +0100
Subject: [PATCH 1/4] quick start variable version number
---
user/start/sources.rst | 10 ++++++++--
user/start/tools.rst | 19 +++++++++++++------
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/user/start/sources.rst b/user/start/sources.rst
index 8c40aa0..836cab9 100644
a
|
b
|
|
9 | 9 | Obtain the Sources |
10 | 10 | ================== |
11 | 11 | |
| 12 | The chosen RTEMS version (5 for a released build, 6 for the git clone) will be |
| 13 | replaced by $RTEMS_VERSION for some parts of the Quick Start. |
12 | 14 | You have considered and chosen a suitable installation prefix in the previous |
13 | | section. We have chosen :file:`$HOME/quick-start/rtems/5` as the installation |
| 15 | section. We have chosen :file:`$HOME/quick-start/rtems/$RTEMS_VERSION` as the installation |
14 | 16 | prefix. We will show how to use a released version of RTEMS and then as an |
15 | 17 | alternative we will show you using the :ref:`RSB Git repository |
16 | | <QuickStartSources_Git>`. Consider using a Git clone if you wish to make |
| 18 | <QuickStartSources_Git>` master which uses RTEMS version 6. |
| 19 | Consider using a Git clone if you wish to make |
17 | 20 | contributions to the RTEMS Project. |
18 | 21 | |
19 | 22 | You need the RTEMS Source Builder (RSB) to work with RTEMS and we prefer you |
… |
… |
You can clone the Git repository to get all versions of RTEMS including the |
86 | 89 | development head. Release branches in Git are kept stable however they may |
87 | 90 | differ from a release's source archive. |
88 | 91 | |
| 92 | The master branch by default uses RTEMS version 6 and does not |
| 93 | contain the version 5 `rtems-sparc` build set. |
| 94 | |
89 | 95 | .. code-block:: none |
90 | 96 | |
91 | 97 | mkdir -p $HOME/quick-start/src |
-
diff --git a/user/start/tools.rst b/user/start/tools.rst
index baa2387..7f4a122 100644
a
|
b
|
Install the Tool Suite |
12 | 12 | |
13 | 13 | You have chosen an installation prefix, the BSP to build, the tool's |
14 | 14 | architecure and prepared the source for the RSB in the previous sections. We |
15 | | have chosen :file:`$HOME/quick-start/rtems/5` as the installation prefix, the |
16 | | ``erc32`` BSP and the SPARC architecture name of ``sparc-rtems5``, and unpacked |
17 | | the RSB source in :file:`$HOME/quick-start/src`. |
| 15 | have chosen :file:`$HOME/quick-start/rtems/$RTEMS_VERSION` as the installation prefix, the |
| 16 | ``erc32`` BSP and the SPARC architecture name of ``sparc-rtems5`` (``sparc-rtems6`` for the git clone), |
| 17 | and unpacked the RSB source in :file:`$HOME/quick-start/src`. |
18 | 18 | |
19 | 19 | The tool suite for RTEMS and the RTEMS sources are tightly coupled. For |
20 | 20 | example, do not use a RTEMS version 5 tool suite with RTEMS version 4.11 |
21 | 21 | sources and vice versa. |
22 | 22 | |
23 | | Build and install the tool suite: |
| 23 | The available build sets can be displayed with: |
| 24 | |
| 25 | .. code-block:: none |
| 26 | |
| 27 | cd $HOME/quick-start/src/rsb/rtems |
| 28 | ../source-builder/sb-set-builder --list-bsets |
| 29 | |
| 30 | Build and install the tool suite for the SPARC architecture and RTEMS version: |
24 | 31 | |
25 | 32 | .. code-block:: none |
26 | 33 | |
27 | 34 | cd $HOME/quick-start/src/rsb/rtems |
28 | | ../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/5 5/rtems-sparc |
| 35 | ../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/$RTEMS_VERSION $RTEMS_VERSION/rtems-sparc |
29 | 36 | |
30 | 37 | This command should output something like this (omitted lines are denoted by |
31 | 38 | ...). The build host appears as part of the name of the package being |
… |
… |
built. The name you see may vary depending on the host you are using: |
51 | 58 | Build Set: Time 0:21:35.626294 |
52 | 59 | |
53 | 60 | Once the build has successfully completed you can check if the cross C compiler |
54 | | works with the following command: |
| 61 | works with the following command (replace 5 with 6 for RTEMS 6): |
55 | 62 | |
56 | 63 | .. code-block:: none |
57 | 64 | |
-
--
2.29.2
From 7ea981d9a02ba8f9d696ffb3defd0c1e2256bcf3 Mon Sep 17 00:00:00 2001
From: Robin Mueller <robin.mueller.m@gmail.com>
Date: Fri, 18 Dec 2020 12:05:14 +0100
Subject: [PATCH 2/4] updated bsp build chapter
---
user/start/bsp-build.rst | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/user/start/bsp-build.rst b/user/start/bsp-build.rst
index 137b3ab..2517927 100644
a
|
b
|
Build a Board Support Package (BSP) |
11 | 11 | You installed the tool suite in your installation prefix, made ready the source |
12 | 12 | for two RTEMS source packages and if you are using a Git clone bootstrapped the |
13 | 13 | RTEMS sources in the previous sections. We installed the tool suite in |
14 | | :file:`$HOME/quick-start/rtems/5` and unpacked the source in |
| 14 | :file:`$HOME/quick-start/rtems/$RTEMS_VERSION` and unpacked the source in |
15 | 15 | :file:`$HOME/quick-start/src`. |
16 | 16 | |
17 | 17 | You are now able to build :ref:`Board Support Packages (BSPs) <BSPs>` for all |
… |
… |
RSB BSP Build |
35 | 35 | ------------- |
36 | 36 | |
37 | 37 | The RSB build of RTEMS does not use the RTEMS source we made ready. It uses the |
38 | | RSB source you downloaded in a previous section. If you are using a release RSB |
39 | | source archive the BSP built is the released kernel image. If you are using a |
40 | | Git clone of the RSB the BSP will be version referenced in the RSB clone. |
| 38 | RSB source you downloaded in a previous section which uses the released version 5. |
| 39 | If you are using a release RSB source archive the BSP built is the released kernel image. |
| 40 | If you are using a Git clone of the RSB the BSP will be version referenced in the RSB clone. |
41 | 41 | |
42 | 42 | To build the BSP with all the tests run this command: |
43 | 43 | |
… |
… |
If you have built a BSP with the RSB, you can move on to |
99 | 99 | Manual BSP Build |
100 | 100 | ---------------- |
101 | 101 | |
102 | | We manually build the BSP in four steps. The first step is to create a build |
103 | | directory. It must be separate from the RTEMS source directory. We use |
104 | | :file:`$HOME/quick-start/build/b-erc32`. |
| 102 | We manually build the BSP in four steps, using the git clone of the RTEMS sources and the master branch (version 6). |
| 103 | The first step is to create a build directory. It must be separate from the RTEMS source directory. |
| 104 | We use :file:`$HOME/quick-start/build/b-erc32`. |
105 | 105 | |
106 | 106 | .. code-block:: none |
107 | 107 | |
108 | 108 | mkdir -p $HOME/quick-start/build/b-erc32 |
109 | 109 | |
110 | 110 | The second step is to set your path. Prepend the RTEMS tool suite binary |
111 | | directory to your ``$PATH`` throughout the remaining steps. Run the command: |
| 111 | directory to your ``$PATH`` throughout the remaining steps. Run the command with |
| 112 | the correct RTEMS version number: |
112 | 113 | |
113 | 114 | .. code-block:: none |
114 | 115 | |
115 | | export PATH=$HOME/quick-start/rtems/5/bin:"$PATH" |
| 116 | export PATH=$HOME/quick-start/rtems/$RTEMS_VERSION/bin:"$PATH" |
116 | 117 | |
117 | 118 | Check your installed tools can be found by running: |
118 | 119 | |
119 | 120 | .. code-block:: none |
120 | 121 | |
121 | | command -v sparc-rtems5-gcc && echo "found" || echo "not found" |
| 122 | command -v sparc-rtems6-gcc && echo "found" || echo "not found" |
122 | 123 | |
123 | 124 | The output should be: |
124 | 125 | |
… |
… |
The output should be: |
128 | 129 | |
129 | 130 | If ``not found`` is printed the tools are not correctly installed or the path |
130 | 131 | has not been correctly set. Check the contents of the path |
131 | | :file:`$HOME/quick-start/rtems/5/bin` manually and if :file:`sparc-rtems5-gcc` |
| 132 | :file:`$HOME/quick-start/rtems/$RTEMS_VERSION/bin` manually and if :file:`sparc-rtems6-gcc` |
132 | 133 | is present the path is wrong. If the file cannot be found return to |
133 | 134 | :ref:`QuickStartTools` and install the tools again. |
134 | 135 | |
… |
… |
everything else. For detailed information about the BSP build system, see |
145 | 146 | cd $HOME/quick-start/src/rtems |
146 | 147 | echo "[sparc/erc32]" > config.ini |
147 | 148 | echo "BUILD_TESTS = True" >> config.ini |
148 | | ./waf configure --prefix=$HOME/quick-start/rtems/5 |
| 149 | ./waf configure -o $HOME/quick-start/build/b-erc32 --prefix=$HOME/quick-start/rtems/$RTEMS_VERSION |
149 | 150 | |
150 | 151 | The first invocation of ``./waf`` needs a bit of time (e.g. 10 seconds) since an |
151 | 152 | internal cache file is populated. This command should output something like |
… |
… |
by ``$BASE``. |
229 | 230 | + install $BASE/rtems/5/sparc-rtems5/erc32/lib/include/rtems/score/wkspace.h (from cpukit/include/rtems/score/wkspace.h) |
230 | 231 | Waf: Leaving directory `$BASE/src/rtems/build/sparc/erc32' |
231 | 232 | 'install_sparc/erc32' finished successfully (2.985s) |
| 233 | |
| 234 | The BSP should now have been installed at the supplied prefix location. |
| 235 | No newline at end of file |
-
--
2.29.2
From c1f814d92f2d896b1014ca58bd11bf2a549c6d03 Mon Sep 17 00:00:00 2001
From: Robin Mueller <robin.mueller.m@gmail.com>
Date: Fri, 18 Dec 2020 12:13:53 +0100
Subject: [PATCH 3/4] updated bsp build chapter
---
user/start/bsp-build.rst | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/user/start/bsp-build.rst b/user/start/bsp-build.rst
index 2517927..d2c605d 100644
a
|
b
|
by ``$BASE``. |
231 | 231 | Waf: Leaving directory `$BASE/src/rtems/build/sparc/erc32' |
232 | 232 | 'install_sparc/erc32' finished successfully (2.985s) |
233 | 233 | |
234 | | The BSP should now have been installed at the supplied prefix location. |
235 | | No newline at end of file |
| 234 | The BSP should now have been installed at the supplied prefix location. |
| 235 | It is recommended to do the task of setting paths and the RTEMS prefix in a shell script. |
| 236 | For example, the following script named `path_setter_v6.sh` will set up the path and some environmental variables for |
| 237 | easier development with version 6: |
| 238 | |
| 239 | .. code-block:: none |
| 240 | export RTEMS_VERSION=6 |
| 241 | |
| 242 | export PATH="$PATH":"$HOME/quick-start/rtems/$RTEMS_VERSION/bin" |
| 243 | export RTEMS_TOOLS="$HOME/quick-start/rtems/$RTEMS_VERSION" |
| 244 | |
| 245 | The script can be run with |
| 246 | |
| 247 | .. code-block:: none |
| 248 | source path_setter_v6.sh |
| 249 | |
-
--
2.29.2
From 9c4258bebb354861ab58cee1063e262ee0227039 Mon Sep 17 00:00:00 2001
From: Robin Mueller <robin.mueller.m@gmail.com>
Date: Fri, 18 Dec 2020 12:17:32 +0100
Subject: [PATCH 4/4] tabs replaced by spaces
---
user/start/bsp-build.rst | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/user/start/bsp-build.rst b/user/start/bsp-build.rst
index d2c605d..b9f28dd 100644
a
|
b
|
For example, the following script named `path_setter_v6.sh` will set up the path |
237 | 237 | easier development with version 6: |
238 | 238 | |
239 | 239 | .. code-block:: none |
240 | | export RTEMS_VERSION=6 |
| 240 | export RTEMS_VERSION=6 |
241 | 241 | |
242 | | export PATH="$PATH":"$HOME/quick-start/rtems/$RTEMS_VERSION/bin" |
243 | | export RTEMS_TOOLS="$HOME/quick-start/rtems/$RTEMS_VERSION" |
| 242 | export PATH="$PATH":"$HOME/quick-start/rtems/$RTEMS_VERSION/bin" |
| 243 | export RTEMS_TOOLS="$HOME/quick-start/rtems/$RTEMS_VERSION" |
244 | 244 | |
245 | 245 | The script can be run with |
246 | 246 | |
247 | 247 | .. code-block:: none |
248 | | source path_setter_v6.sh |
| 248 | source path_setter_v6.sh |
249 | 249 | |
Download in other formats: