1 | .. SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
2 | |
---|
3 | .. Copyright (C) 2016 Chris Johns <chrisj@rtems.org> |
---|
4 | |
---|
5 | .. _posix-hosts: |
---|
6 | |
---|
7 | POSIX Hosts |
---|
8 | =========== |
---|
9 | |
---|
10 | POSIX hosts are most Unix operating systems such as Linux, FreeBSD and |
---|
11 | NetBSD. RTEMS development works well on Unix and can scale from a single user |
---|
12 | and a desktop machine to a team with decentralised or centralised development |
---|
13 | infrastructure. |
---|
14 | |
---|
15 | Root Access |
---|
16 | ----------- |
---|
17 | |
---|
18 | You either have ``root`` access to your host development machine or you do |
---|
19 | not. Some users are given hardware that is centrally managed. If you do not |
---|
20 | have ``root`` access you can create your work environment in your home |
---|
21 | directory. You could use a prefix of :file:`$HOME/development/rtems` or |
---|
22 | :file:`$HOME/rtems`. Note, the ``$HOME`` environment variable can be |
---|
23 | substituted with ``~``. |
---|
24 | |
---|
25 | :ref:`QuickStartPrefixes` details using Prefixes to manage the installation. |
---|
26 | |
---|
27 | RTEMS Tools and packages do not require ``root`` access |
---|
28 | to be built and we encourage you to not build the tools as ``root``. If you |
---|
29 | need to control write access then it is best to manage this with groups |
---|
30 | assigned to users. |
---|
31 | |
---|
32 | If you have ``root`` access you can decide to install the tools under any |
---|
33 | suitable prefix. This may depend on the hardware in your host development |
---|
34 | machine. If the machine is a centralised build server the prefix may be used to |
---|
35 | separate production versions from the test versions and the prefix paths may |
---|
36 | have restricted access rights to only those who manage and have configuration |
---|
37 | control of the machine. We call this project sandboxing and |
---|
38 | :ref:`ProjectSandboxing` explains this in more detail. |
---|
39 | |
---|
40 | Linux |
---|
41 | ----- |
---|
42 | |
---|
43 | BSP Build will require ``pax`` package if RTEMS is configured with the |
---|
44 | ``--enable-tests`` option, see :ref:`BuildingRTEMSTests`. This package is not |
---|
45 | installed , by default, on many Linux distributions, you can check for it |
---|
46 | using your package manager. Install it, if it is not present on your system. |
---|
47 | |
---|
48 | A number of different Linux distrubutions are known to work. The following have |
---|
49 | been tested and report as working. |
---|
50 | |
---|
51 | .. _ArchLinux: |
---|
52 | |
---|
53 | ArchLinux |
---|
54 | ~~~~~~~~~ |
---|
55 | |
---|
56 | The following packages are required on a fresh Archlinux 64bit installation: |
---|
57 | |
---|
58 | .. code-block:: none |
---|
59 | |
---|
60 | # pacman -S base-devel gdb xz unzip ncurses git zlib |
---|
61 | |
---|
62 | Archlinux, by default installs ``texinfo-5`` which is incompatible for building |
---|
63 | GCC 4.7 tree. You will have to obtain ``texinfo-legacy`` from ``AUR`` and |
---|
64 | provide a manual override: |
---|
65 | |
---|
66 | .. code-block:: none |
---|
67 | |
---|
68 | # pacman -R texinfo |
---|
69 | $ yaourt -S texinfo-legacy |
---|
70 | # ln -s /usr/bin/makeinfo-4.13a /usr/bin/makeinfo |
---|
71 | |
---|
72 | .. _CentOS: |
---|
73 | |
---|
74 | CentOS |
---|
75 | ~~~~~~ |
---|
76 | |
---|
77 | The following packages are required on a minimal CentOS 6.3 or CentOS 7 |
---|
78 | 64-bit installation: |
---|
79 | |
---|
80 | .. code-block:: none |
---|
81 | |
---|
82 | # yum install autoconf automake binutils gcc gcc-c++ gdb make patch pax \ |
---|
83 | bison flex xz unzip ncurses-devel texinfo zlib-devel python-devel git |
---|
84 | |
---|
85 | On CentOS 8, the ``pax`` command is now provided by the ``spax`` package, |
---|
86 | you need to enable the PowerTools repository. and use Python3. On a |
---|
87 | fresh install, the following commands should install everything you |
---|
88 | need for RTEMS development: |
---|
89 | |
---|
90 | .. code-block:: none |
---|
91 | |
---|
92 | # dnf install yum-utils |
---|
93 | # dnf config-manager --set-enabled PowerTools |
---|
94 | # dnf update |
---|
95 | # dnf groupinstall "Development Tools" |
---|
96 | # dnf install python3 python3-pip python3-setuptools python3-devel |
---|
97 | # dnf install texinfo spax |
---|
98 | # alternatives --set python /usr/bin/python3 |
---|
99 | |
---|
100 | The minimal CentOS distribution is a specific DVD that installs a minimal |
---|
101 | system. If you use a full system some of these packages may have been |
---|
102 | installed. |
---|
103 | |
---|
104 | .. _Fedora: |
---|
105 | |
---|
106 | Fedora |
---|
107 | ~~~~~~ |
---|
108 | |
---|
109 | The RTEMS Source Builder has been tested on Fedora 19 64bit with the following |
---|
110 | packages: |
---|
111 | |
---|
112 | .. code-block:: none |
---|
113 | |
---|
114 | # yum install ncurses-devel python-devel git bison gcc cvs gcc-c++ \ |
---|
115 | flex texinfo patch perl-Text-ParseWords zlib-devel |
---|
116 | |
---|
117 | .. _Raspbian: |
---|
118 | |
---|
119 | Raspbian |
---|
120 | ~~~~~~~~ |
---|
121 | |
---|
122 | The is the Debian distribution for the Raspberry Pi. The following packages are |
---|
123 | required: |
---|
124 | |
---|
125 | .. code-block:: none |
---|
126 | |
---|
127 | $ sudo apt-get install autoconf automake bison flex binutils gcc g++ gdb \ |
---|
128 | texinfo unzip ncurses-dev python-dev git |
---|
129 | |
---|
130 | It is recommended you get Model B of the Pi with 512M of memory and to mount a |
---|
131 | remote disk over the network. The tools can be built on the network disk with a |
---|
132 | prefix under your home directory as recommended and end up on the SD card. |
---|
133 | |
---|
134 | .. _Ubuntu: |
---|
135 | .. _Xubuntu: |
---|
136 | |
---|
137 | Ubuntu |
---|
138 | ~~~~~~ |
---|
139 | |
---|
140 | The latest version is Ubuntu 20.04.3 LTS 64-bit. This section also includes |
---|
141 | Xubuntu. A minimal installation was used and the following packages installed: |
---|
142 | |
---|
143 | .. code-block:: none |
---|
144 | |
---|
145 | $ sudo apt-get build-dep build-essential gcc-defaults g++ gdb unzip \ |
---|
146 | pax bison flex texinfo python3-dev libpython2-dev libncurses5-dev \ |
---|
147 | zlib1g-dev |
---|
148 | |
---|
149 | Note that in previous versions of Ubuntu, the package libpython2-dev was |
---|
150 | python2.7-dev. The name of packages changes over time. You need the |
---|
151 | package with Python development libraries for C/C++ programs. The following |
---|
152 | is needed for recent versions: |
---|
153 | |
---|
154 | .. code-block:: none |
---|
155 | |
---|
156 | $ sudo apt-get install python git |
---|
157 | |
---|
158 | It is likely necessary that you will have to enable the Ubuntu Source |
---|
159 | Repositories. Users have suggested the following web pages which have |
---|
160 | instructions: |
---|
161 | |
---|
162 | * https://askubuntu.com/questions/158871/how-do-i-enable-the-source-code-repositories/158872 |
---|
163 | * https://askubuntu.com/questions/496549/error-you-must-put-some-source-uris-in-your-sources-list |
---|
164 | |
---|
165 | .. _Linux Mint: |
---|
166 | |
---|
167 | Linux Mint |
---|
168 | ~~~~~~~~~~ |
---|
169 | |
---|
170 | zlib package is required on Linux Mint. It has a different name (other |
---|
171 | than the usual zlib-dev): |
---|
172 | |
---|
173 | .. code-block:: none |
---|
174 | |
---|
175 | # sudo apt-get install zlib1g-dev |
---|
176 | |
---|
177 | .. _openSUSE: |
---|
178 | |
---|
179 | openSUSE |
---|
180 | ~~~~~~~~ |
---|
181 | |
---|
182 | This has been reported to work but no instructions were provided. This is an |
---|
183 | opportunity to contribute. Please submit any guidance you can provide. |
---|
184 | |
---|
185 | .. _FreeBSD: |
---|
186 | |
---|
187 | FreeBSD |
---|
188 | ------- |
---|
189 | |
---|
190 | The RTEMS Source Builder has been tested on FreeBSD 9.1, 10.3, 11 and |
---|
191 | 12 64bit versions. You need to install some ports. They are: |
---|
192 | |
---|
193 | .. code-block:: none |
---|
194 | |
---|
195 | # pkg install -y python |
---|
196 | # pkg install -y gsed |
---|
197 | |
---|
198 | For FreeBSD 13, you will need to install the packages listed above, as well as |
---|
199 | the following additional ones. They are: |
---|
200 | |
---|
201 | .. code-block:: none |
---|
202 | |
---|
203 | # pkg install -y bison texinfo gmake binutils |
---|
204 | |
---|
205 | FreeBSD's default C compiler is LLVM and installing the host's GCC compiler |
---|
206 | package may break building GCC. We recommend you do not install the GCC |
---|
207 | package and you use the default C compiler. |
---|
208 | |
---|
209 | If you wish to build Windows (mingw32) tools please install the following |
---|
210 | ports: |
---|
211 | |
---|
212 | .. code-block:: none |
---|
213 | |
---|
214 | # pkg install -y mingw32-binutils mingw32-gcc |
---|
215 | # pkg install -y mingw32-zlib mingw32-pthreads |
---|
216 | |
---|
217 | The *zlip* and *pthreads* ports for MinGW32 are used when builiding a Windows |
---|
218 | QEMU. |
---|
219 | |
---|
220 | Check if your kernel has a ``/dev/fd`` directory. If it does not we recommend |
---|
221 | you run as root the following command to speed up Python 3's subprocess |
---|
222 | support: |
---|
223 | |
---|
224 | .. code-block:: none |
---|
225 | |
---|
226 | # mount -t fdescfs none /dev/fd |
---|
227 | |
---|
228 | The support speeds up closing file descriptors when creating subprocesses. |
---|
229 | |
---|
230 | .. _NetBSD: |
---|
231 | |
---|
232 | NetBSD |
---|
233 | ------ |
---|
234 | |
---|
235 | The RTEMS Source Builder has been tested on NetBSD 6.1 i386. Packages to add |
---|
236 | are: |
---|
237 | |
---|
238 | .. code-block:: none |
---|
239 | |
---|
240 | # pkg_add ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/6.1/devel/gmake-3.82nb7.tgz |
---|
241 | # pkg_add ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/6.1/devel/bison-2.7.1.tgz |
---|
242 | # pkg_add ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/6.1/archivers/xz-5.0.4.tgz |
---|