[6f9c75c3] | 1 | # |
---|
| 2 | # $Id$ |
---|
| 3 | # |
---|
[254b4450] | 4 | |
---|
| 5 | 1. Autoconf support |
---|
| 6 | =================== |
---|
| 7 | |
---|
| 8 | This version of RTEMS is configured with GNU autoconf. RTEMS can be |
---|
| 9 | configured and built either standalone or together with the compiler |
---|
| 10 | tools in the Cygnus one-tree structure. Using autoconf also means |
---|
| 11 | that RTEMS now can be built in a separate build directory. |
---|
| 12 | |
---|
| 13 | 2. Installation |
---|
| 14 | =============== |
---|
| 15 | |
---|
| 16 | 2.1 Standalone build |
---|
| 17 | |
---|
| 18 | To configure RTEMS for a specific target, run configure in the build |
---|
| 19 | directory. In addition to the standard configure options, the following |
---|
| 20 | RTEMS-specific option are supported: |
---|
| 21 | |
---|
| 22 | --disable-rtems-inlines |
---|
| 23 | --disable-posix |
---|
[70d27f9] | 24 | --disable-itron |
---|
[f205fe6d] | 25 | --disable-networking |
---|
[e81ef51] | 26 | --enable-cxx |
---|
[cf65c408] | 27 | --enable-bare-cpu-model=<MODEL> |
---|
| 28 | --enable-bare-cpu-cflags=<FLAGS> |
---|
[9e86f6d6] | 29 | --enable-gcc28 (also use enable-libcdir when disabled) |
---|
| 30 | --enable-libcdir=<DIRECTORY> (do not use if gcc 2.8 is enabled) |
---|
[70d27f9] | 31 | --enable-multiprocessing |
---|
[254b4450] | 32 | --enable-rtemsbsp="bsp1 bsp2 ..." |
---|
[85d8eb2] | 33 | --enable-tests |
---|
[70d27f9] | 34 | --enable-rdbg (only valid for i386 and some PowerPC BSPs) |
---|
[003d4da] | 35 | --enable-docs |
---|
[254b4450] | 36 | |
---|
[ede9a691] | 37 | In addition, the following standard autoconf options are frequently |
---|
| 38 | used when configuring RTEMS installations: |
---|
| 39 | |
---|
| 40 | --prefix=INSTALL_DIRECTORY |
---|
| 41 | --program-prefix= |
---|
| 42 | |
---|
[70d27f9] | 43 | By default, inline routines are used instead of macros where possible. |
---|
| 44 | Macros can be selected using the --disable-inlines option. [NOTE: |
---|
| 45 | Some APIs may not support macro versions of their inline routines.] |
---|
| 46 | |
---|
| 47 | By default, the RTEMS POSIX 1003.1b interface is built for targets that support |
---|
[83e39b26] | 48 | it. It can be disabled with the --disable-posix option. |
---|
| 49 | |
---|
[70d27f9] | 50 | By default, the RTEMS uITRON interface is built for targets that support |
---|
| 51 | it. It can be disabled with the --disable-itron option. |
---|
| 52 | |
---|
[f205fe6d] | 53 | By default, the RTEMS networking support is built for targets which |
---|
| 54 | support it. It can be specifically disabled for those targets |
---|
| 55 | with the --disable-networking option. |
---|
[1f0f3e35] | 56 | |
---|
[55b8fef2] | 57 | By default, the RTEMS remote debugger server support is not built. |
---|
| 58 | It can be specifically enabled for the targets that support it. |
---|
| 59 | with the --enable-rdbg option. NB : the RTEMS networking support |
---|
| 60 | must be enabled to support the remote debugger server. |
---|
| 61 | |
---|
[91333c2] | 62 | By default, the RTEMS support of C++ is disabled. It can be enabled |
---|
[e81ef51] | 63 | with the --enable-cxx option. If the rtems++ C++ library is installed |
---|
[91333c2] | 64 | it will also be build. |
---|
| 65 | |
---|
[70d27f9] | 66 | By default, the RTEMS test suites are NOT configured -- only the |
---|
| 67 | sample tests are built. The --enable-tests will not configure |
---|
| 68 | the RTEMS test suite. The default speeds up the build |
---|
[85d8eb2] | 69 | and configure process when the tests are not desired. |
---|
[83e39b26] | 70 | |
---|
[58ae19a] | 71 | By default, RTEMS is built using arguments and build rules which are |
---|
[85d8eb2] | 72 | NOT compatible with gcc 2.7.2.2. If using a gcc which supports the |
---|
| 73 | -specs option, then the --enable-gcc28 option may be used to enable |
---|
| 74 | this feature. You should use the --enable-gcc28 option when using |
---|
| 75 | either the egcs source tree, testgcc snapshots, or gcc 2.8.0 or newer. |
---|
| 76 | If you --disable-gcc28, then you MUST specify the location of the |
---|
[70d27f9] | 77 | Standard C Library with the --enable-libcdir option. [NOTE: These |
---|
| 78 | options are considered obsolete and may be removed in a future |
---|
| 79 | RTEMS release.] |
---|
| 80 | |
---|
| 81 | By default, multiprocessing is is not built. It can be enabled |
---|
| 82 | for those BSPs supporting it by the --enable-multiprocessing option. |
---|
[58ae19a] | 83 | |
---|
[cf65c408] | 84 | By default, all bsps for a target are built. The bare BSP is not built |
---|
[f9e72d3] | 85 | unless directly specified. There are two ways of changing this: |
---|
[254b4450] | 86 | |
---|
[f9e72d3] | 87 | + use the --enable-rtemsbsp option which will set the specified |
---|
[254b4450] | 88 | bsps as the default bsps, or |
---|
[9e86f6d6] | 89 | + set the RTEMS_BSP variable during make (see below). |
---|
[254b4450] | 90 | |
---|
[003d4da] | 91 | The --enable-rtemsbsp= option configures RTEMS for a specific board |
---|
| 92 | within a target architecture. Remember that the target specifies the |
---|
| 93 | CPU family while the BSP specifies the precise board you will be using. |
---|
| 94 | The following targets are supported: |
---|
[254b4450] | 95 | |
---|
| 96 | (none) will build the host-based version on Linux, |
---|
| 97 | Solaris and HPUX. |
---|
| 98 | |
---|
| 99 | a29k-rtems only standalone, uses non-gnu compiler |
---|
[e32fdfa] | 100 | arm-rtems |
---|
| 101 | h8300-rtems |
---|
[254b4450] | 102 | i386-rtems |
---|
| 103 | i960-rtems |
---|
[3ec7bfc] | 104 | hppa1.1-rtems |
---|
[254b4450] | 105 | m68k-rtems |
---|
[e32fdfa] | 106 | mips-rtems |
---|
[254b4450] | 107 | mips64orion-rtems |
---|
| 108 | no_cpu-rtems |
---|
| 109 | powerpc-rtems |
---|
[e32fdfa] | 110 | sh-rtems |
---|
[254b4450] | 111 | sparc-rtems |
---|
[cf65c408] | 112 | bare see notes |
---|
[003d4da] | 113 | |
---|
[58ae19a] | 114 | The cross-compiler is set to $(target)-gcc by default. This can be |
---|
[f9e72d3] | 115 | overridden by: |
---|
[58ae19a] | 116 | |
---|
[ede9a691] | 117 | + using the --program-prefix option to configure to specify the |
---|
[58ae19a] | 118 | string which will prepended to the tool names. Be sure to include |
---|
| 119 | a trailing "-". For example, to use a m68k-coff toolset, use the |
---|
| 120 | --program-prefix=m68k-coff- option. |
---|
| 121 | |
---|
[254b4450] | 122 | To build, run make in the build directory. To specify which bsps to build, |
---|
[9e86f6d6] | 123 | add the RTEMS_BSP="bsp1 bsp2 .." to the make command. Specifying multiple |
---|
| 124 | BSPs to build only works from the top level build directory. |
---|
[254b4450] | 125 | |
---|
[84b0f7c9] | 126 | Installation is done under $(prefix)/rtems. |
---|
[254b4450] | 127 | |
---|
| 128 | As an example, to build and install the mvme136 and dmv152 bsps for m68k do: |
---|
| 129 | |
---|
| 130 | (path_to_rtems_src)/configure --target=m68k-rtems |
---|
| 131 | |
---|
[9e86f6d6] | 132 | make RTEMS_BSP="mvme136 dmv152" |
---|
[254b4450] | 133 | |
---|
[9e86f6d6] | 134 | make install RTEMS_BSP="mvme136 dmv152" |
---|
[254b4450] | 135 | |
---|
| 136 | The sample tests are built by 'make all', do a 'make test' to build the full |
---|
| 137 | test suite. |
---|
| 138 | |
---|
[003d4da] | 139 | By default, --enable-docs is disabled and documentation is not built. |
---|
| 140 | |
---|
[254b4450] | 141 | 2.2 Build with Cygnus one-tree release |
---|
| 142 | |
---|
| 143 | To build and install RTEMS with the one-tree structure, just copy the rtems |
---|
| 144 | directory to the tree. The one-tree configure.in and Makefile.in has to be |
---|
| 145 | replaced with the RTEMS-aware versions. The build options are the same as |
---|
| 146 | for the standalone build. |
---|
| 147 | |
---|
[83e39b26] | 148 | 2.3 Target Dependent Notes |
---|
| 149 | |
---|
[cf65c408] | 150 | bare: |
---|
| 151 | |
---|
| 152 | 1. See the README in the bare bsp source directory. This should |
---|
| 153 | contain all info you need. |
---|
| 154 | 2. The bare bsp source contains a script to show how to build it. |
---|
| 155 | 3. The configure flags must be used to get the bare bsp to work. |
---|
| 156 | The --enable-bare-cpu-model and --enable-bare-cpu-cflags are the |
---|
| 157 | only pieces of information. The module is usually a gcc module |
---|
| 158 | such as m68302 or mcpu32. The flags are passed directly to gcc. |
---|
| 159 | Use "" if more than one option is specified. |
---|
[83e39b26] | 160 | |
---|
[254b4450] | 161 | 3. To use the installed RTEMS library |
---|
| 162 | ===================================== |
---|
| 163 | |
---|
| 164 | To use the installed RTEMS bsps to build applications, the application |
---|
| 165 | makefile has to include a bsp-specific makefile that will define the |
---|
| 166 | RTEMS variables necessary to find include files and libraries. The |
---|
| 167 | bsp-specific makefile is installed at |
---|
| 168 | |
---|
[f05f704] | 169 | $(RTEMS_MAKEFILE_PATH)/Makefile.inc |
---|
[254b4450] | 170 | |
---|
[f05f704] | 171 | For the erc32 bsp installed at /usr/local/cross, the environment |
---|
| 172 | variable RTEMS_MAKEFILE_PATH would be set as follows to the |
---|
| 173 | following: |
---|
[254b4450] | 174 | |
---|
[f05f704] | 175 | /usr/local/cross/sparc-rtems/rtems/erc32/Makefile.inc |
---|
[254b4450] | 176 | |
---|
| 177 | 4. Supported target bsps |
---|
| 178 | ======================== |
---|
| 179 | |
---|
| 180 | The following bsps are supported: |
---|
| 181 | |
---|
[f9e72d3] | 182 | host-based : posix (on Linux, Solaris and HPUX) |
---|
[254b4450] | 183 | |
---|
| 184 | a29k : portsw |
---|
[4cb89cc9] | 185 | arm : arm_bare_bsp armulator vegaplus |
---|
| 186 | c4x : c4xsim |
---|
| 187 | h8300 : h8sim |
---|
| 188 | i386 : i386ex pc386 ts_386ex |
---|
| 189 | i960 : cvme961 i960sim rxgen960 |
---|
[3ec7bfc] | 190 | hppa1.1 : simhppa |
---|
[5b1f23c4] | 191 | m68k : dmv152 efi332 efi68k gen68302 gen68340 gen68360 |
---|
| 192 | gen68360_040 idp mvme136 mvme147 mvme147s mvme162 ods68302 |
---|
[e32fdfa] | 193 | mrm332 |
---|
[254b4450] | 194 | no_cpu : no_bsp |
---|
[4cb89cc9] | 195 | mips : p4600 p4650 (p4000 port with either R4600 or R4650) |
---|
| 196 | jmr3904 genmongoosev |
---|
| 197 | mips64orion : (deprecated) |
---|
| 198 | p4600 p4650 (p4000 port with either R4600 or R4650) |
---|
[0aa09608] | 199 | powerpc : dmv177 eth_comm helas403 gen405 mbx8xx motorola_powerpc (covers |
---|
[4cb89cc9] | 200 | most Motorola VMEbus and CompactPCI boards) ppcn_60x |
---|
| 201 | psim score603e |
---|
| 202 | sh : gensh1 gensh2 |
---|
[a44f9ca5] | 203 | sparc : erc32 erc32nfp leon1 leon2 |
---|
[cf65c408] | 204 | any : bare |
---|
[254b4450] | 205 | |
---|
| 206 | 5. Makefile structure |
---|
| 207 | ===================== |
---|
| 208 | |
---|
[f9e72d3] | 209 | The makefiles have been re-organized. Most gnu-based bsps now use three |
---|
[254b4450] | 210 | main makefiles: |
---|
| 211 | + custom/default.cfg, |
---|
| 212 | + custom/bsp.cfg and |
---|
[f9e72d3] | 213 | + compilers/gcc-target-default.cfg. |
---|
[254b4450] | 214 | |
---|
[f9e72d3] | 215 | Default.cfg sets the default values of certain common build options. |
---|
[254b4450] | 216 | |
---|
| 217 | Bsp.cfg set bsp-specific build options and can also override the |
---|
| 218 | default settings. |
---|
| 219 | |
---|
| 220 | Gcc-target-default.cfg contains the common gcc definitions. Some targets |
---|
| 221 | (a29k, no_cpu, and posix) still use the old structure. |
---|
| 222 | |
---|
| 223 | 6. Adding a bsp |
---|
| 224 | =============== |
---|
| 225 | |
---|
| 226 | The top-level configure.in has to be modified if a new target is added |
---|
| 227 | or if a new bsp is to be built by default. The additions required is |
---|
| 228 | basically to add which makefiles are to be created by configure and |
---|
| 229 | to add the target to the selection statement. To re-generate |
---|
[f9e72d3] | 230 | configure, autoconf-2.13 and automake-1.14 are needed. |
---|
[254b4450] | 231 | |
---|
| 232 | 7. Tested configurations |
---|
| 233 | ======================== |
---|
| 234 | |
---|
| 235 | All gnu-based bsps have been built on Linux. |
---|
[f05f704] | 236 | The native (posix) ports have been built and run only on Linux. |
---|
[254b4450] | 237 | |
---|
| 238 | The following configurations have NOT been tested: |
---|
| 239 | |
---|
| 240 | + Anything on Nextstep, HPUX and Irix. |
---|
| 241 | + The a29k port. |
---|
| 242 | |
---|
| 243 | 8. Pre-requisites |
---|
| 244 | ================= |
---|
| 245 | |
---|
| 246 | Gawk version 2 or higher. |
---|
| 247 | GNU make version 3.72 or higher. |
---|
| 248 | Bash. |
---|
| 249 | gcc version ??? |
---|
| 250 | |
---|
| 251 | TODO |
---|
| 252 | ==== |
---|
| 253 | |
---|
[f9e72d3] | 254 | The install-if-change script requires bash. On Solaris systems, this should |
---|
| 255 | be changed to ksh, since ksh is provided with Solaris (bash not). |
---|
[254b4450] | 256 | |
---|
[f9e72d3] | 257 | A fairly recent version of gawk is needed to build RTEMS. This should be |
---|
[58ae19a] | 258 | changed so that a plain vanilla awk also works. [NOTE: This dependency |
---|
| 259 | should disappear when the "gcc 2.8 -specs" is finished.] |
---|
[254b4450] | 260 | |
---|
| 261 | 'make install' should only install necessary files, not the full |
---|
| 262 | PROJECT_RELEASE directory as now. |
---|
| 263 | |
---|
[f9e72d3] | 264 | Posix port on Solaris-2.5 fails due to undefined built-in functions |
---|
[254b4450] | 265 | (gcc-2.7.2, might be my installation). |
---|
| 266 | |
---|
| 267 | Improve support for 'make CFLAGS=xxx'. |
---|
| 268 | |
---|