[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 | |
---|
| 7 | POSIX Hosts |
---|
[aa1c010] | 8 | =========== |
---|
[86518bd] | 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 |
---|
[aa1c010] | 16 | ----------- |
---|
[86518bd] | 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 | |
---|
[2445655] | 25 | :ref:`QuickStartPrefixes` details using Prefixes to manage the installation. |
---|
[86518bd] | 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 |
---|
[eae5454] | 38 | :ref:`ProjectSandboxing` explains this in more detail. |
---|
[5577cc0] | 39 | |
---|
| 40 | Linux |
---|
| 41 | ----- |
---|
| 42 | |
---|
[9c3a383] | 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 | |
---|
[5577cc0] | 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 | |
---|
[2674d6a] | 56 | The 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 | |
---|
| 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 |
---|
[2674d6a] | 64 | provide 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 | |
---|
| 74 | CentOS |
---|
| 75 | ~~~~~~ |
---|
| 76 | |
---|
[7073017] | 77 | The following packages are required on a minimal CentOS 6.3 or CentOS 7 |
---|
[4dc93a1] | 78 | 64-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] | 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 | |
---|
[5577cc0] | 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 |
---|
[2674d6a] | 110 | packages: |
---|
[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 | |
---|
| 119 | Raspbian |
---|
| 120 | ~~~~~~~~ |
---|
| 121 | |
---|
| 122 | The is the Debian distribution for the Raspberry Pi. The following packages are |
---|
[2674d6a] | 123 | required: |
---|
| 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 | |
---|
| 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 | |
---|
[4e22dfe] | 140 | The latest version is Ubuntu 20.04.3 LTS 64-bit. This section also includes |
---|
[2674d6a] | 141 | Xubuntu. 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] | 149 | Note that in previous versions of Ubuntu, the package libpython2-dev was |
---|
[df3f2a4] | 150 | python2.7-dev. The name of packages changes over time. You need the |
---|
[4cc36ed] | 151 | package with Python development libraries for C/C++ programs. The following |
---|
| 152 | is needed for recent versions: |
---|
[df3f2a4] | 153 | |
---|
[4cc36ed] | 154 | .. code-block:: none |
---|
| 155 | |
---|
[4e22dfe] | 156 | $ sudo apt-get install python git |
---|
[4cc36ed] | 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: |
---|
[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 | |
---|
| 167 | Linux Mint |
---|
| 168 | ~~~~~~~~~~ |
---|
| 169 | |
---|
| 170 | zlib package is required on Linux Mint. It has a different name (other |
---|
[2674d6a] | 171 | than 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 | |
---|
| 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 | |
---|
[4007591] | 190 | The RTEMS Source Builder has been tested on FreeBSD 9.1, 10.3, 11 and |
---|
[7fab12c] | 191 | 12 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] | 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 | |
---|
[7fab12c] | 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. |
---|
[5577cc0] | 208 | |
---|
| 209 | If you wish to build Windows (mingw32) tools please install the following |
---|
[2674d6a] | 210 | ports: |
---|
[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] | 217 | The *zlip* and *pthreads* ports for MinGW32 are used when builiding a Windows |
---|
[5577cc0] | 218 | QEMU. |
---|
| 219 | |
---|
[7fab12c] | 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: |
---|
[4007591] | 223 | |
---|
| 224 | .. code-block:: none |
---|
| 225 | |
---|
| 226 | # mount -t fdescfs none /dev/fd |
---|
| 227 | |
---|
[7fab12c] | 228 | The support speeds up closing file descriptors when creating subprocesses. |
---|
[4007591] | 229 | |
---|
[5577cc0] | 230 | .. _NetBSD: |
---|
| 231 | |
---|
| 232 | NetBSD |
---|
| 233 | ------ |
---|
| 234 | |
---|
| 235 | The RTEMS Source Builder has been tested on NetBSD 6.1 i386. Packages to add |
---|
[2674d6a] | 236 | are: |
---|
[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 |
---|