source: clfs-embedded/BOOK/cross-tools/arm/variables.xml @ 8ffc8f19

Last change on this file since 8ffc8f19 was 8ffc8f19, checked in by Andrew Bradford <andrew@…>, 11 years ago

variables: Make ARM & x86 always little endian

99% of the time, this is correct.

  • Property mode set to 100644
File size: 6.5 KB
Line 
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,
18  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">If your processor is an ARM9, good choices include: triplet of
24  armv5l-unknown-linux-uclibeabi, ARM arch of armv5t, and float of soft.  ARM9
25  processors do not usually have hardware floating point abilities. If your
26  processor is a Cortex-A series, which often have hardware floating point
27  capability, good choices include: triplet of
28  armv7a-unknown-linux-musleabi, ARM arch of armv7-a, float of hard, and fpu
29  of vfpv3-d16.</para>
30
31  <para os="a2">First, set the host and target triplets:</para>
32
33  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
34  href="../common/variables.xml"
35  xpointer="xpointer(//*[@os='b'])"/>
36
37  <para os="c">Now we will set the architecture of the CPU based
38  on the target triplet provided above:</para>
39
40<screen os="d"><userinput>export CLFS_ARCH=arm</userinput></screen>
41
42  <para os="e">Choose the ARM architecture (see table below) and mode of
43  your CPU:</para>
44
45<screen os="f"><userinput>export CLFS_ARM_ARCH="<replaceable>[architecture]</replaceable>"
46export CLFS_ARM_MODE="<replaceable>[arm or thumb]</replaceable>"</userinput></screen>
47
48  <para os="f1">If your target CPU has hardware floating point support (not all
49  ARM CPUs do), then set the following CLFS_FLOAT variable to either "hard" or
50  "softfp".  Use "softfp" if you need to integrate binaries compiled with
51  "soft".  Use "hard" if you don't.  If your target CPU does not have hard
52  floating point support, set the following CLFS_FLOAT vairable to
53  "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
63  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
64  href="../common/variables.xml"
65  xpointer="xpointer(//*[@os='g'])"/>
66
67<screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" &gt;&gt; ~/.bashrc
68echo export CLFS_TARGET=\""${CLFS_TARGET}\"" &gt;&gt; ~/.bashrc
69echo export CLFS_ARCH=\""${CLFS_ARCH}\"" &gt;&gt; ~/.bashrc
70echo export CLFS_ARM_ARCH=\""${CLFS_ARM_ARCH}\"" &gt;&gt; ~/.bashrc
71echo export CLFS_ARM_MODE=\""${CLFS_ARM_MODE}\"" &gt;&gt; ~/.bashrc
72echo export CLFS_FLOAT=\""${CLFS_FLOAT}\"" &gt;&gt; ~/.bashrc
73echo export CLFS_FPU=\""${CLFS_FPU}\"" &gt;&gt; ~/.bashrc</userinput></screen>
74
75  <table os="i">
76    <title>Example Processor Type, ABI, and  Target Triplets</title>
77    <?dbfo table-width="7in" ?>
78
79    <tgroup cols="3">
80
81      <colspec colnum="1" colwidth="2.5in" colname="Processor"/>
82      <colspec colnum="2" colwidth="1in" colname="ABI"/>
83      <colspec colnum="3" colwidth="2.5in" colname="Triplet"/>
84
85      <thead>
86        <row>
87          <entry>Processor</entry>
88          <entry>ABI</entry>
89          <entry>Target Triplet</entry>
90        </row>
91      </thead>
92
93      <tbody>
94        <row>
95          <entry>Generic arm, version 5</entry>
96          <entry>EABI</entry>
97          <entry>armv5l-unknown-linux-musleabi</entry>
98        </row>
99        <row>
100          <entry>Generic arm</entry>
101          <entry>EABI</entry>
102          <entry>arm-unknown-linux-musleabi</entry>
103        </row>
104        <row>
105          <entry>Generic arm, version 7-a </entry>
106          <entry>EABI</entry>
107          <entry>armv7a-unknown-linux-musleabi</entry>
108        </row>
109      </tbody>
110
111    </tgroup>
112
113  </table>
114
115  <table os="j">
116    <title>ARM Archiecture Choices</title>
117    <?dbfo table-width="4in" ?>
118
119    <tgroup cols="4">
120
121      <colspec colnum="1" colwidth="1in" colname="Arch Choice"/>
122      <colspec colnum="2" colwidth="1in" colname="Arch Choice"/>
123      <colspec colnum="3" colwidth="1in" colname="Arch Choice"/>
124      <colspec colnum="4" colwidth="1in" colname="Arch Choice"/>
125
126      <tbody>
127        <row>
128          <entry>armv4t</entry>
129          <entry>armv5</entry>
130          <entry>armv5t</entry>
131          <entry>armv5te</entry>
132        </row>
133        <row>
134          <entry>armv6</entry>
135          <entry>armv6j</entry>
136          <entry>armv6t2</entry>
137          <entry>armv6z</entry>
138        </row>
139        <row>
140          <entry>armv6zk</entry>
141          <entry>armv6-m</entry>
142          <entry>armv7</entry>
143          <entry>armv7-a</entry>
144        </row>
145        <row>
146          <entry>armv7-r</entry>
147          <entry>armv7-m</entry>
148        </row>
149      </tbody>
150    </tgroup>
151  </table>
152
153  <table os="j">
154    <title>ARM Hard Floating Point Versions</title>
155    <?dbfo table-width="4in" ?>
156
157    <tgroup cols="4">
158
159      <colspec colnum="1" colwidth="1in" colname="FPU Choice"/>
160      <colspec colnum="2" colwidth="1in" colname="FPU Choice"/>
161      <colspec colnum="3" colwidth="1in" colname="FPU Choice"/>
162      <colspec colnum="4" colwidth="1in" colname="FPU Choice"/>
163
164      <tbody>
165        <row>
166          <entry>fpa</entry>
167          <entry>fpe2</entry>
168          <entry>fpe3</entry>
169          <entry>maverick</entry>
170        </row>
171        <row>
172          <entry>vfp</entry>
173          <entry>vfpv3</entry>
174          <entry>vfpv3-fp16</entry>
175          <entry>vfpv3-d16</entry>
176        </row>
177        <row>
178          <entry>vfpv3-d16-fp16</entry>
179          <entry>vfpv3xd</entry>
180          <entry>vfpv3xd-fp16</entry>
181          <entry>neon</entry>
182        </row>
183        <row>
184          <entry>neon-fp16</entry>
185          <entry>vfpv4</entry>
186          <entry>vfpv4-d16</entry>
187          <entry>fpv4-sp-d16</entry>
188        </row>
189        <row>
190          <entry>neon-vfpv4</entry>
191        </row>
192      </tbody>
193    </tgroup>
194  </table>
195
196</sect1>
Note: See TracBrowser for help on using the repository browser.