source: rtems-docs/user/start/basics.rst @ 489740f

4.115
Last change on this file since 489740f was 489740f, checked in by Chris Johns <chrisj@…>, on 05/20/16 at 02:47:09

Set SPDX License Identifier in each source file.

  • Property mode set to 100644
File size: 6.1 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.. _prefixes:
7
8Prefixes
9========
10
11You will see the term :ref:term:`prefix` referred to thoughout this
12documentation and in a wide number of software packages you can download from
13the internet. A **prefix** is the path on your computer a software package is
14built and installed under. Packages that have a **prefix** will place all parts
15under the **prefix** path. On a host computer like Linux the packages you
16install from your distribution typically use a platform specific standard
17**prefix**. For example on Linux it is :file:`/usr` and on FreeBSD it is
18:file:`/usr/local`.
19
20We recommend you *DO NOT* use the standard **prefix** when installing the RTEMS
21Tools. The standard **prefix** is the default **prefix** each package built by
22the RSB contains. If you are building the tools when logged in as a *Standard
23User* and not as the *Super User* (``root``) or *Administrator* the RTEMS
24Source Builder (RSB) *will* fail and report an error if the default **prefix**
25is not writable. We recommend you leave the standand **prefix** for the
26packages your operating system installs or software you manually install such
27as applications.
28
29A further reason not to use the standard **prefix** is to allow more than one
30version of RTEMS to exist on your host machine at a time. The ``autoconf`` and
31``automake`` tools required by RTEMS are not versioned and vary between the
32various versions of RTEMS. If you use a single **prefix** such as the standard
33**prefix** there is a chance parts from a package of different versions may
34interact. This should not happen but it can.
35
36For POSIX or Unix hosts, the RTEMS Project uses :file:`/opt/rtems` as it's
37standard **prefix**. We view this **prefix** as a production level path, and we
38prefer to place development versions under a different **prefix** away from the
39production versions. Under this top level **prefix** we place the various
40versions we need for development. For example the version 4.11.0 **prefix**
41would be :file:`/opt/rtems/4.11.0`. If an update called 4.11.1 is released the
42**prefix** would be :file:`/opt/rtems/4.11.1`. These are recommendations and
43the choice of what you use is entirely yours. You may decide to have a single
44path for all RTEMS 4.11 releases of :file:`/opt/rtems/4.11`.
45
46For Windows a typical **prefix** is :file:`C:\\opt\\rtems` and as an MSYS2 path
47this is :file:`/c/opt/rtems`.
48
49.. _project_sandboxing:
50
51Project Sandboxing
52==================
53
54Project specific sandboxes let you have a number of projects running in
55parallel with each project in its own sandbox. You simply have a
56:ref:term:`prefix` per project and under that prefix you create a simple yet
57repeatable structure.
58
59As an example lets say I have a large disk mounted under :file:`/bd` for *Big
60Disk*. As ``root`` create a directory called ``projects`` and give the
61directory suitable permissions to be writable by you as a user.
62
63Lets create a project sandbox for my *Box Sorter* project. First create a
64project directory called :file:`/bd/projects/box-sorter`. Under this create
65:file:`rtems` and under that create :file:`rtems-4.11.0`. Under this path you
66can follow the :ref:`released-version` procedure to build a tool set using the
67prefix of :file:`/bd/projects/box-sorter/rtems/4.11.0`. You are free to create
68your project specific directories under :file:`/bd/projects/box-sorter`. The
69top level directories would be:
70
71:file:`/bd/projects`
72  Project specific development trees.
73
74:file:`/bd/projects/box-sorter`
75  Box Sorter project sandbox.
76
77:file:`/bd/projects/box-sorter/rtems/4.11.0`
78  Project prefix for RTEMS 4.11.0 compiler, debuggers, tools and installed
79  Board Support Package (BSP).
80
81A variation is to use the ``--without-rtems`` option with the RSB to not build
82the BSPs when building the tools and to build RTEMS specifically for each
83project. This lets you have a production tools installed at a top level on your
84disk and each project can have a specific and possibly customised version of
85RTEMS. The top level directories would be:
86
87:file:`/bd/rtems`
88  The top path to production tools.
89
90:file:`/bd/rtems/4.11.0`
91  Production prefix for RTEMS 4.11.0 compiler, debuggers and tools.
92
93:file:`/bd/projects`
94  Project specific development trees.
95
96:file:`/bd/projects/box-sorter`
97  Box Sorter project sandbox.
98
99:file:`/bd/projects/box-sorter/rtems`
100  Box Sorter project's custom RTEMS kernel source and installed BSP.
101
102A further varation if there is an RTEMS kernel you want to share between
103projects is it to move this to a top level and share. In this case you will end
104up with:
105
106:file:`/bd/rtems`
107  The top path to production tools and kernels.
108
109:file:`/bd/rtems/4.11.0`
110  Production prefix for RTEMS 4.11.0.
111
112:file:`/bd/rtems/4.11.0/tools`
113  Production prefix for RTEMS 4.11.0 compiler, debuggers and tools.
114
115:file:`/bd/rtems/4.11.0/bsps`
116  Production prefix for RTEMS 4.11.0 Board Support Packages (BSPs).
117
118:file:`/bd/projects`
119  Project specific development trees.
120
121:file:`/bd/projects/box-sorter`
122  Box Sorter project sandbox.
123
124Finally you can have a single set of *production* tools and RTEMS BSPs on the
125disk under :file:`/bd/rtems` you can share between your projects. The top level
126directories would be:
127
128:file:`/bd/rtems`
129  The top path to production tools and kernels.
130
131:file:`/bd/rtems/4.11.0`
132  Production prefix for RTEMS 4.11.0 compiler, debuggers, tools and Board
133  Support Packages (BSPs).
134
135:file:`/bd/projects`
136  Project specific development trees.
137
138:file:`/bd/projects/box-sorter`
139  Box Sorter project sandbox.
140
141The project sandoxing approach allows you move a specific production part into
142the project's sandbox to allow you to customise it. This is useful if you are
143testing new releases. The typical dependency is the order listed above. You can
144test new RTEMS kernels with production tools but new tools will require you
145build the kernel with them. Release notes with each release will let know
146what you need to update.
147
148If the machine is a central project development machine simply replace
149:file:`projects` with :file:`users` and give each user a personal directory.
Note: See TracBrowser for help on using the repository browser.