[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), |
---|
[3d0f7c8] | 14 | autoconf-2.59 and automake-1.8 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 | |
---|
[1a63b528] | 25 | --disable-rtems-inlines |
---|
| 26 | --disable-posix |
---|
| 27 | --disable-itron |
---|
| 28 | --disable-networking |
---|
| 29 | --enable-cxx |
---|
| 30 | --enable-bare-cpu-model=<MODEL> |
---|
| 31 | --enable-bare-cpu-cflags=<FLAGS> |
---|
| 32 | --enable-multiprocessing |
---|
| 33 | --enable-rtemsbsp="bsp1 bsp2 ..." |
---|
| 34 | --enable-tests |
---|
| 35 | --enable-rdbg (only valid for i386 and some PowerPC BSPs) |
---|
| 36 | --enable-docs |
---|
[254b4450] | 37 | |
---|
[ede9a691] | 38 | In addition, the following standard autoconf options are frequently |
---|
| 39 | used when configuring RTEMS installations: |
---|
| 40 | |
---|
[1a63b528] | 41 | --prefix=INSTALL_DIRECTORY |
---|
[ede9a691] | 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 | |
---|
[1a63b528] | 82 | + use the --enable-rtemsbsp option which will set the specified |
---|
| 83 | bsps as the default bsps, or |
---|
| 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 | |
---|
[1a63b528] | 91 | (none) will build the host-based version on Linux, |
---|
| 92 | Solaris and HPUX. |
---|
| 93 | |
---|
| 94 | arm-rtems |
---|
| 95 | c4x-rtems |
---|
| 96 | h8300-rtems |
---|
| 97 | i386-rtems |
---|
| 98 | m68k-rtems |
---|
| 99 | mips-rtems |
---|
| 100 | no_cpu-rtems |
---|
| 101 | or32-rtems |
---|
| 102 | powerpc-rtems |
---|
| 103 | sh-rtems |
---|
| 104 | sparc-rtems |
---|
| 105 | bare see notes |
---|
[003d4da] | 106 | |
---|
[58ae19a] | 107 | The cross-compiler is set to $(target)-gcc by default. This can be |
---|
[f9e72d3] | 108 | overridden by: |
---|
[58ae19a] | 109 | |
---|
[1a63b528] | 110 | + using the --program-prefix option to configure to specify the |
---|
| 111 | string which will prepended to the tool names. Be sure to include |
---|
| 112 | a trailing "-". For example, to use a m68k-coff toolset, use the |
---|
| 113 | --program-prefix=m68k-coff- option. |
---|
[58ae19a] | 114 | |
---|
[254b4450] | 115 | To build, run make in the build directory. To specify which bsps to build, |
---|
[9e86f6d6] | 116 | add the RTEMS_BSP="bsp1 bsp2 .." to the make command. Specifying multiple |
---|
| 117 | BSPs to build only works from the top level build directory. |
---|
[254b4450] | 118 | |
---|
[84b0f7c9] | 119 | Installation is done under $(prefix)/rtems. |
---|
[254b4450] | 120 | |
---|
[17228d13] | 121 | As an example, to build and install the mvme136 and mvme162 bsps for m68k do: |
---|
[254b4450] | 122 | |
---|
[1a63b528] | 123 | (path_to_rtems_src)/configure --target=m68k-rtems |
---|
[254b4450] | 124 | |
---|
[1a63b528] | 125 | make RTEMS_BSP="mvme136 mvme162" |
---|
| 126 | |
---|
| 127 | make install RTEMS_BSP="mvme136 mvme162" |
---|
[254b4450] | 128 | |
---|
| 129 | The sample tests are built by 'make all', do a 'make test' to build the full |
---|
| 130 | test suite. |
---|
| 131 | |
---|
[003d4da] | 132 | By default, --enable-docs is disabled and documentation is not built. |
---|
| 133 | |
---|
[254b4450] | 134 | 2.2 Build with Cygnus one-tree release |
---|
| 135 | |
---|
[6f6cde6f] | 136 | [NOTE: This section does not apply anymore.] |
---|
| 137 | |
---|
[254b4450] | 138 | To build and install RTEMS with the one-tree structure, just copy the rtems |
---|
| 139 | directory to the tree. The one-tree configure.in and Makefile.in has to be |
---|
| 140 | replaced with the RTEMS-aware versions. The build options are the same as |
---|
| 141 | for the standalone build. |
---|
| 142 | |
---|
[83e39b26] | 143 | 2.3 Target Dependent Notes |
---|
| 144 | |
---|
[cf65c408] | 145 | bare: |
---|
| 146 | |
---|
[1a63b528] | 147 | 1. See the README in the bare bsp source directory. This should |
---|
| 148 | contain all info you need. |
---|
| 149 | 2. The bare bsp source contains a script to show how to build it. |
---|
| 150 | 3. The configure flags must be used to get the bare bsp to work. |
---|
| 151 | The --enable-bare-cpu-model and --enable-bare-cpu-cflags are the |
---|
| 152 | only pieces of information. The module is usually a gcc module |
---|
| 153 | such as m68302 or mcpu32. The flags are passed directly to gcc. |
---|
| 154 | Use "" if more than one option is specified. |
---|
[83e39b26] | 155 | |
---|
[254b4450] | 156 | 3. To use the installed RTEMS library |
---|
| 157 | ===================================== |
---|
| 158 | |
---|
| 159 | To use the installed RTEMS bsps to build applications, the application |
---|
| 160 | makefile has to include a bsp-specific makefile that will define the |
---|
| 161 | RTEMS variables necessary to find include files and libraries. The |
---|
| 162 | bsp-specific makefile is installed at |
---|
| 163 | |
---|
[1a63b528] | 164 | $(RTEMS_MAKEFILE_PATH)/Makefile.inc |
---|
[254b4450] | 165 | |
---|
[f05f704] | 166 | For the erc32 bsp installed at /usr/local/cross, the environment |
---|
| 167 | variable RTEMS_MAKEFILE_PATH would be set as follows to the |
---|
| 168 | following: |
---|
[254b4450] | 169 | |
---|
[f05f704] | 170 | /usr/local/cross/sparc-rtems/rtems/erc32/Makefile.inc |
---|
[254b4450] | 171 | |
---|
| 172 | 4. Supported target bsps |
---|
| 173 | ======================== |
---|
| 174 | |
---|
| 175 | The following bsps are supported: |
---|
| 176 | |
---|
[08c6c10] | 177 | host-based : posix (on Linux, FreeBSD, Cygwin, Solaris, and HPUX) |
---|
| 178 | |
---|
[0af14458] | 179 | arm : csb336 csb337 edb7312 gba gp32 rtl22x |
---|
[1a63b528] | 180 | |
---|
| 181 | avr: : none |
---|
| 182 | |
---|
| 183 | bfin : eZKit533 |
---|
[254b4450] | 184 | |
---|
[c7f8bbea] | 185 | c4x : c3xsim c4xsim |
---|
[08c6c10] | 186 | |
---|
[4cb89cc9] | 187 | h8300 : h8sim |
---|
[08c6c10] | 188 | |
---|
[1a63b528] | 189 | i386 : 386ex pc386 pc386dx pc486 pc586 pc686 pck6 ts_386ex |
---|
| 190 | NOTE: The "pc386" BSP can be compiled to support a |
---|
| 191 | variety of PC configurations including PC-104 |
---|
| 192 | based solutions. |
---|
[08c6c10] | 193 | |
---|
[1a63b528] | 194 | m68k : gen68360 gen68360_040 mvme136 mvme147s mvme162 mvme162lx |
---|
| 195 | mvme167 ods68302 sim68000 mcf5206elite uC5282 |
---|
| 196 | gen68302 csb360 simcpu32 mrm332 av5282 gen68340 mcf5235 idp |
---|
[08c6c10] | 197 | |
---|
| 198 | no_cpu : no_bsp (porting example) |
---|
| 199 | |
---|
[1a63b528] | 200 | mips : csb350 genmongoosev hurricane jmr3904 rbtx4925 rbtx4938 |
---|
[08c6c10] | 201 | |
---|
[1a63b528] | 202 | powerpc : psim score603e mcp750 mvme2100 mvme2307 mpc8260ads ss555 |
---|
| 203 | mvme5500 ep1a pm520_cr825 pm520_ze30 gen405 helas403 |
---|
[4f35ea9b] | 204 | mbx821_001 mbx821_002 mbx821_002b mbx860_001b |
---|
[18481be3] | 205 | mbx860_002 mbx860_005b mtx603e brs5l gen5200 ep5200 |
---|
[08c6c10] | 206 | |
---|
| 207 | NOTE: The "motorola_powerpc" BSP is a single BSP which |
---|
| 208 | can be conditionally compiled to support most Motorola |
---|
| 209 | VMEbus, CompactPCI, and MTX boards.) |
---|
| 210 | |
---|
[18481be3] | 211 | NOTE: The ep5200 is a clone of the 5200Lite a.k.a. IceCube. |
---|
| 212 | |
---|
[1a63b528] | 213 | sh : gensh1 gensh2 gensh4 shsim simsh4 simsh7045 |
---|
[08c6c10] | 214 | |
---|
[1a63b528] | 215 | sparc : erc32 sis leon2 leon3 |
---|
[08c6c10] | 216 | |
---|
[cf65c408] | 217 | any : bare |
---|
[254b4450] | 218 | |
---|
[5e8552a4] | 219 | The following ports were considered obsoleted after the 4.6 releases |
---|
[17228d13] | 220 | and were removed: a29k, hppa, i960, mips64orion, and or32. |
---|
[08c6c10] | 221 | |
---|
| 222 | |
---|
[254b4450] | 223 | 5. Makefile structure |
---|
| 224 | ===================== |
---|
| 225 | |
---|
[f9e72d3] | 226 | The makefiles have been re-organized. Most gnu-based bsps now use three |
---|
[254b4450] | 227 | main makefiles: |
---|
| 228 | + custom/default.cfg, |
---|
| 229 | + custom/bsp.cfg and |
---|
[f9e72d3] | 230 | + compilers/gcc-target-default.cfg. |
---|
[254b4450] | 231 | |
---|
[f9e72d3] | 232 | Default.cfg sets the default values of certain common build options. |
---|
[254b4450] | 233 | |
---|
| 234 | Bsp.cfg set bsp-specific build options and can also override the |
---|
| 235 | default settings. |
---|
| 236 | |
---|
[08c6c10] | 237 | Gcc-target-default.cfg contains the common gcc definitions. |
---|
[254b4450] | 238 | |
---|
| 239 | 6. Adding a bsp |
---|
| 240 | =============== |
---|
| 241 | |
---|
[08c6c10] | 242 | Please refer to the BSP and Device Driver Guide. |
---|
[6f6cde6f] | 243 | |
---|
[254b4450] | 244 | |
---|
| 245 | 7. Tested configurations |
---|
| 246 | ======================== |
---|
| 247 | |
---|
| 248 | All gnu-based bsps have been built on Linux. |
---|
[08c6c10] | 249 | |
---|
[f05f704] | 250 | The native (posix) ports have been built and run only on Linux. |
---|
[254b4450] | 251 | |
---|
| 252 | The following configurations have NOT been tested: |
---|
| 253 | |
---|
| 254 | + Anything on Nextstep, HPUX and Irix. |
---|
[08c6c10] | 255 | + The C4x and OR32 ports (requires specially patched toolchain) |
---|
[254b4450] | 256 | |
---|
[08c6c10] | 257 | 8. Prerequisites |
---|
| 258 | ================ |
---|
[254b4450] | 259 | |
---|
| 260 | Gawk version 2 or higher. |
---|
| 261 | GNU make version 3.72 or higher. |
---|
| 262 | Bash. |
---|
[6f6cde6f] | 263 | gcc version > 2.8 |
---|
[254b4450] | 264 | |
---|
[08c6c10] | 265 | NOTE: These prerequisites are probably out of date but autoconf should detect |
---|
| 266 | any problems. |
---|