diff options
Diffstat (limited to 'documentation/adt-manual')
-rw-r--r-- | documentation/adt-manual/adt-command.xml | 38 | ||||
-rw-r--r-- | documentation/adt-manual/adt-package.xml | 2 | ||||
-rw-r--r-- | documentation/adt-manual/adt-prepare.xml | 8 |
3 files changed, 30 insertions, 18 deletions
diff --git a/documentation/adt-manual/adt-command.xml b/documentation/adt-manual/adt-command.xml index 164b1efbff..0faa05fa6c 100644 --- a/documentation/adt-manual/adt-command.xml +++ b/documentation/adt-manual/adt-command.xml | |||
@@ -24,6 +24,10 @@ | |||
24 | are also defined so that, for example, <filename>configure.sh</filename> | 24 | are also defined so that, for example, <filename>configure.sh</filename> |
25 | can find pre-generated test results for tests that need target hardware | 25 | can find pre-generated test results for tests that need target hardware |
26 | on which to run. | 26 | on which to run. |
27 | You can see the | ||
28 | "<link linkend='setting-up-the-cross-development-environment'>Setting Up the Cross-Development Environment</link>" | ||
29 | section for the list of cross-toolchain environment variables | ||
30 | established by the script. | ||
27 | </para> | 31 | </para> |
28 | 32 | ||
29 | <para> | 33 | <para> |
@@ -99,7 +103,7 @@ | |||
99 | "poky-linux". | 103 | "poky-linux". |
100 | Here is an example that sources a script from the | 104 | Here is an example that sources a script from the |
101 | default ADT installation directory that uses the | 105 | default ADT installation directory that uses the |
102 | 32-bit Intel x86 Architecture and using the | 106 | 32-bit Intel x86 Architecture and the |
103 | &DISTRO_NAME; Yocto Project release: | 107 | &DISTRO_NAME; Yocto Project release: |
104 | <literallayout class='monospaced'> | 108 | <literallayout class='monospaced'> |
105 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux | 109 | $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux |
@@ -128,7 +132,11 @@ | |||
128 | $ automake -a | 132 | $ automake -a |
129 | </literallayout></para></listitem> | 133 | </literallayout></para></listitem> |
130 | <listitem><para><emphasis>Cross-compile the project:</emphasis> | 134 | <listitem><para><emphasis>Cross-compile the project:</emphasis> |
131 | This command compiles the project using the cross-compiler: | 135 | This command compiles the project using the cross-compiler. |
136 | The | ||
137 | <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS'><filename>CONFIGURE_FLAGS</filename></ulink> | ||
138 | environment variable provides the minimal arguments for | ||
139 | GNU configure: | ||
132 | <literallayout class='monospaced'> | 140 | <literallayout class='monospaced'> |
133 | $ ./configure ${CONFIGURE_FLAGS} | 141 | $ ./configure ${CONFIGURE_FLAGS} |
134 | </literallayout></para></listitem> | 142 | </literallayout></para></listitem> |
@@ -174,16 +182,12 @@ | |||
174 | is <filename>armv5te-poky-linux-gnueabi</filename>. | 182 | is <filename>armv5te-poky-linux-gnueabi</filename>. |
175 | You will notice that the name of the script is | 183 | You will notice that the name of the script is |
176 | <filename>environment-setup-armv5te-poky-linux-gnueabi</filename>. | 184 | <filename>environment-setup-armv5te-poky-linux-gnueabi</filename>. |
177 | Thus, the following command works: | 185 | Thus, the following command works to update your project and |
186 | rebuild it using the appropriate cross-toolchain tools: | ||
178 | <literallayout class='monospaced'> | 187 | <literallayout class='monospaced'> |
179 | $ ./configure --host=armv5te-poky-linux-gnueabi \ | 188 | $ ./configure --host=armv5te-poky-linux-gnueabi \ |
180 | --with-libtool-sysroot=<replaceable>sysroot-dir</replaceable> | 189 | --with-libtool-sysroot=<replaceable>sysroot-dir</replaceable> |
181 | </literallayout> | 190 | </literallayout> |
182 | </para> | ||
183 | |||
184 | <para> | ||
185 | This single command updates your project and rebuilds it using the appropriate | ||
186 | cross-toolchain tools. | ||
187 | <note> | 191 | <note> |
188 | If the <filename>configure</filename> script results in problems recognizing the | 192 | If the <filename>configure</filename> script results in problems recognizing the |
189 | <filename>--with-libtool-sysroot=</filename><replaceable>sysroot-dir</replaceable> option, | 193 | <filename>--with-libtool-sysroot=</filename><replaceable>sysroot-dir</replaceable> option, |
@@ -206,14 +210,18 @@ | |||
206 | <title>Makefile-Based Projects</title> | 210 | <title>Makefile-Based Projects</title> |
207 | 211 | ||
208 | <para> | 212 | <para> |
209 | For a Makefile-based project, you use the cross-toolchain by making sure | 213 | For Makefile-based projects, you make sure your |
210 | the tools are used. | 214 | <filename>Makefile</filename> has statements that ensure proper |
211 | You can do this as follows: | 215 | use of the cross-toolchain. |
216 | For example, the following statements inside a | ||
217 | <filename>Makefile</filename> ensure the C compiler, linker, flags | ||
218 | passed to the C compiler, and flags passed to the C++ compiler are | ||
219 | specifically defined for the build: | ||
212 | <literallayout class='monospaced'> | 220 | <literallayout class='monospaced'> |
213 | CC=arm-poky-linux-gnueabi-gcc | 221 | <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'>CC</ulink>=arm-poky-linux-gnueabi-gcc |
214 | LD=arm-poky-linux-gnueabi-ld | 222 | <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'>LD</ulink>=arm-poky-linux-gnueabi-ld |
215 | CFLAGS=”${CFLAGS} --sysroot=<sysroot-dir>” | 223 | <ulink url='&YOCTO_DOCS_REF_URL;#var-CFLAGS'>CFLAGS</ulink>=”${CFLAGS} --sysroot=<sysroot-dir>” |
216 | CXXFLAGS=”${CXXFLAGS} --sysroot=<sysroot-dir>” | 224 | <ulink url='&YOCTO_DOCS_REF_URL;#var-CXXFLAGS'>CXXFLAGS</ulink>=”${CXXFLAGS} --sysroot=<sysroot-dir>” |
217 | </literallayout> | 225 | </literallayout> |
218 | </para> | 226 | </para> |
219 | </section> | 227 | </section> |
diff --git a/documentation/adt-manual/adt-package.xml b/documentation/adt-manual/adt-package.xml index ea82f6d7da..f3ffa06e4e 100644 --- a/documentation/adt-manual/adt-package.xml +++ b/documentation/adt-manual/adt-package.xml | |||
@@ -78,7 +78,7 @@ | |||
78 | </para> | 78 | </para> |
79 | 79 | ||
80 | <para> | 80 | <para> |
81 | Next, source the environment setup script found in the | 81 | Next, source the cross-toolchain environment setup script found in the |
82 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. | 82 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>. |
83 | Follow that by setting up the installation destination to point to your | 83 | Follow that by setting up the installation destination to point to your |
84 | sysroot as <replaceable>sysroot_dir</replaceable>. | 84 | sysroot as <replaceable>sysroot_dir</replaceable>. |
diff --git a/documentation/adt-manual/adt-prepare.xml b/documentation/adt-manual/adt-prepare.xml index 995d589219..e75e9c95cd 100644 --- a/documentation/adt-manual/adt-prepare.xml +++ b/documentation/adt-manual/adt-prepare.xml | |||
@@ -580,7 +580,8 @@ | |||
580 | 580 | ||
581 | <para> | 581 | <para> |
582 | To extract the root filesystem, first <filename>source</filename> | 582 | To extract the root filesystem, first <filename>source</filename> |
583 | the cross-development environment setup script. | 583 | the cross-development environment setup script to establish |
584 | necessary environment variables. | ||
584 | If you built the toolchain in the Build Directory, you will find | 585 | If you built the toolchain in the Build Directory, you will find |
585 | the toolchain environment script in the | 586 | the toolchain environment script in the |
586 | <filename>tmp</filename> directory. | 587 | <filename>tmp</filename> directory. |
@@ -657,7 +658,10 @@ | |||
657 | hardware can be passed to <filename>gcc</filename> as a set of | 658 | hardware can be passed to <filename>gcc</filename> as a set of |
658 | compiler options. | 659 | compiler options. |
659 | Those options are set up by the environment script and | 660 | Those options are set up by the environment script and |
660 | contained in variables like CC and LD. | 661 | contained in variables such as |
662 | <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink> | ||
663 | and | ||
664 | <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'><filename>LD</filename></ulink>. | ||
661 | This reduces the space needed for the tools. | 665 | This reduces the space needed for the tools. |
662 | Understand, however, that a sysroot is still needed for every | 666 | Understand, however, that a sysroot is still needed for every |
663 | target since those binaries are target-specific. | 667 | target since those binaries are target-specific. |