[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 |
|
---|
[c31ae75] | 23 | <para os="a1">Most ARM processors are little endian, it is a safe choice.
|
---|
| 24 | If your processor is an ARM9, good choices include: triplet of
|
---|
| 25 | armv5l-unknown-linux-uclibeabi, ARM arch of armv5t, float of softfp, and fpu
|
---|
| 26 | of either none or softvfp. ARM9 processors do not always have hardware
|
---|
| 27 | floating point abilities. If your processor is a Cortex-A8 or Cortex-A9, good
|
---|
| 28 | choices include: triplet of armv7a-unknown-linux-uclibceabi, ARM arch of
|
---|
| 29 | armv7-a, float of hard, and fpu of vfpv3-d16.</para>
|
---|
| 30 |
|
---|
| 31 | <para os="a2">First, set the host and target triplets:</para>
|
---|
[ad36f39] | 32 |
|
---|
| 33 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 34 | href="../common/variables.xml"
|
---|
[5b4806a] | 35 | xpointer="xpointer(//*[@os='b'])"/>
|
---|
[ad36f39] | 36 |
|
---|
| 37 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 38 | href="../common/variables.xml"
|
---|
[5b4806a] | 39 | xpointer="xpointer(//*[@os='c'])"/>
|
---|
[ad36f39] | 40 |
|
---|
[a9bbc46] | 41 | <screen os="d"><userinput>export CLFS_ARCH=arm
|
---|
[29ca400] | 42 | export CLFS_ENDIAN="<replaceable>[endianess]</replaceable>"</userinput></screen>
|
---|
[6533111] | 43 |
|
---|
[b220338] | 44 | <para os="e">Choose the ARM architecture (see table below) and mode of
|
---|
| 45 | your CPU:</para>
|
---|
| 46 |
|
---|
| 47 | <screen os="f"><userinput>export CLFS_ARM_ARCH="<replaceable>[architecture]</replaceable>"
|
---|
| 48 | export CLFS_ARM_MODE="<replaceable>[arm or thumb]</replaceable>"</userinput></screen>
|
---|
| 49 |
|
---|
| 50 | <para os="f1">If your target CPU has hard floating point support (not all ARM
|
---|
| 51 | CPUs do), set the following CLFS_FLOAT variable to either "hard" or "softfp".
|
---|
| 52 | If your target CPU does not have hard floating point support, set the following
|
---|
| 53 | CLFS_FLOAT vairable to "soft".</para>
|
---|
| 54 |
|
---|
| 55 | <screen os="f2"><userinput>export CLFS_FLOAT="<replaceable>[hard, softfp, or soft]"</replaceable></userinput></screen>
|
---|
| 56 |
|
---|
| 57 | <para os="f3">If you chose either "hard" or "softfp" for CLFS_FLOAT, you now
|
---|
| 58 | need to set which floating point hardware is actually included (see table below)
|
---|
| 59 | with your ARM CPU:</para>
|
---|
| 60 |
|
---|
| 61 | <screen os="f4"><userinput>export CLFS_FPU="<replaceable>[fpu version]</replaceable>"</userinput></screen>
|
---|
| 62 |
|
---|
[5b4806a] | 63 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 64 | href="../common/variables.xml"
|
---|
[0dad5b9] | 65 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
[6533111] | 66 |
|
---|
[b220338] | 67 | <screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" >> ~/.bashrc
|
---|
| 68 | echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc
|
---|
| 69 | echo export CLFS_ARCH=\""${CLFS_ARCH}\"" >> ~/.bashrc
|
---|
| 70 | echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" >> ~/.bashrc
|
---|
| 71 | echo export CLFS_ARM_ARCH=\""${CLFS_ARM_ARCH}\"" >> ~/.bashrc
|
---|
| 72 | echo export CLFS_ARM_MODE=\""${CLFS_ARM_MODE}\"" >> ~/.bashrc
|
---|
| 73 | echo export CLFS_FLOAT=\""${CLFS_FLOAT}\"" >> ~/.bashrc
|
---|
| 74 | echo export CLFS_FPU=\""${CLFS_FPU}\"" >> ~/.bashrc</userinput></screen>
|
---|
[ad36f39] | 75 |
|
---|
[0dad5b9] | 76 | <table os="i">
|
---|
[b220338] | 77 | <title>Example Processor Type, ABI, and Target Triplets</title>
|
---|
[d44503cc] | 78 | <?dbfo table-width="7in" ?>
|
---|
[3ca2208] | 79 |
|
---|
[5c58544] | 80 | <tgroup cols="4">
|
---|
[3ca2208] | 81 |
|
---|
| 82 | <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
|
---|
[29ca400] | 83 | <colspec colnum="2" colwidth="1in" colname="Endianess"/>
|
---|
[d44503cc] | 84 | <colspec colnum="3" colwidth="1in" colname="ABI"/>
|
---|
| 85 | <colspec colnum="4" colwidth="2.5in" colname="Triplet"/>
|
---|
[3ca2208] | 86 |
|
---|
[ad36f39] | 87 | <thead>
|
---|
| 88 | <row>
|
---|
| 89 | <entry>Processor</entry>
|
---|
[29ca400] | 90 | <entry>Endianess</entry>
|
---|
[d44503cc] | 91 | <entry>ABI</entry>
|
---|
[ad36f39] | 92 | <entry>Target Triplet</entry>
|
---|
| 93 | </row>
|
---|
| 94 | </thead>
|
---|
[3ca2208] | 95 |
|
---|
[ad36f39] | 96 | <tbody>
|
---|
[ff29c76] | 97 | <row>
|
---|
| 98 | <entry>Generic arm, version 5</entry>
|
---|
| 99 | <entry>little</entry>
|
---|
| 100 | <entry>EABI</entry>
|
---|
[885ee0e] | 101 | <entry>armv5l-unknown-linux-uclibceabi</entry>
|
---|
[ad36f39] | 102 | </row>
|
---|
| 103 | <row>
|
---|
[a9bbc46] | 104 | <entry>Generic arm, version 5</entry>
|
---|
| 105 | <entry>big</entry>
|
---|
[ff29c76] | 106 | <entry>EABI</entry>
|
---|
[885ee0e] | 107 | <entry>armv5b-unknown-linux-uclibceabi</entry>
|
---|
[ad36f39] | 108 | </row>
|
---|
[d44503cc] | 109 | <row>
|
---|
| 110 | <entry>Generic arm</entry>
|
---|
| 111 | <entry>little</entry>
|
---|
| 112 | <entry>EABI</entry>
|
---|
[885ee0e] | 113 | <entry>arm-unknown-linux-uclibceabi</entry>
|
---|
[d44503cc] | 114 | </row>
|
---|
[ff29c76] | 115 | <row>
|
---|
| 116 | <entry>Generic arm, version 7-a </entry>
|
---|
| 117 | <entry>little</entry>
|
---|
| 118 | <entry>EABI</entry>
|
---|
[885ee0e] | 119 | <entry>armv7a-unknown-linux-uclibceabi</entry>
|
---|
[ff29c76] | 120 | </row>
|
---|
[ad36f39] | 121 | </tbody>
|
---|
[3ca2208] | 122 |
|
---|
[ad36f39] | 123 | </tgroup>
|
---|
[3ca2208] | 124 |
|
---|
[ad36f39] | 125 | </table>
|
---|
| 126 |
|
---|
[b220338] | 127 | <table os="j">
|
---|
| 128 | <title>ARM Archiecture Choices</title>
|
---|
| 129 | <?dbfo table-width="4in" ?>
|
---|
| 130 |
|
---|
[5c58544] | 131 | <tgroup cols="4">
|
---|
[b220338] | 132 |
|
---|
| 133 | <colspec colnum="1" colwidth="1in" colname="Arch Choice"/>
|
---|
| 134 | <colspec colnum="2" colwidth="1in" colname="Arch Choice"/>
|
---|
| 135 | <colspec colnum="3" colwidth="1in" colname="Arch Choice"/>
|
---|
| 136 | <colspec colnum="4" colwidth="1in" colname="Arch Choice"/>
|
---|
| 137 |
|
---|
| 138 | <tbody>
|
---|
| 139 | <row>
|
---|
| 140 | <entry>armv2</entry>
|
---|
| 141 | <entry>armv2a</entry>
|
---|
| 142 | <entry>armv3</entry>
|
---|
| 143 | <entry>armv3m</entry>
|
---|
| 144 | </row>
|
---|
| 145 | <row>
|
---|
| 146 | <entry>armv4</entry>
|
---|
| 147 | <entry>armv4t</entry>
|
---|
| 148 | <entry>armv5</entry>
|
---|
| 149 | <entry>armv5t</entry>
|
---|
| 150 | </row>
|
---|
| 151 | <row>
|
---|
| 152 | <entry>armv5te</entry>
|
---|
| 153 | <entry>armv6</entry>
|
---|
| 154 | <entry>armv6j</entry>
|
---|
| 155 | <entry>armv6t2</entry>
|
---|
| 156 | </row>
|
---|
| 157 | <row>
|
---|
| 158 | <entry>armv6z</entry>
|
---|
| 159 | <entry>armv6zk</entry>
|
---|
| 160 | <entry>armv6-m</entry>
|
---|
| 161 | <entry>armv7</entry>
|
---|
| 162 | </row>
|
---|
| 163 | <row>
|
---|
| 164 | <entry>armv7-a</entry>
|
---|
| 165 | <entry>armv7-r</entry>
|
---|
| 166 | <entry>armv7-m</entry>
|
---|
| 167 | <entry>iwmmxt</entry>
|
---|
| 168 | </row>
|
---|
| 169 | <row>
|
---|
| 170 | <entry>iwmmxt2</entry>
|
---|
| 171 | <entry>ep9312</entry>
|
---|
| 172 | </row>
|
---|
| 173 | </tbody>
|
---|
| 174 | </tgroup>
|
---|
| 175 | </table>
|
---|
| 176 |
|
---|
| 177 | <table os="j">
|
---|
| 178 | <title>ARM Hard Floating Point Versions</title>
|
---|
| 179 | <?dbfo table-width="4in" ?>
|
---|
| 180 |
|
---|
[5c58544] | 181 | <tgroup cols="4">
|
---|
[b220338] | 182 |
|
---|
| 183 | <colspec colnum="1" colwidth="1in" colname="FPU Choice"/>
|
---|
| 184 | <colspec colnum="2" colwidth="1in" colname="FPU Choice"/>
|
---|
| 185 | <colspec colnum="3" colwidth="1in" colname="FPU Choice"/>
|
---|
| 186 | <colspec colnum="4" colwidth="1in" colname="FPU Choice"/>
|
---|
| 187 |
|
---|
| 188 | <tbody>
|
---|
| 189 | <row>
|
---|
| 190 | <entry>fpa</entry>
|
---|
| 191 | <entry>fpe2</entry>
|
---|
| 192 | <entry>fpe3</entry>
|
---|
| 193 | <entry>maverick</entry>
|
---|
| 194 | </row>
|
---|
| 195 | <row>
|
---|
| 196 | <entry>vfp</entry>
|
---|
| 197 | <entry>vfpv3</entry>
|
---|
| 198 | <entry>vfpv3-fp16</entry>
|
---|
| 199 | <entry>vfpv3-d16</entry>
|
---|
| 200 | </row>
|
---|
| 201 | <row>
|
---|
| 202 | <entry>vfpv3-d16-fp16</entry>
|
---|
| 203 | <entry>vfpv3xd</entry>
|
---|
| 204 | <entry>vfpv3xd-fp16</entry>
|
---|
| 205 | <entry>neon</entry>
|
---|
| 206 | </row>
|
---|
| 207 | <row>
|
---|
| 208 | <entry>neon-fp16</entry>
|
---|
| 209 | <entry>vfpv4</entry>
|
---|
| 210 | <entry>vfpv4-d16</entry>
|
---|
| 211 | <entry>fpv4-sp-d16</entry>
|
---|
| 212 | </row>
|
---|
| 213 | <row>
|
---|
| 214 | <entry>neon-vfpv4</entry>
|
---|
[c31ae75] | 215 | <entry>softvfp</entry>
|
---|
| 216 | <entry>none</entry>
|
---|
[b220338] | 217 | </row>
|
---|
| 218 | </tbody>
|
---|
| 219 | </tgroup>
|
---|
| 220 | </table>
|
---|
| 221 |
|
---|
[ad36f39] | 222 | </sect1>
|
---|