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

Last change on this file since 7073017 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
RevLine 
[e52906b]1.. SPDX-License-Identifier: CC-BY-SA-4.0
[86518bd]2
[4886d60]3.. Copyright (C) 2016 Chris Johns <chrisj@rtems.org>
[86518bd]4
5.. _posix-hosts:
6
7POSIX Hosts
[aa1c010]8===========
[86518bd]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
[aa1c010]16-----------
[86518bd]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
[2445655]25:ref:`QuickStartPrefixes` details using Prefixes to manage the installation.
[86518bd]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
[eae5454]38:ref:`ProjectSandboxing` explains this in more detail.
[5577cc0]39
40Linux
41-----
42
[9c3a383]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
[5577cc0]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
[2674d6a]56The following packages are required on a fresh Archlinux 64bit installation:
[5577cc0]57
[d5b631f]58.. code-block:: none
[2674d6a]59
60  # pacman -S base-devel gdb xz unzip ncurses git zlib
[5577cc0]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
[2674d6a]64provide a manual override:
65
[d5b631f]66.. code-block:: none
[5577cc0]67
[2674d6a]68  # pacman -R texinfo
69  $ yaourt -S texinfo-legacy
70  # ln -s /usr/bin/makeinfo-4.13a /usr/bin/makeinfo
[5577cc0]71
72.. _CentOS:
73
74CentOS
75~~~~~~
76
[7073017]77The following packages are required on a minimal CentOS 6.3 or CentOS 7
[4dc93a1]7864-bit installation:
[2674d6a]79
[d5b631f]80.. code-block:: none
[5577cc0]81
[4dc93a1]82  # yum install autoconf automake binutils gcc gcc-c++ gdb make patch pax \
[2674d6a]83  bison flex xz unzip ncurses-devel texinfo zlib-devel python-devel git
[5577cc0]84
[4dc93a1]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
[5577cc0]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
[2674d6a]110packages:
[5577cc0]111
[d5b631f]112.. code-block:: none
[2674d6a]113
114  # yum install ncurses-devel python-devel git bison gcc cvs gcc-c++ \
115       flex texinfo patch perl-Text-ParseWords zlib-devel
[5577cc0]116
117.. _Raspbian:
118
119Raspbian
120~~~~~~~~
121
122The is the Debian distribution for the Raspberry Pi. The following packages are
[2674d6a]123required:
124
[d5b631f]125.. code-block:: none
[5577cc0]126
[2674d6a]127  $ sudo apt-get install autoconf automake bison flex binutils gcc g++ gdb \
128  texinfo unzip ncurses-dev python-dev git
[5577cc0]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
[4e22dfe]140The latest version is Ubuntu 20.04.3 LTS 64-bit. This section also includes
[2674d6a]141Xubuntu. A minimal installation was used and the following packages installed:
142
[d5b631f]143.. code-block:: none
[2674d6a]144
[4e22dfe]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
[5577cc0]148
[4e22dfe]149Note that in previous versions of Ubuntu, the package libpython2-dev was
[df3f2a4]150python2.7-dev. The name of packages changes over time. You need the
[4cc36ed]151package with Python development libraries for C/C++ programs. The following
152is needed for recent versions:
[df3f2a4]153
[4cc36ed]154.. code-block:: none
155
[4e22dfe]156  $ sudo apt-get install python git
[4cc36ed]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:
[df3f2a4]161
[2674d6a]162* https://askubuntu.com/questions/158871/how-do-i-enable-the-source-code-repositories/158872
[df3f2a4]163* https://askubuntu.com/questions/496549/error-you-must-put-some-source-uris-in-your-sources-list
[5577cc0]164
165.. _Linux Mint:
166
167Linux Mint
168~~~~~~~~~~
169
170zlib package is required on Linux Mint. It has a different name (other
[2674d6a]171than the usual zlib-dev):
172
[d5b631f]173.. code-block:: none
[5577cc0]174
[2674d6a]175  # sudo apt-get install zlib1g-dev
[5577cc0]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
[4007591]190The RTEMS Source Builder has been tested on FreeBSD 9.1, 10.3, 11 and
[7fab12c]19112 64bit versions. You need to install some ports. They are:
[2674d6a]192
[d5b631f]193.. code-block:: none
[5577cc0]194
[7fab12c]195  # pkg install -y python
196  # pkg install -y gsed
197
[13092ff]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
[7fab12c]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.
[5577cc0]208
209If you wish to build Windows (mingw32) tools please install the following
[2674d6a]210ports:
[5577cc0]211
[d5b631f]212.. code-block:: none
[2674d6a]213
[7fab12c]214  # pkg install -y mingw32-binutils mingw32-gcc
215  # pkg install -y mingw32-zlib mingw32-pthreads
[5577cc0]216
[7fab12c]217The *zlip* and *pthreads* ports for MinGW32 are used when builiding a Windows
[5577cc0]218QEMU.
219
[7fab12c]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:
[4007591]223
224.. code-block:: none
225
226  # mount -t fdescfs none /dev/fd
227
[7fab12c]228The support speeds up closing file descriptors when creating subprocesses.
[4007591]229
[5577cc0]230.. _NetBSD:
231
232NetBSD
233------
234
235The RTEMS Source Builder has been tested on NetBSD 6.1 i386. Packages to add
[2674d6a]236are:
[5577cc0]237
[d5b631f]238.. code-block:: none
[5577cc0]239
[2674d6a]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.