source: rtems-docs/user/hosts/posix.rst @ 2924bf7

Last change on this file since 2924bf7 was 7073017, checked in by Joel Sherrill <joel@…>, on 01/24/22 at 22:35:10

user/hosts/posix.rst: Replace Cent)S with CentOS

  • Property mode set to 100644
File size: 7.1 KB
Line 
1.. SPDX-License-Identifier: CC-BY-SA-4.0
2
3.. Copyright (C) 2016 Chris Johns <chrisj@rtems.org>
4
5.. _posix-hosts:
6
7POSIX Hosts
8===========
9
10POSIX hosts are most Unix operating systems such as Linux, FreeBSD and
11NetBSD. RTEMS development works well on Unix and can scale from a single user
12and a desktop machine to a team with decentralised or centralised development
13infrastructure.
14
15Root Access
16-----------
17
18You either have ``root`` access to your host development machine or you do
19not. Some users are given hardware that is centrally managed. If you do not
20have ``root`` access you can create your work environment in your home
21directory. You could use a prefix of :file:`$HOME/development/rtems` or
22:file:`$HOME/rtems`. Note, the ``$HOME`` environment variable can be
23substituted with ``~``.
24
25:ref:`QuickStartPrefixes` details using Prefixes to manage the installation.
26
27RTEMS Tools and packages do not require ``root`` access
28to be built and we encourage you to not build the tools as ``root``. If you
29need to control write access then it is best to manage this with groups
30assigned to users.
31
32If you have ``root`` access you can decide to install the tools under any
33suitable prefix. This may depend on the hardware in your host development
34machine. If the machine is a centralised build server the prefix may be used to
35separate production versions from the test versions and the prefix paths may
36have restricted access rights to only those who manage and have configuration
37control of the machine. We call this project sandboxing and
38:ref:`ProjectSandboxing` explains this in more detail.
39
40Linux
41-----
42
43BSP Build will require ``pax`` package if RTEMS is configured with the
44``--enable-tests`` option, see :ref:`BuildingRTEMSTests`. This package is not
45installed , by default, on many Linux distributions, you can check for it
46using your package manager. Install it, if it is not present on your system.
47
48A number of different Linux distrubutions are known to work. The following have
49been tested and report as working.
50
51.. _ArchLinux:
52
53ArchLinux
54~~~~~~~~~
55
56The 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
62Archlinux, by default installs ``texinfo-5`` which is incompatible for building
63GCC 4.7 tree. You will have to obtain ``texinfo-legacy`` from ``AUR`` and
64provide 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
74CentOS
75~~~~~~
76
77The following packages are required on a minimal CentOS 6.3 or CentOS 7
7864-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
85On CentOS 8, the ``pax`` command is now provided by the ``spax`` package,
86you need to enable the PowerTools repository. and use Python3.  On a
87fresh install, the following commands should install everything you
88need 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
100The minimal CentOS distribution is a specific DVD that installs a minimal
101system. If you use a full system some of these packages may have been
102installed.
103
104.. _Fedora:
105
106Fedora
107~~~~~~
108
109The RTEMS Source Builder has been tested on Fedora 19 64bit with the following
110packages:
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
119Raspbian
120~~~~~~~~
121
122The is the Debian distribution for the Raspberry Pi. The following packages are
123required:
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
130It is recommended you get Model B of the Pi with 512M of memory and to mount a
131remote disk over the network. The tools can be built on the network disk with a
132prefix under your home directory as recommended and end up on the SD card.
133
134.. _Ubuntu:
135.. _Xubuntu:
136
137Ubuntu
138~~~~~~
139
140The latest version is Ubuntu 20.04.3 LTS 64-bit. This section also includes
141Xubuntu. 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
149Note that in previous versions of Ubuntu, the package libpython2-dev was
150python2.7-dev. The name of packages changes over time. You need the
151package with Python development libraries for C/C++ programs. The following
152is needed for recent versions:
153
154.. code-block:: none
155
156  $ sudo apt-get install python git
157
158It is likely necessary that you will have to enable the Ubuntu Source
159Repositories.  Users have suggested the following web pages which have
160instructions:
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
167Linux Mint
168~~~~~~~~~~
169
170zlib package is required on Linux Mint. It has a different name (other
171than the usual zlib-dev):
172
173.. code-block:: none
174
175  # sudo apt-get install zlib1g-dev
176
177.. _openSUSE:
178
179openSUSE
180~~~~~~~~
181
182This has been reported to work but no instructions were provided. This is an
183opportunity to contribute. Please submit any guidance you can provide.
184
185.. _FreeBSD:
186
187FreeBSD
188-------
189
190The RTEMS Source Builder has been tested on FreeBSD 9.1, 10.3, 11 and
19112 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
198For FreeBSD 13, you will need to install the packages listed above, as well as
199the following additional ones. They are:
200
201.. code-block:: none
202
203  # pkg install -y bison texinfo gmake binutils
204
205FreeBSD's default C compiler is LLVM and installing the host's GCC compiler
206package may break building GCC. We recommend you do not install the GCC
207package and you use the default C compiler.
208
209If you wish to build Windows (mingw32) tools please install the following
210ports:
211
212.. code-block:: none
213
214  # pkg install -y mingw32-binutils mingw32-gcc
215  # pkg install -y mingw32-zlib mingw32-pthreads
216
217The *zlip* and *pthreads* ports for MinGW32 are used when builiding a Windows
218QEMU.
219
220Check if your kernel has a ``/dev/fd`` directory. If it does not we recommend
221you run as root the following command to speed up Python 3's subprocess
222support:
223
224.. code-block:: none
225
226  # mount -t fdescfs none /dev/fd
227
228The support speeds up closing file descriptors when creating subprocesses.
229
230.. _NetBSD:
231
232NetBSD
233------
234
235The RTEMS Source Builder has been tested on NetBSD 6.1 i386. Packages to add
236are:
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
Note: See TracBrowser for help on using the repository browser.