[ad36f39] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[bd48e48] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[ad36f39] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-cross-tools-variables">
|
---|
| 9 | <?dbhtml filename="variables.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Build Variables</title>
|
---|
| 12 |
|
---|
| 13 | <bridgehead renderas="sect4">Setting Host and Target</bridgehead>
|
---|
| 14 |
|
---|
[b220338] | 15 | <para os="a">During the building of the cross-compile tools, you will need to
|
---|
[7926af1] | 16 | set a few variables that will be dependent on your particular needs.
|
---|
[b220338] | 17 | You will need to select the target triplet for the target architecture, the CPU
|
---|
| 18 | endianess, the CPU architecture, the CPU mode, the CPU floating point hardware
|
---|
| 19 | availability, and (if available) the type of floating point hardware. If you
|
---|
| 20 | do not know what values can be chosen for each of these, you can use the
|
---|
| 21 | tables at the bottom of this page as a reference.</para>
|
---|
| 22 |
|
---|
| 23 | <para os="a1">First, set the host and target triplets:</para>
|
---|
[ad36f39] | 24 |
|
---|
| 25 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 26 | href="../common/variables.xml"
|
---|
[5b4806a] | 27 | xpointer="xpointer(//*[@os='b'])"/>
|
---|
[ad36f39] | 28 |
|
---|
| 29 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 30 | href="../common/variables.xml"
|
---|
[5b4806a] | 31 | xpointer="xpointer(//*[@os='c'])"/>
|
---|
[ad36f39] | 32 |
|
---|
[a9bbc46] | 33 | <screen os="d"><userinput>export CLFS_ARCH=arm
|
---|
[29ca400] | 34 | export CLFS_ENDIAN="<replaceable>[endianess]</replaceable>"</userinput></screen>
|
---|
[6533111] | 35 |
|
---|
[b220338] | 36 | <para os="e">Choose the ARM architecture (see table below) and mode of
|
---|
| 37 | your CPU:</para>
|
---|
| 38 |
|
---|
| 39 | <screen os="f"><userinput>export CLFS_ARM_ARCH="<replaceable>[architecture]</replaceable>"
|
---|
| 40 | export CLFS_ARM_MODE="<replaceable>[arm or thumb]</replaceable>"</userinput></screen>
|
---|
| 41 |
|
---|
| 42 | <para os="f1">If your target CPU has hard floating point support (not all ARM
|
---|
| 43 | CPUs do), set the following CLFS_FLOAT variable to either "hard" or "softfp".
|
---|
| 44 | If your target CPU does not have hard floating point support, set the following
|
---|
| 45 | CLFS_FLOAT vairable to "soft".</para>
|
---|
| 46 |
|
---|
| 47 | <screen os="f2"><userinput>export CLFS_FLOAT="<replaceable>[hard, softfp, or soft]"</replaceable></userinput></screen>
|
---|
| 48 |
|
---|
| 49 | <para os="f3">If you chose either "hard" or "softfp" for CLFS_FLOAT, you now
|
---|
| 50 | need to set which floating point hardware is actually included (see table below)
|
---|
| 51 | with your ARM CPU:</para>
|
---|
| 52 |
|
---|
| 53 | <screen os="f4"><userinput>export CLFS_FPU="<replaceable>[fpu version]</replaceable>"</userinput></screen>
|
---|
| 54 |
|
---|
[5b4806a] | 55 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 56 | href="../common/variables.xml"
|
---|
[0dad5b9] | 57 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
[6533111] | 58 |
|
---|
[b220338] | 59 | <screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" >> ~/.bashrc
|
---|
| 60 | echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc
|
---|
| 61 | echo export CLFS_ARCH=\""${CLFS_ARCH}\"" >> ~/.bashrc
|
---|
| 62 | echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" >> ~/.bashrc
|
---|
| 63 | echo export CLFS_ARM_ARCH=\""${CLFS_ARM_ARCH}\"" >> ~/.bashrc
|
---|
| 64 | echo export CLFS_ARM_MODE=\""${CLFS_ARM_MODE}\"" >> ~/.bashrc
|
---|
| 65 | echo export CLFS_FLOAT=\""${CLFS_FLOAT}\"" >> ~/.bashrc
|
---|
| 66 | echo export CLFS_FPU=\""${CLFS_FPU}\"" >> ~/.bashrc</userinput></screen>
|
---|
[ad36f39] | 67 |
|
---|
[0dad5b9] | 68 | <table os="i">
|
---|
[b220338] | 69 | <title>Example Processor Type, ABI, and Target Triplets</title>
|
---|
[d44503cc] | 70 | <?dbfo table-width="7in" ?>
|
---|
[3ca2208] | 71 |
|
---|
| 72 | <tgroup cols="2">
|
---|
| 73 |
|
---|
| 74 | <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
|
---|
[29ca400] | 75 | <colspec colnum="2" colwidth="1in" colname="Endianess"/>
|
---|
[d44503cc] | 76 | <colspec colnum="3" colwidth="1in" colname="ABI"/>
|
---|
| 77 | <colspec colnum="4" colwidth="2.5in" colname="Triplet"/>
|
---|
[3ca2208] | 78 |
|
---|
[ad36f39] | 79 | <thead>
|
---|
| 80 | <row>
|
---|
| 81 | <entry>Processor</entry>
|
---|
[29ca400] | 82 | <entry>Endianess</entry>
|
---|
[d44503cc] | 83 | <entry>ABI</entry>
|
---|
[ad36f39] | 84 | <entry>Target Triplet</entry>
|
---|
| 85 | </row>
|
---|
| 86 | </thead>
|
---|
[3ca2208] | 87 |
|
---|
[ad36f39] | 88 | <tbody>
|
---|
| 89 | <row>
|
---|
[a9bbc46] | 90 | <entry>Generic arm</entry>
|
---|
| 91 | <entry>little</entry>
|
---|
[d44503cc] | 92 | <entry>OABI</entry>
|
---|
[ad36f39] | 93 | <entry>arm-unknown-linux-uclibc</entry>
|
---|
| 94 | </row>
|
---|
| 95 | <row>
|
---|
[ff29c76] | 96 | <entry>Generic arm, version 4</entry>
|
---|
[a9bbc46] | 97 | <entry>little</entry>
|
---|
[d44503cc] | 98 | <entry>OABI</entry>
|
---|
[ff29c76] | 99 | <entry>armv4-unknown-linux-uclibc</entry>
|
---|
| 100 | </row>
|
---|
| 101 | <row>
|
---|
| 102 | <entry>Generic arm, version 5</entry>
|
---|
| 103 | <entry>little</entry>
|
---|
| 104 | <entry>EABI</entry>
|
---|
[885ee0e] | 105 | <entry>armv5l-unknown-linux-uclibceabi</entry>
|
---|
[ad36f39] | 106 | </row>
|
---|
| 107 | <row>
|
---|
[a9bbc46] | 108 | <entry>Generic arm, version 5</entry>
|
---|
| 109 | <entry>big</entry>
|
---|
[ff29c76] | 110 | <entry>EABI</entry>
|
---|
[885ee0e] | 111 | <entry>armv5b-unknown-linux-uclibceabi</entry>
|
---|
[ad36f39] | 112 | </row>
|
---|
[d44503cc] | 113 | <row>
|
---|
| 114 | <entry>Generic arm</entry>
|
---|
| 115 | <entry>little</entry>
|
---|
| 116 | <entry>EABI</entry>
|
---|
[885ee0e] | 117 | <entry>arm-unknown-linux-uclibceabi</entry>
|
---|
[d44503cc] | 118 | </row>
|
---|
[ff29c76] | 119 | <row>
|
---|
| 120 | <entry>Generic arm, version 7-a </entry>
|
---|
| 121 | <entry>little</entry>
|
---|
| 122 | <entry>EABI</entry>
|
---|
[885ee0e] | 123 | <entry>armv7a-unknown-linux-uclibceabi</entry>
|
---|
[ff29c76] | 124 | </row>
|
---|
[ad36f39] | 125 | </tbody>
|
---|
[3ca2208] | 126 |
|
---|
[ad36f39] | 127 | </tgroup>
|
---|
[3ca2208] | 128 |
|
---|
[ad36f39] | 129 | </table>
|
---|
| 130 |
|
---|
[b220338] | 131 | <table os="j">
|
---|
| 132 | <title>ARM Archiecture Choices</title>
|
---|
| 133 | <?dbfo table-width="4in" ?>
|
---|
| 134 |
|
---|
| 135 | <tgroup cols="2">
|
---|
| 136 |
|
---|
| 137 | <colspec colnum="1" colwidth="1in" colname="Arch Choice"/>
|
---|
| 138 | <colspec colnum="2" colwidth="1in" colname="Arch Choice"/>
|
---|
| 139 | <colspec colnum="3" colwidth="1in" colname="Arch Choice"/>
|
---|
| 140 | <colspec colnum="4" colwidth="1in" colname="Arch Choice"/>
|
---|
| 141 |
|
---|
| 142 | <tbody>
|
---|
| 143 | <row>
|
---|
| 144 | <entry>armv2</entry>
|
---|
| 145 | <entry>armv2a</entry>
|
---|
| 146 | <entry>armv3</entry>
|
---|
| 147 | <entry>armv3m</entry>
|
---|
| 148 | </row>
|
---|
| 149 | <row>
|
---|
| 150 | <entry>armv4</entry>
|
---|
| 151 | <entry>armv4t</entry>
|
---|
| 152 | <entry>armv5</entry>
|
---|
| 153 | <entry>armv5t</entry>
|
---|
| 154 | </row>
|
---|
| 155 | <row>
|
---|
| 156 | <entry>armv5te</entry>
|
---|
| 157 | <entry>armv6</entry>
|
---|
| 158 | <entry>armv6j</entry>
|
---|
| 159 | <entry>armv6t2</entry>
|
---|
| 160 | </row>
|
---|
| 161 | <row>
|
---|
| 162 | <entry>armv6z</entry>
|
---|
| 163 | <entry>armv6zk</entry>
|
---|
| 164 | <entry>armv6-m</entry>
|
---|
| 165 | <entry>armv7</entry>
|
---|
| 166 | </row>
|
---|
| 167 | <row>
|
---|
| 168 | <entry>armv7-a</entry>
|
---|
| 169 | <entry>armv7-r</entry>
|
---|
| 170 | <entry>armv7-m</entry>
|
---|
| 171 | <entry>iwmmxt</entry>
|
---|
| 172 | </row>
|
---|
| 173 | <row>
|
---|
| 174 | <entry>iwmmxt2</entry>
|
---|
| 175 | <entry>ep9312</entry>
|
---|
| 176 | </row>
|
---|
| 177 | </tbody>
|
---|
| 178 | </tgroup>
|
---|
| 179 | </table>
|
---|
| 180 |
|
---|
| 181 | <table os="j">
|
---|
| 182 | <title>ARM Hard Floating Point Versions</title>
|
---|
| 183 | <?dbfo table-width="4in" ?>
|
---|
| 184 |
|
---|
| 185 | <tgroup cols="2">
|
---|
| 186 |
|
---|
| 187 | <colspec colnum="1" colwidth="1in" colname="FPU Choice"/>
|
---|
| 188 | <colspec colnum="2" colwidth="1in" colname="FPU Choice"/>
|
---|
| 189 | <colspec colnum="3" colwidth="1in" colname="FPU Choice"/>
|
---|
| 190 | <colspec colnum="4" colwidth="1in" colname="FPU Choice"/>
|
---|
| 191 |
|
---|
| 192 | <tbody>
|
---|
| 193 | <row>
|
---|
| 194 | <entry>fpa</entry>
|
---|
| 195 | <entry>fpe2</entry>
|
---|
| 196 | <entry>fpe3</entry>
|
---|
| 197 | <entry>maverick</entry>
|
---|
| 198 | </row>
|
---|
| 199 | <row>
|
---|
| 200 | <entry>vfp</entry>
|
---|
| 201 | <entry>vfpv3</entry>
|
---|
| 202 | <entry>vfpv3-fp16</entry>
|
---|
| 203 | <entry>vfpv3-d16</entry>
|
---|
| 204 | </row>
|
---|
| 205 | <row>
|
---|
| 206 | <entry>vfpv3-d16-fp16</entry>
|
---|
| 207 | <entry>vfpv3xd</entry>
|
---|
| 208 | <entry>vfpv3xd-fp16</entry>
|
---|
| 209 | <entry>neon</entry>
|
---|
| 210 | </row>
|
---|
| 211 | <row>
|
---|
| 212 | <entry>neon-fp16</entry>
|
---|
| 213 | <entry>vfpv4</entry>
|
---|
| 214 | <entry>vfpv4-d16</entry>
|
---|
| 215 | <entry>fpv4-sp-d16</entry>
|
---|
| 216 | </row>
|
---|
| 217 | <row>
|
---|
| 218 | <entry>neon-vfpv4</entry>
|
---|
| 219 | </row>
|
---|
| 220 | </tbody>
|
---|
| 221 | </tgroup>
|
---|
| 222 | </table>
|
---|
| 223 |
|
---|
[ad36f39] | 224 | </sect1>
|
---|