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 | |
---|
16 | 2. RTEMS |
---|
17 | -------- |
---|
18 | Example: Building RTEMS for sparc-rtems under i386-pc-linux-gnu to be hosted |
---|
19 | on a i386-cygwin platform. |
---|
20 | |
---|
21 | 2.1 Required tools |
---|
22 | ------------------ |
---|
23 | * A i386-pc-linux-gnu cross sparc-rtems toolchain. |
---|
24 | * A i386-pc-linux-gnu cross i386-cygwin toolchain. |
---|
25 | * A i386-pc-linux-gnu native toolchain. |
---|
26 | |
---|
27 | We further on assume these to be installed to these locations: |
---|
28 | /opt/rtems .. linux cross sparc-rtems toolchain |
---|
29 | /opt/i386-cygwin .. linux cross i386-cygwin cross toolchain |
---|
30 | /usr .. linux native toolchain and further tools. |
---|
31 | |
---|
32 | 2.2 Building sparc-rtems |
---|
33 | ------------------------ |
---|
34 | The first step is to build RTEMS for sparc-rtems under linux. |
---|
35 | |
---|
36 | mkdir build |
---|
37 | cd build |
---|
38 | <path>/rtems/configure [options] \ |
---|
39 | --target=sparc-rtems \ |
---|
40 | --prefix=/opt/i386-cygwin/rtems/sparc-rtems |
---|
41 | make |
---|
42 | make install |
---|
43 | |
---|
44 | This will build a standard sparc-rtems RTEMS to the given PREFIX. |
---|
45 | |
---|
46 | |
---|
47 | 2.3 Building i386-cygwin host support |
---|
48 | ------------------------------------- |
---|
49 | The next step is to build RTEMS host support for i386-cygwin. |
---|
50 | This basically means to cross-build the host tools contained in RTEMS. |
---|
51 | |
---|
52 | mkdir host |
---|
53 | cd host |
---|
54 | <path>/rtems/configure [options] \ |
---|
55 | --target=sparc-rtems \ |
---|
56 | --build=`<path>/rtems/config.guess` \ |
---|
57 | --host=i386-cygwin \ |
---|
58 | --prefix=/opt/i386-cygwin/rtems |
---|
59 | |
---|
60 | 3. Known issues |
---|
61 | --------------- |
---|
62 | |
---|
63 | * At present time, building RTEMS Canadian Cross is known to be immature, and |
---|
64 | to require additional work. Do not expect this to work. |
---|
65 | |
---|
66 | * The configure scripts expect to find a native c-compiler called "cc". If |
---|
67 | your host doesn't have such a "cc" (e.g. Cygwin) or has a non-functional |
---|
68 | "cc" (eg. Solaris) try introducing a symlink <functional-cc> -> cc. |
---|
69 | (Eg. ln -s <path-to>/gcc /opt/rtems/bin/cc) and make sure this cc can be |
---|
70 | found on $PATH. |
---|
71 | |
---|
72 | * It will *not* work for all targets requiring BSP-specific host-tools |
---|
73 | (Unfortunately, this comprizes i386-rtems/pcx86 and all powerpc BSPs). |
---|
74 | |
---|
75 | * Incomplete support for *_FOR_TARGET, *_FOR_HOST, *_FOR_BUILD environment |
---|
76 | variables. |
---|
77 | |
---|
78 | * The <toplevel>/make/ directory hierarchy is not treated correctly. |
---|