source: clfs-embedded/BOOK/cross-tools/mips/variables.xml@ a5d6c23

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

variables: Reduce triplets to 3 entries

No more "unknown" or "pc" portion. It's not needed.

  • Property mode set to 100644
File size: 3.6 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 set the target triplet for the target architecture, the MIPS
18 level, and CPU endianess. If you do not know what triplet or level you want,
19 you can use the table as a reference. Set
20 the command using the method listed below:</para>
21
22 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
23 href="../common/variables.xml"
24 xpointer="xpointer(//*[@os='b'])"/>
25
26 <table os="i">
27 <title>Processor Type and Target Triplets</title>
28 <?dbfo table-width="5.5in" ?>
29
30 <tgroup cols="3">
31
32 <colspec colnum="1" colwidth="2in" colname="Processor"/>
33 <colspec colnum="2" colwidth="2.5in" colname="Triplet"/>
34 <colspec colnum="3" colwidth="1in" colname="MIPS Level"/>
35
36 <thead>
37 <row>
38 <entry>Processor</entry>
39 <entry>Target Triplet</entry>
40 <entry>MIPS Level</entry>
41 </row>
42 </thead>
43
44 <tbody>
45 <row>
46 <entry>MIPS 32 bits Little Endian</entry>
47 <entry>mipsel-linux-musl</entry>
48 <entry>1</entry>
49 </row>
50 <row>
51 <entry>MIPS 32 bits Big Endian</entry>
52 <entry>mips-linux-musl</entry>
53 <entry>1</entry>
54 </row>
55 <row>
56 <entry>MIPS 64 bits Little Endian</entry>
57 <entry>mips64el-linux-musl</entry>
58 <entry>3</entry>
59 </row>
60 <row>
61 <entry>MIPS 64 bits Big Endian</entry>
62 <entry>mips64-linux-musl</entry>
63 <entry>3</entry>
64 </row>
65 </tbody>
66
67 </tgroup>
68
69 </table>
70
71 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
72 href="../common/variables.xml"
73 xpointer="xpointer(//*[@os='c'])"/>
74
75<screen os="d"><userinput>export CLFS_ARCH=mips
76export CLFS_ENDIAN=$(echo ${CLFS_ARCH} | sed -e 's/mipsel/little/' -e 's/mips/big/')</userinput></screen>
77
78 <para os="m1">Now you will need to set the MIPS LEVEL. This determines how your
79 GCC and C library are built. There are currently 5 MIPS ISA Levels. To keep things
80 simple we are only using two. For more information, see
81 <ulink url="http://www.linux-mips.org/wiki/Instruction_Set_Architecture"/></para>
82
83<screen os="m2"><userinput>export CLFS_MIPS_LEVEL="<replaceable>[mips level]</replaceable>"</userinput></screen>
84
85 <para os="m3">We also need to select the floating point capability of the CPU.
86 If the CPU has built-in hardware for performing floating point calculations,
87 choose "hard", otherwise choose "soft":</para>
88
89<screen os="m4"><userinput>export CLFS_FLOAT="<replaceable>[hard or soft]</replaceable>"</userinput></screen>
90
91 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
92 href="../common/variables.xml"
93 xpointer="xpointer(//*[@os='g'])"/>
94
95<screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" &gt;&gt; ~/.bashrc
96echo export CLFS_TARGET=\""${CLFS_TARGET}\"" &gt;&gt; ~/.bashrc
97echo export CLFS_ARCH=\""${CLFS_ARCH}\"" &gt;&gt; ~/.bashrc
98echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" &gt;&gt; ~/.bashrc
99echo export CLFS_MIPS_LEVEL=\""${CLFS_MIPS_LEVEL}\"" &gt;&gt; ~/.bashrc
100echo export CLFS_FLOAT=\""${CLFS_FLOAT}\"" &gt;&gt; ~/.bashrc</userinput></screen>
101
102</sect1>
Note: See TracBrowser for help on using the repository browser.