[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 | |
---|
[6f6cde6f] | 13 | To re-generate auto*tool generated files (configure, Makefile.in etc), |
---|
[08c6c10] | 14 | autoconf-2.57 and automake-1.7.2 are required. |
---|
[6f6cde6f] | 15 | |
---|
[254b4450] | 16 | 2. Installation |
---|
| 17 | =============== |
---|
| 18 | |
---|
| 19 | 2.1 Standalone build |
---|
| 20 | |
---|
| 21 | To configure RTEMS for a specific target, run configure in the build |
---|
| 22 | directory. In addition to the standard configure options, the following |
---|
| 23 | RTEMS-specific option are supported: |
---|
| 24 | |
---|
| 25 | --disable-rtems-inlines |
---|
| 26 | --disable-posix |
---|
[70d27f9] | 27 | --disable-itron |
---|
[f205fe6d] | 28 | --disable-networking |
---|
[e81ef51] | 29 | --enable-cxx |
---|
[cf65c408] | 30 | --enable-bare-cpu-model=<MODEL> |
---|
| 31 | --enable-bare-cpu-cflags=<FLAGS> |
---|
[70d27f9] | 32 | --enable-multiprocessing |
---|
[254b4450] | 33 | --enable-rtemsbsp="bsp1 bsp2 ..." |
---|
[85d8eb2] | 34 | --enable-tests |
---|
[70d27f9] | 35 | --enable-rdbg (only valid for i386 and some PowerPC BSPs) |
---|
[003d4da] | 36 | --enable-docs |
---|
[254b4450] | 37 | |
---|
[ede9a691] | 38 | In addition, the following standard autoconf options are frequently |
---|
| 39 | used when configuring RTEMS installations: |
---|
| 40 | |
---|
| 41 | --prefix=INSTALL_DIRECTORY |
---|
| 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 |
---|
[6f6cde6f] | 67 | sample tests are built. --enable-tests will configure |
---|
[70d27f9] | 68 | the RTEMS test suite. The default speeds up the build |
---|
[85d8eb2] | 69 | and configure process when the tests are not desired. |
---|
[83e39b26] | 70 | |
---|
[6f6cde6f] | 71 | By default, RTEMS is built using arguments and build rules which require a |
---|
| 72 | gcc supporting the -specs option, ie. a gcc >= 2.8. |
---|
| 73 | [The --disable-gcc28 option, which has been present in former releases, has |
---|
| 74 | been removed.] |
---|
[70d27f9] | 75 | |
---|
| 76 | By default, multiprocessing is is not built. It can be enabled |
---|
| 77 | for those BSPs supporting it by the --enable-multiprocessing option. |
---|
[58ae19a] | 78 | |
---|
[cf65c408] | 79 | By default, all bsps for a target are built. The bare BSP is not built |
---|
[f9e72d3] | 80 | unless directly specified. There are two ways of changing this: |
---|
[254b4450] | 81 | |
---|
[f9e72d3] | 82 | + use the --enable-rtemsbsp option which will set the specified |
---|
[254b4450] | 83 | bsps as the default bsps, or |
---|
[9e86f6d6] | 84 | + set the RTEMS_BSP variable during make (see below). |
---|
[254b4450] | 85 | |
---|
[003d4da] | 86 | The --enable-rtemsbsp= option configures RTEMS for a specific board |
---|
| 87 | within a target architecture. Remember that the target specifies the |
---|
| 88 | CPU family while the BSP specifies the precise board you will be using. |
---|
| 89 | The following targets are supported: |
---|
[254b4450] | 90 | |
---|
| 91 | (none) will build the host-based version on Linux, |
---|
| 92 | Solaris and HPUX. |
---|
| 93 | |
---|
| 94 | a29k-rtems only standalone, uses non-gnu compiler |
---|
[e32fdfa] | 95 | arm-rtems |
---|
| 96 | h8300-rtems |
---|
[254b4450] | 97 | i386-rtems |
---|
| 98 | i960-rtems |
---|
[3ec7bfc] | 99 | hppa1.1-rtems |
---|
[254b4450] | 100 | m68k-rtems |
---|
[e32fdfa] | 101 | mips-rtems |
---|
[254b4450] | 102 | mips64orion-rtems |
---|
| 103 | no_cpu-rtems |
---|
| 104 | powerpc-rtems |
---|
[e32fdfa] | 105 | sh-rtems |
---|
[254b4450] | 106 | sparc-rtems |
---|
[cf65c408] | 107 | bare see notes |
---|
[003d4da] | 108 | |
---|
[58ae19a] | 109 | The cross-compiler is set to $(target)-gcc by default. This can be |
---|
[f9e72d3] | 110 | overridden by: |
---|
[58ae19a] | 111 | |
---|
[ede9a691] | 112 | + using the --program-prefix option to configure to specify the |
---|
[58ae19a] | 113 | string which will prepended to the tool names. Be sure to include |
---|
| 114 | a trailing "-". For example, to use a m68k-coff toolset, use the |
---|
| 115 | --program-prefix=m68k-coff- option. |
---|
| 116 | |
---|
[254b4450] | 117 | To build, run make in the build directory. To specify which bsps to build, |
---|
[9e86f6d6] | 118 | add the RTEMS_BSP="bsp1 bsp2 .." to the make command. Specifying multiple |
---|
| 119 | BSPs to build only works from the top level build directory. |
---|
[254b4450] | 120 | |
---|
[84b0f7c9] | 121 | Installation is done under $(prefix)/rtems. |
---|
[254b4450] | 122 | |
---|
| 123 | As an example, to build and install the mvme136 and dmv152 bsps for m68k do: |
---|
| 124 | |
---|
| 125 | (path_to_rtems_src)/configure --target=m68k-rtems |
---|
| 126 | |
---|
[9e86f6d6] | 127 | make RTEMS_BSP="mvme136 dmv152" |
---|
[254b4450] | 128 | |
---|
[9e86f6d6] | 129 | make install RTEMS_BSP="mvme136 dmv152" |
---|
[254b4450] | 130 | |
---|
| 131 | The sample tests are built by 'make all', do a 'make test' to build the full |
---|
| 132 | test suite. |
---|
| 133 | |
---|
[003d4da] | 134 | By default, --enable-docs is disabled and documentation is not built. |
---|
| 135 | |
---|
[254b4450] | 136 | 2.2 Build with Cygnus one-tree release |
---|
| 137 | |
---|
[6f6cde6f] | 138 | [NOTE: This section does not apply anymore.] |
---|
| 139 | |
---|
[254b4450] | 140 | To build and install RTEMS with the one-tree structure, just copy the rtems |
---|
| 141 | directory to the tree. The one-tree configure.in and Makefile.in has to be |
---|
| 142 | replaced with the RTEMS-aware versions. The build options are the same as |
---|
| 143 | for the standalone build. |
---|
| 144 | |
---|
[83e39b26] | 145 | 2.3 Target Dependent Notes |
---|
| 146 | |
---|
[cf65c408] | 147 | bare: |
---|
| 148 | |
---|
| 149 | 1. See the README in the bare bsp source directory. This should |
---|
| 150 | contain all info you need. |
---|
| 151 | 2. The bare bsp source contains a script to show how to build it. |
---|
| 152 | 3. The configure flags must be used to get the bare bsp to work. |
---|
| 153 | The --enable-bare-cpu-model and --enable-bare-cpu-cflags are the |
---|
| 154 | only pieces of information. The module is usually a gcc module |
---|
| 155 | such as m68302 or mcpu32. The flags are passed directly to gcc. |
---|
| 156 | Use "" if more than one option is specified. |
---|
[83e39b26] | 157 | |
---|
[254b4450] | 158 | 3. To use the installed RTEMS library |
---|
| 159 | ===================================== |
---|
| 160 | |
---|
| 161 | To use the installed RTEMS bsps to build applications, the application |
---|
| 162 | makefile has to include a bsp-specific makefile that will define the |
---|
| 163 | RTEMS variables necessary to find include files and libraries. The |
---|
| 164 | bsp-specific makefile is installed at |
---|
| 165 | |
---|
[f05f704] | 166 | $(RTEMS_MAKEFILE_PATH)/Makefile.inc |
---|
[254b4450] | 167 | |
---|
[f05f704] | 168 | For the erc32 bsp installed at /usr/local/cross, the environment |
---|
| 169 | variable RTEMS_MAKEFILE_PATH would be set as follows to the |
---|
| 170 | following: |
---|
[254b4450] | 171 | |
---|
[f05f704] | 172 | /usr/local/cross/sparc-rtems/rtems/erc32/Makefile.inc |
---|
[254b4450] | 173 | |
---|
| 174 | 4. Supported target bsps |
---|
| 175 | ======================== |
---|
| 176 | |
---|
| 177 | The following bsps are supported: |
---|
| 178 | |
---|
[08c6c10] | 179 | host-based : posix (on Linux, FreeBSD, Cygwin, Solaris, and HPUX) |
---|
| 180 | |
---|
| 181 | arm : arm_bare_bsp armulator edb7312 vegaplus |
---|
[254b4450] | 182 | |
---|
[4cb89cc9] | 183 | c4x : c4xsim |
---|
[08c6c10] | 184 | |
---|
[4cb89cc9] | 185 | h8300 : h8sim |
---|
[08c6c10] | 186 | |
---|
| 187 | i386 : i386ex pc386 pc386dx pc486 pc586 pc686 pck6 ts_386ex |
---|
| 188 | NOTE: The "pc386" BSP can be compiled to support a |
---|
| 189 | variety of PC configurations including PC-104 |
---|
| 190 | based solutions. |
---|
| 191 | |
---|
[4cb89cc9] | 192 | i960 : cvme961 i960sim rxgen960 |
---|
[08c6c10] | 193 | |
---|
[5b1f23c4] | 194 | m68k : dmv152 efi332 efi68k gen68302 gen68340 gen68360 |
---|
[08c6c10] | 195 | gen68360_040 idp mcf5206elite mrm332 mvme136 mvme147 |
---|
| 196 | mvme147s mvme162 mvme162lx ods68302 |
---|
| 197 | |
---|
| 198 | no_cpu : no_bsp (porting example) |
---|
| 199 | |
---|
[4cb89cc9] | 200 | mips : p4600 p4650 (p4000 port with either R4600 or R4650) |
---|
| 201 | jmr3904 genmongoosev |
---|
[08c6c10] | 202 | |
---|
| 203 | or32: : orp |
---|
| 204 | |
---|
| 205 | powerpc : dmv177 eth_comm gen405 helas403 mcp750 mbx8xx mtx603e |
---|
| 206 | mvme230x ppcn_60x psim score603e |
---|
| 207 | |
---|
| 208 | NOTE: The "motorola_powerpc" BSP is a single BSP which |
---|
| 209 | can be conditionally compiled to support most Motorola |
---|
| 210 | VMEbus, CompactPCI, and MTX boards.) |
---|
| 211 | |
---|
| 212 | sh : gensh1 gensh2 shsim simsh4 gensh4 |
---|
| 213 | |
---|
[a44f9ca5] | 214 | sparc : erc32 erc32nfp leon1 leon2 |
---|
[08c6c10] | 215 | |
---|
[cf65c408] | 216 | any : bare |
---|
[254b4450] | 217 | |
---|
[08c6c10] | 218 | The following ports are considered deprecated and will be removed in |
---|
| 219 | a future release: |
---|
| 220 | |
---|
| 221 | a29k : portsw |
---|
| 222 | |
---|
| 223 | hppa1.1 : simhppa |
---|
| 224 | |
---|
| 225 | mips64orion : (deprecated) |
---|
| 226 | p4600 p4650 (p4000 port with either R4600 or R4650) |
---|
| 227 | |
---|
| 228 | NOTE: MIPS support is NOT being dropped. This is a clean up |
---|
| 229 | effort and the mips64orion BSPs and CPUs will be |
---|
| 230 | supported by the mips port. |
---|
| 231 | |
---|
[254b4450] | 232 | 5. Makefile structure |
---|
| 233 | ===================== |
---|
| 234 | |
---|
[f9e72d3] | 235 | The makefiles have been re-organized. Most gnu-based bsps now use three |
---|
[254b4450] | 236 | main makefiles: |
---|
| 237 | + custom/default.cfg, |
---|
| 238 | + custom/bsp.cfg and |
---|
[f9e72d3] | 239 | + compilers/gcc-target-default.cfg. |
---|
[254b4450] | 240 | |
---|
[f9e72d3] | 241 | Default.cfg sets the default values of certain common build options. |
---|
[254b4450] | 242 | |
---|
| 243 | Bsp.cfg set bsp-specific build options and can also override the |
---|
| 244 | default settings. |
---|
| 245 | |
---|
[08c6c10] | 246 | Gcc-target-default.cfg contains the common gcc definitions. |
---|
[254b4450] | 247 | |
---|
| 248 | 6. Adding a bsp |
---|
| 249 | =============== |
---|
| 250 | |
---|
[08c6c10] | 251 | Please refer to the BSP and Device Driver Guide. |
---|
[6f6cde6f] | 252 | |
---|
[254b4450] | 253 | |
---|
| 254 | 7. Tested configurations |
---|
| 255 | ======================== |
---|
| 256 | |
---|
| 257 | All gnu-based bsps have been built on Linux. |
---|
[08c6c10] | 258 | |
---|
[f05f704] | 259 | The native (posix) ports have been built and run only on Linux. |
---|
[254b4450] | 260 | |
---|
| 261 | The following configurations have NOT been tested: |
---|
| 262 | |
---|
| 263 | + Anything on Nextstep, HPUX and Irix. |
---|
[08c6c10] | 264 | + The a29k port |
---|
| 265 | + The C4x and OR32 ports (requires specially patched toolchain) |
---|
[254b4450] | 266 | |
---|
[08c6c10] | 267 | 8. Prerequisites |
---|
| 268 | ================ |
---|
[254b4450] | 269 | |
---|
| 270 | Gawk version 2 or higher. |
---|
| 271 | GNU make version 3.72 or higher. |
---|
| 272 | Bash. |
---|
[6f6cde6f] | 273 | gcc version > 2.8 |
---|
[254b4450] | 274 | |
---|
[08c6c10] | 275 | NOTE: These prerequisites are probably out of date but autoconf should detect |
---|
| 276 | any problems. |
---|