[48ad47cc] | 1 | Building RTEMS Canadian Cross |
---|
| 2 | ============================= |
---|
| 3 | |
---|
| 4 | RTEMS now contains experimental and yet incomplete support for building |
---|
| 5 | it Canadian Cross. |
---|
| 6 | |
---|
| 7 | 1. Introduction |
---|
| 8 | --------------- |
---|
| 9 | If you don't know what Canadian Cross Building means, you probably don't want |
---|
| 10 | to apply it and should consider stop reading here. |
---|
| 11 | |
---|
| 12 | Interested readers might want to read Ian Lance Taylor's article at |
---|
| 13 | http://www.airs.com/ian/configure for underlaying details and working |
---|
| 14 | principles. |
---|
| 15 | |
---|
[83518713] | 16 | |
---|
[48ad47cc] | 17 | 2. RTEMS |
---|
| 18 | -------- |
---|
| 19 | Example: Building RTEMS for sparc-rtems under i386-pc-linux-gnu to be hosted |
---|
| 20 | on a i386-cygwin platform. |
---|
| 21 | |
---|
| 22 | 2.1 Required tools |
---|
| 23 | ------------------ |
---|
| 24 | * A i386-pc-linux-gnu cross sparc-rtems toolchain. |
---|
| 25 | * A i386-pc-linux-gnu cross i386-cygwin toolchain. |
---|
| 26 | * A i386-pc-linux-gnu native toolchain. |
---|
| 27 | |
---|
| 28 | We further on assume these to be installed to these locations: |
---|
| 29 | /opt/rtems .. linux cross sparc-rtems toolchain |
---|
[83518713] | 30 | /opt/cygwin .. linux cross i386-cygwin cross-toolchain |
---|
[48ad47cc] | 31 | /usr .. linux native toolchain and further tools. |
---|
| 32 | |
---|
| 33 | 2.2 Building sparc-rtems |
---|
| 34 | ------------------------ |
---|
| 35 | The first step is to build RTEMS for sparc-rtems under linux. |
---|
| 36 | |
---|
| 37 | mkdir build |
---|
| 38 | cd build |
---|
| 39 | <path>/rtems/configure [options] \ |
---|
| 40 | --target=sparc-rtems \ |
---|
[83518713] | 41 | --prefix=/opt/cygwin/rtems/sparc-rtems |
---|
[48ad47cc] | 42 | make |
---|
| 43 | make install |
---|
| 44 | |
---|
[83518713] | 45 | This will build a standard sparc-rtems RTEMS and install it to the given |
---|
| 46 | PREFIX. |
---|
[48ad47cc] | 47 | |
---|
| 48 | 2.3 Building i386-cygwin host support |
---|
| 49 | ------------------------------------- |
---|
| 50 | The next step is to build RTEMS host support for i386-cygwin. |
---|
| 51 | This basically means to cross-build the host tools contained in RTEMS. |
---|
| 52 | |
---|
| 53 | mkdir host |
---|
| 54 | cd host |
---|
| 55 | <path>/rtems/configure [options] \ |
---|
| 56 | --target=sparc-rtems \ |
---|
| 57 | --build=`<path>/rtems/config.guess` \ |
---|
| 58 | --host=i386-cygwin \ |
---|
[83518713] | 59 | --prefix=/opt/cygwin/rtems |
---|
| 60 | make |
---|
| 61 | make install |
---|
| 62 | |
---|
| 63 | This will build RTEMS host-tools for i386-cygwin and install it to the given |
---|
| 64 | PREFIX. |
---|
| 65 | |
---|
[48ad47cc] | 66 | |
---|
| 67 | 3. Known issues |
---|
| 68 | --------------- |
---|
| 69 | |
---|
| 70 | * At present time, building RTEMS Canadian Cross is known to be immature, and |
---|
| 71 | to require additional work. Do not expect this to work. |
---|
| 72 | |
---|
| 73 | * The configure scripts expect to find a native c-compiler called "cc". If |
---|
| 74 | your host doesn't have such a "cc" (e.g. Cygwin) or has a non-functional |
---|
[83518713] | 75 | "cc" (eg. Solaris) try introducing a symlink <functional-cc> -> cc |
---|
| 76 | (E.g.: ln -s <path-to>/gcc /opt/rtems/bin/cc) and make sure this cc can be |
---|
[48ad47cc] | 77 | found on $PATH. |
---|
| 78 | |
---|
[83518713] | 79 | * It will *not* work for all BSPs requiring BSP-specific host-tools |
---|
[48ad47cc] | 80 | (Unfortunately, this comprizes i386-rtems/pcx86 and all powerpc BSPs). |
---|
| 81 | |
---|
| 82 | * Incomplete support for *_FOR_TARGET, *_FOR_HOST, *_FOR_BUILD environment |
---|
| 83 | variables. |
---|
| 84 | |
---|
| 85 | * The <toplevel>/make/ directory hierarchy is not treated correctly. |
---|