Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

Ticket #4187: mueller-version-5-6-replacements.patch

File mueller-version-5-6-replacements.patch, 10.4 KB (added by rmueller, on 12/18/20 at 11:19:52)

Version 5/6 fixes for QuickStart?

  • user/start/sources.rst

    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  
    99Obtain the Sources
    1010==================
    1111
     12The chosen RTEMS version (5 for a released build, 6 for the git clone) will be
     13replaced by $RTEMS_VERSION for some parts of the Quick Start.
    1214You 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
     15section.  We have chosen :file:`$HOME/quick-start/rtems/$RTEMS_VERSION` as the installation
    1416prefix. We will show how to use a released version of RTEMS and then as an
    1517alternative 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.
     19Consider using a Git clone if you wish to make
    1720contributions to the RTEMS Project.
    1821
    1922You 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 
    8689development head.  Release branches in Git are kept stable however they may
    8790differ from a release's source archive.
    8891
     92The master branch by default uses RTEMS version 6 and does not
     93contain the version 5 `rtems-sparc` build set.
     94
    8995.. code-block:: none
    9096
    9197    mkdir -p $HOME/quick-start/src
  • user/start/tools.rst

    diff --git a/user/start/tools.rst b/user/start/tools.rst
    index baa2387..7f4a122 100644
    a b Install the Tool Suite 
    1212
    1313You have chosen an installation prefix, the BSP to build, the tool's
    1414architecure 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`.
     15have 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),
     17and unpacked the RSB source in :file:`$HOME/quick-start/src`.
    1818
    1919The tool suite for RTEMS and the RTEMS sources are tightly coupled.  For
    2020example, do not use a RTEMS version 5 tool suite with RTEMS version 4.11
    2121sources and vice versa.
    2222
    23 Build and install the tool suite:
     23The 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       
     30Build and install the tool suite for the SPARC architecture and RTEMS version:
    2431
    2532.. code-block:: none
    2633
    2734    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
    2936
    3037This command should output something like this (omitted lines are denoted by
    3138...). 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: 
    5158    Build Set: Time 0:21:35.626294
    5259
    5360Once the build has successfully completed you can check if the cross C compiler
    54 works with the following command:
     61works with the following command (replace 5 with 6 for RTEMS 6):
    5562
    5663.. code-block:: none
    5764
  • user/start/bsp-build.rst

    -- 
    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) 
    1111You installed the tool suite in your installation prefix, made ready the source
    1212for two RTEMS source packages and if you are using a Git clone bootstrapped the
    1313RTEMS 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
    1515:file:`$HOME/quick-start/src`.
    1616
    1717You are now able to build :ref:`Board Support Packages (BSPs) <BSPs>` for all
    RSB BSP Build 
    3535-------------
    3636
    3737The 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.
     38RSB source you downloaded in a previous section which uses the released version 5.
     39If you are using a release RSB source archive the BSP built is the released kernel image.
     40If you are using a Git clone of the RSB the BSP will be version referenced in the RSB clone.
    4141
    4242To build the BSP with all the tests run this command:
    4343
    If you have built a BSP with the RSB, you can move on to 
    9999Manual BSP Build
    100100----------------
    101101
    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`.
     102We manually build the BSP in four steps, using the git clone of the RTEMS sources and the master branch (version 6).
     103The first step is to create a build directory.  It must be separate from the RTEMS source directory. 
     104We use :file:`$HOME/quick-start/build/b-erc32`.
    105105
    106106.. code-block:: none
    107107
    108108    mkdir -p $HOME/quick-start/build/b-erc32
    109109
    110110The 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:
     111directory to your ``$PATH`` throughout the remaining steps. Run the command with
     112the correct RTEMS version number:
    112113
    113114.. code-block:: none
    114115
    115     export PATH=$HOME/quick-start/rtems/5/bin:"$PATH"
     116    export PATH=$HOME/quick-start/rtems/$RTEMS_VERSION/bin:"$PATH"
    116117
    117118Check your installed tools can be found by running:
    118119
    119120.. code-block:: none
    120121
    121     command -v sparc-rtems5-gcc && echo "found" || echo "not found"
     122    command -v sparc-rtems6-gcc && echo "found" || echo "not found"
    122123
    123124The output should be:
    124125
    The output should be: 
    128129
    129130If ``not found`` is printed the tools are not correctly installed or the path
    130131has 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`
    132133is present the path is wrong. If the file cannot be found return to
    133134:ref:`QuickStartTools` and install the tools again.
    134135
    everything else. For detailed information about the BSP build system, see 
    145146    cd $HOME/quick-start/src/rtems
    146147    echo "[sparc/erc32]" > config.ini
    147148    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
    149150
    150151The first invocation of ``./waf`` needs a bit of time (e.g. 10 seconds) since an
    151152internal cache file is populated.  This command should output something like
    by ``$BASE``. 
    229230    + install $BASE/rtems/5/sparc-rtems5/erc32/lib/include/rtems/score/wkspace.h (from cpukit/include/rtems/score/wkspace.h)
    230231    Waf: Leaving directory `$BASE/src/rtems/build/sparc/erc32'
    231232    'install_sparc/erc32' finished successfully (2.985s)
     233
     234The BSP should now have been installed at the supplied prefix location.
     235 No newline at end of file
  • user/start/bsp-build.rst

    -- 
    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``. 
    231231    Waf: Leaving directory `$BASE/src/rtems/build/sparc/erc32'
    232232    'install_sparc/erc32' finished successfully (2.985s)
    233233
    234 The BSP should now have been installed at the supplied prefix location.
    235  No newline at end of file
     234The BSP should now have been installed at the supplied prefix location.
     235It is recommended to do the task of setting paths and the RTEMS prefix in a shell script.
     236For example, the following script named `path_setter_v6.sh` will set up the path and some environmental variables for
     237easier 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       
     245The script can be run with
     246
     247.. code-block:: none
     248        source path_setter_v6.sh
     249
  • user/start/bsp-build.rst

    -- 
    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 
    237237easier development with version 6:
    238238
    239239.. code-block:: none
    240         export RTEMS_VERSION=6
     240    export RTEMS_VERSION=6
    241241       
    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"
    244244       
    245245The script can be run with
    246246
    247247.. code-block:: none
    248         source path_setter_v6.sh
     248    source path_setter_v6.sh
    249249