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