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