1 | .. SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
2 | |
---|
3 | .. Copyright (C) 2016 Chris Johns <chrisj@rtems.org> |
---|
4 | |
---|
5 | .. index:: Prefixes |
---|
6 | .. _prefixes: |
---|
7 | |
---|
8 | .. _project-sandboxing: |
---|
9 | |
---|
10 | Project Sandboxing |
---|
11 | ------------------ |
---|
12 | |
---|
13 | Project specific sandboxes let you have a number of projects running in |
---|
14 | parallel with each project in its own sandbox. You simply have a |
---|
15 | :ref:term:`prefix` per project and under that prefix you create a simple yet |
---|
16 | repeatable structure. |
---|
17 | |
---|
18 | As an example lets say I have a large disk mounted under :file:`/bd` for *Big |
---|
19 | Disk*. As ``root`` create a directory called ``projects`` and give the |
---|
20 | directory suitable permissions to be writable by you as a user. |
---|
21 | |
---|
22 | Lets create a project sandbox for my *Box Sorter* project. First create a |
---|
23 | project directory called :file:`/bd/projects/box-sorter`. Under this create |
---|
24 | :file:`rtems` and under that create :file:`rtems-4.11.0`. Under this path you |
---|
25 | can follow the :ref:`released-version` procedure to build a tool set using the |
---|
26 | prefix of :file:`/bd/projects/box-sorter/rtems/4.11.0`. You are free to create |
---|
27 | your project specific directories under :file:`/bd/projects/box-sorter`. The |
---|
28 | top level directories would be: |
---|
29 | |
---|
30 | :file:`/bd/projects` |
---|
31 | Project specific development trees. |
---|
32 | |
---|
33 | :file:`/bd/projects/box-sorter` |
---|
34 | Box Sorter project sandbox. |
---|
35 | |
---|
36 | :file:`/bd/projects/box-sorter/rtems/4.11.0` |
---|
37 | Project prefix for RTEMS 4.11.0 compiler, debuggers, tools and installed |
---|
38 | Board Support Package (BSP). |
---|
39 | |
---|
40 | A variation is to use the ``--without-rtems`` option with the RSB to not build |
---|
41 | the BSPs when building the tools and to build RTEMS specifically for each |
---|
42 | project. This lets you have a production tools installed at a top level on your |
---|
43 | disk and each project can have a specific and possibly customised version of |
---|
44 | RTEMS. The top level directories would be: |
---|
45 | |
---|
46 | :file:`/bd/rtems` |
---|
47 | The top path to production tools. |
---|
48 | |
---|
49 | :file:`/bd/rtems/4.11.0` |
---|
50 | Production prefix for RTEMS 4.11.0 compiler, debuggers and tools. |
---|
51 | |
---|
52 | :file:`/bd/projects` |
---|
53 | Project specific development trees. |
---|
54 | |
---|
55 | :file:`/bd/projects/box-sorter` |
---|
56 | Box Sorter project sandbox. |
---|
57 | |
---|
58 | :file:`/bd/projects/box-sorter/rtems` |
---|
59 | Box Sorter project's custom RTEMS kernel source and installed BSP. |
---|
60 | |
---|
61 | A further varation if there is an RTEMS kernel you want to share between |
---|
62 | projects is it to move this to a top level and share. In this case you will end |
---|
63 | up with: |
---|
64 | |
---|
65 | :file:`/bd/rtems` |
---|
66 | The top path to production tools and kernels. |
---|
67 | |
---|
68 | :file:`/bd/rtems/4.11.0` |
---|
69 | Production prefix for RTEMS 4.11.0. |
---|
70 | |
---|
71 | :file:`/bd/rtems/4.11.0/tools` |
---|
72 | Production prefix for RTEMS 4.11.0 compiler, debuggers and tools. |
---|
73 | |
---|
74 | :file:`/bd/rtems/4.11.0/bsps` |
---|
75 | Production prefix for RTEMS 4.11.0 Board Support Packages (BSPs). |
---|
76 | |
---|
77 | :file:`/bd/projects` |
---|
78 | Project specific development trees. |
---|
79 | |
---|
80 | :file:`/bd/projects/box-sorter` |
---|
81 | Box Sorter project sandbox. |
---|
82 | |
---|
83 | Finally you can have a single set of *production* tools and RTEMS BSPs on the |
---|
84 | disk under :file:`/bd/rtems` you can share between your projects. The top level |
---|
85 | directories would be: |
---|
86 | |
---|
87 | :file:`/bd/rtems` |
---|
88 | The top path to production tools and kernels. |
---|
89 | |
---|
90 | :file:`/bd/rtems/4.11.0` |
---|
91 | Production prefix for RTEMS 4.11.0 compiler, debuggers, tools and Board |
---|
92 | Support Packages (BSPs). |
---|
93 | |
---|
94 | :file:`/bd/projects` |
---|
95 | Project specific development trees. |
---|
96 | |
---|
97 | :file:`/bd/projects/box-sorter` |
---|
98 | Box Sorter project sandbox. |
---|
99 | |
---|
100 | The project sandoxing approach allows you move a specific production part into |
---|
101 | the project's sandbox to allow you to customise it. This is useful if you are |
---|
102 | testing new releases. The typical dependency is the order listed above. You can |
---|
103 | test new RTEMS kernels with production tools but new tools will require you |
---|
104 | build the kernel with them. Release notes with each release will let know |
---|
105 | what you need to update. |
---|
106 | |
---|
107 | If the machine is a central project development machine simply replace |
---|
108 | :file:`projects` with :file:`users` and give each user a personal directory. |
---|