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

Last change on this file since e2ce6d78 was c5d3ce0, checked in by William Harrington <kb0iic@…>, 11 years ago

The softfp target shouldn't use the triple ending in hf.

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