[254b4450] | 1 | |
---|
| 2 | 1. Autoconf support |
---|
| 3 | =================== |
---|
| 4 | |
---|
| 5 | This version of RTEMS is configured with GNU autoconf. RTEMS can be |
---|
| 6 | configured and built either standalone or together with the compiler |
---|
| 7 | tools in the Cygnus one-tree structure. Using autoconf also means |
---|
| 8 | that RTEMS now can be built in a separate build directory. |
---|
| 9 | |
---|
| 10 | 2. Installation |
---|
| 11 | =============== |
---|
| 12 | |
---|
| 13 | 2.1 Standalone build |
---|
| 14 | |
---|
| 15 | To configure RTEMS for a specific target, run configure in the build |
---|
| 16 | directory. In addition to the standard configure options, the following |
---|
| 17 | RTEMS-specific option are supported: |
---|
| 18 | |
---|
| 19 | --disable-rtems-inlines |
---|
| 20 | --disable-posix |
---|
| 21 | --disable-tests |
---|
[1f0f3e35] | 22 | --disable-ka9q |
---|
[91333c2] | 23 | --enable-cpp |
---|
[58ae19a] | 24 | --enable-gcc28 |
---|
[978a9ba0] | 25 | --enable-gmake-print-directory |
---|
[58ae19a] | 26 | --enable-libcdir=<DIRECTORY> |
---|
[254b4450] | 27 | --enable-rtemsbsp="bsp1 bsp2 ..." |
---|
| 28 | |
---|
| 29 | By default, the RTEMS posix interface is built for targets that support |
---|
[83e39b26] | 30 | it. It can be disabled with the --disable-posix option. |
---|
| 31 | |
---|
[1f0f3e35] | 32 | By default, the RTEMS port of the KA9Q TCP/IP stack is build for targets |
---|
| 33 | that support it. It can be disabled with the --disable-ka9q option. |
---|
| 34 | |
---|
[91333c2] | 35 | By default, the RTEMS support of C++ is disabled. It can be enabled |
---|
| 36 | with the --enable-cpp option. If the rtems++ C++ library is installed |
---|
| 37 | it will also be build. |
---|
| 38 | |
---|
[83e39b26] | 39 | By default, the RTEMS test suites are configured. The --disable-tests |
---|
[254b4450] | 40 | will not configure the RTEMS test suite. This is used only to speed-up |
---|
[83e39b26] | 41 | configuration in case building the tests are not necessary. |
---|
| 42 | |
---|
[58ae19a] | 43 | By default, RTEMS is built using arguments and build rules which are |
---|
| 44 | compatible with gcc 2.7.2.2. This requires that the user specify |
---|
| 45 | the location of the Standard C Library with the --enable-libcdir |
---|
| 46 | option. If using a gcc which supports the -specs option, then |
---|
| 47 | the --enable-gcc28 option may be used to enable this feature. |
---|
| 48 | |
---|
[83e39b26] | 49 | By default, all bsps for a target are built. There are two ways of |
---|
| 50 | changing this: |
---|
[254b4450] | 51 | |
---|
| 52 | + use the --enable-rtemsbsp otion which will set the specified |
---|
| 53 | bsps as the default bsps, or |
---|
| 54 | + set the RTEMSBSP variable during make (see below). |
---|
| 55 | |
---|
[58ae19a] | 56 | The --enable-rtemsbsp= option configures RTEMS for a specific target |
---|
| 57 | architecture. The following targets are supported: |
---|
[254b4450] | 58 | |
---|
| 59 | (none) will build the host-based version on Linux, |
---|
| 60 | Solaris and HPUX. |
---|
| 61 | |
---|
| 62 | a29k-rtems only standalone, uses non-gnu compiler |
---|
| 63 | i386-rtems |
---|
[83e39b26] | 64 | i386-go32-rtems see notes |
---|
[254b4450] | 65 | i960-rtems |
---|
| 66 | hppa1_1-rtems |
---|
| 67 | m68k-rtems |
---|
| 68 | mips64orion-rtems |
---|
| 69 | no_cpu-rtems |
---|
| 70 | powerpc-rtems |
---|
| 71 | sparc-rtems |
---|
| 72 | |
---|
[58ae19a] | 73 | The cross-compiler is set to $(target)-gcc by default. This can be |
---|
| 74 | overriden by one of the following methods: |
---|
| 75 | |
---|
| 76 | + running make with CC_FOR_TARGET=compiler_to_use. The same applies to |
---|
| 77 | all the target specific tools (AS, AR, NM, OBJCOPY, SIZE, LD), or |
---|
| 78 | + by using the --program-prefix option to configure to specify the |
---|
| 79 | string which will prepended to the tool names. Be sure to include |
---|
| 80 | a trailing "-". For example, to use a m68k-coff toolset, use the |
---|
| 81 | --program-prefix=m68k-coff- option. |
---|
| 82 | |
---|
[254b4450] | 83 | To build, run make in the build directory. To specify which bsps to build, |
---|
| 84 | add the RTEMSBSP="bsp1 bsp2 .." to the make command. |
---|
| 85 | |
---|
| 86 | Installation is done under $(prefix)/$(target)/rtems. |
---|
| 87 | |
---|
| 88 | As an example, to build and install the mvme136 and dmv152 bsps for m68k do: |
---|
| 89 | |
---|
| 90 | (path_to_rtems_src)/configure --target=m68k-rtems |
---|
| 91 | |
---|
| 92 | make RTEMSBSP="mvme136 dmv152" |
---|
| 93 | |
---|
| 94 | make install RTEMSBSP="mvme136 dmv152" |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | The sample tests are built by 'make all', do a 'make test' to build the full |
---|
| 98 | test suite. |
---|
| 99 | |
---|
| 100 | 2.2 Build with Cygnus one-tree release |
---|
| 101 | |
---|
| 102 | To build and install RTEMS with the one-tree structure, just copy the rtems |
---|
| 103 | directory to the tree. The one-tree configure.in and Makefile.in has to be |
---|
| 104 | replaced with the RTEMS-aware versions. The build options are the same as |
---|
| 105 | for the standalone build. |
---|
| 106 | |
---|
[83e39b26] | 107 | 2.3 Target Dependent Notes |
---|
| 108 | |
---|
| 109 | i386-go32-rtems: |
---|
| 110 | |
---|
| 111 | 1. This is based on djgpp v1.xx. It needs to be updated to v2.xx. |
---|
| 112 | 2. This cannot be built one-tree style since RTEMS requires some |
---|
| 113 | files which must be obtained from the binary distribution of the |
---|
| 114 | djgpp library. DJGPP can be obtained from |
---|
| 115 | http://www.delorie.com/djgpp/dl/ofc. |
---|
| 116 | 3. You will need to manually install a number of files from the |
---|
| 117 | binary distribution of the DJGPP library doing something |
---|
| 118 | like the following: |
---|
| 119 | |
---|
| 120 | # unzip the djgpp distribution |
---|
| 121 | cd include |
---|
| 122 | cp dpmi.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include |
---|
| 123 | cp go32.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include |
---|
| 124 | cp dos.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include |
---|
| 125 | cp pc.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include |
---|
| 126 | |
---|
| 127 | cd ../lib |
---|
| 128 | cp crt* INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2 |
---|
| 129 | cp libpc* INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2 |
---|
| 130 | |
---|
| 131 | # Make sure about destination on the next lines. It keeps the newlib |
---|
| 132 | # libc.a and the binary djgpp libc.a from conflicting. |
---|
| 133 | cp libc.a INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/libcgo32.a |
---|
| 134 | cp libc_p.a INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/libcgo32_p.a |
---|
| 135 | |
---|
| 136 | |
---|
[254b4450] | 137 | 3. To use the installed RTEMS library |
---|
| 138 | ===================================== |
---|
| 139 | |
---|
| 140 | To use the installed RTEMS bsps to build applications, the application |
---|
| 141 | makefile has to include a bsp-specific makefile that will define the |
---|
| 142 | RTEMS variables necessary to find include files and libraries. The |
---|
| 143 | bsp-specific makefile is installed at |
---|
| 144 | |
---|
[f05f704] | 145 | $(RTEMS_MAKEFILE_PATH)/Makefile.inc |
---|
[254b4450] | 146 | |
---|
[f05f704] | 147 | For the erc32 bsp installed at /usr/local/cross, the environment |
---|
| 148 | variable RTEMS_MAKEFILE_PATH would be set as follows to the |
---|
| 149 | following: |
---|
[254b4450] | 150 | |
---|
[f05f704] | 151 | /usr/local/cross/sparc-rtems/rtems/erc32/Makefile.inc |
---|
[254b4450] | 152 | |
---|
| 153 | 4. Supported target bsps |
---|
| 154 | ======================== |
---|
| 155 | |
---|
| 156 | The following bsps are supported: |
---|
| 157 | |
---|
| 158 | host-based : posix (on linux, solaris and hpux) |
---|
| 159 | |
---|
| 160 | a29k : portsw |
---|
| 161 | i386 : force386 i386ex |
---|
[83e39b26] | 162 | i386-go32 : go32 go32_p5 |
---|
[254b4450] | 163 | i960 : cvme961 |
---|
| 164 | hppa1_1 : simhppa |
---|
[83e39b26] | 165 | m68k : dmv152 efi332 efi68k gen68302 gen68360 gen68360_040 idp |
---|
[978a9ba0] | 166 | mvme136 mvme147 mvme147s mvme162 ods68302 |
---|
[254b4450] | 167 | no_cpu : no_bsp |
---|
| 168 | mips64orion : p4600 p4650 (p4000 port with either R4600 or R4650) |
---|
| 169 | powerpc : papyrus |
---|
| 170 | sparc : erc32 |
---|
| 171 | |
---|
| 172 | 5. Makefile structure |
---|
| 173 | ===================== |
---|
| 174 | |
---|
| 175 | The makefiles have been re-organised. Most gnu-based bsps now use three |
---|
| 176 | main makefiles: |
---|
| 177 | + custom/default.cfg, |
---|
| 178 | + custom/bsp.cfg and |
---|
| 179 | + ompilers/gcc-target-default.cfg. |
---|
| 180 | |
---|
| 181 | Default.cfg sets the deafult values of certain common build options. |
---|
| 182 | |
---|
| 183 | Bsp.cfg set bsp-specific build options and can also override the |
---|
| 184 | default settings. |
---|
| 185 | |
---|
| 186 | Gcc-target-default.cfg contains the common gcc definitions. Some targets |
---|
| 187 | (a29k, no_cpu, and posix) still use the old structure. |
---|
| 188 | |
---|
| 189 | 6. Adding a bsp |
---|
| 190 | =============== |
---|
| 191 | |
---|
| 192 | The top-level configure.in has to be modified if a new target is added |
---|
| 193 | or if a new bsp is to be built by default. The additions required is |
---|
| 194 | basically to add which makefiles are to be created by configure and |
---|
| 195 | to add the target to the selection statement. To re-generate |
---|
| 196 | configure, autoconf-2.12 is needed. |
---|
| 197 | |
---|
| 198 | 7. Tested configurations |
---|
| 199 | ======================== |
---|
| 200 | |
---|
| 201 | All gnu-based bsps have been built on Linux. |
---|
[f05f704] | 202 | The native (posix) ports have been built and run only on Linux. |
---|
[254b4450] | 203 | |
---|
| 204 | The following configurations have NOT been tested: |
---|
| 205 | |
---|
| 206 | + Anything on Nextstep, HPUX and Irix. |
---|
| 207 | + The a29k port. |
---|
| 208 | |
---|
| 209 | 8. Pre-requisites |
---|
| 210 | ================= |
---|
| 211 | |
---|
| 212 | Gawk version 2 or higher. |
---|
| 213 | GNU make version 3.72 or higher. |
---|
| 214 | Bash. |
---|
| 215 | gcc version ??? |
---|
| 216 | |
---|
| 217 | TODO |
---|
| 218 | ==== |
---|
| 219 | |
---|
| 220 | The install-if-change script requires bash. On solaris systems, this should |
---|
| 221 | be changed to ksh, since ksh is provided with solaris (bash not). |
---|
| 222 | |
---|
| 223 | A fairly rescent version of gawk is needed to build RTEMS. This should be |
---|
[58ae19a] | 224 | changed so that a plain vanilla awk also works. [NOTE: This dependency |
---|
| 225 | should disappear when the "gcc 2.8 -specs" is finished.] |
---|
[254b4450] | 226 | |
---|
| 227 | 'make install' should only install necessary files, not the full |
---|
| 228 | PROJECT_RELEASE directory as now. |
---|
| 229 | |
---|
| 230 | Posix port on solaris-2.5 fails due to undefined built-in functions |
---|
| 231 | (gcc-2.7.2, might be my installation). |
---|
| 232 | |
---|
| 233 | Improve support for 'make CFLAGS=xxx'. |
---|
| 234 | |
---|