[99fc891] | 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" [
|
---|
[99fc891] | 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 |
|
---|
[7926af1] | 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 at the bottom of this page as a reference. Set
|
---|
| 20 | the command using the method listed below:</para>
|
---|
[99fc891] | 21 |
|
---|
[33bc2cb] | 22 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 23 | href="../common/variables.xml"
|
---|
[5b4806a] | 24 | xpointer="xpointer(//*[@os='b'])"/>
|
---|
[99fc891] | 25 |
|
---|
[6533111] | 26 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 27 | href="../common/variables.xml"
|
---|
[6533111] | 28 | xpointer="xpointer(//*[@os='c'])"/>
|
---|
| 29 |
|
---|
[a9bbc46] | 30 | <screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/\(mips\)\(64\)\?\(el\)\?-.*/\1\3/')
|
---|
| 31 | export CLFS_ENDIAN=$(echo ${CLFS_ARCH} | sed -e 's/mipsel/little/' -e 's/mips/big/')</userinput></screen>
|
---|
[6533111] | 32 |
|
---|
[5b4806a] | 33 | <para os="m1">Now you will need to set the MIPS LEVEL. This determines how your
|
---|
[c14754c] | 34 | uClibc is built. There are currently 5 MIPS ISA Levels. To keep things simple
|
---|
| 35 | we are only using 2. For more information, go to
|
---|
| 36 | <ulink url="http://www.linux-mips.org/wiki/Instruction_Set_Architecture"/></para>
|
---|
| 37 |
|
---|
[ae8e977] | 38 | <screen os="m2"><userinput>export CLFS_MIPS_LEVEL="<replaceable>[mips level]</replaceable>"</userinput></screen>
|
---|
[c14754c] | 39 |
|
---|
[33bc2cb] | 40 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
[7926af1] | 41 | href="../common/variables.xml"
|
---|
[0dad5b9] | 42 | xpointer="xpointer(//*[@os='g'])"/>
|
---|
[99fc891] | 43 |
|
---|
[e269c28] | 44 | <screen os="h"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" >> ~/.bashrc
|
---|
| 45 | echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc
|
---|
[6533111] | 46 | echo export CLFS_ARCH=\""${CLFS_ARCH}\"" >> ~/.bashrc
|
---|
| 47 | echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" >> ~/.bashrc
|
---|
[c14754c] | 48 | echo export CLFS_MIPS_LEVEL=\""${CLFS_MIPS_LEVEL}\"" >> ~/.bashrc</userinput></screen>
|
---|
[99fc891] | 49 |
|
---|
[0dad5b9] | 50 | <table os="i">
|
---|
[99fc891] | 51 | <title>Processor Type and Target Triplets</title>
|
---|
[3ca2208] | 52 | <?dbfo table-width="5.5in" ?>
|
---|
| 53 |
|
---|
| 54 | <tgroup cols="2">
|
---|
| 55 |
|
---|
| 56 | <colspec colnum="1" colwidth="2in" colname="Processor"/>
|
---|
| 57 | <colspec colnum="2" colwidth="2.5in" colname="Triplet"/>
|
---|
| 58 | <colspec colnum="3" colwidth="1in" colname="MIPS Level"/>
|
---|
| 59 |
|
---|
[99fc891] | 60 | <thead>
|
---|
| 61 | <row>
|
---|
| 62 | <entry>Processor</entry>
|
---|
| 63 | <entry>Target Triplet</entry>
|
---|
[1261c88] | 64 | <entry>MIPS Level</entry>
|
---|
[99fc891] | 65 | </row>
|
---|
| 66 | </thead>
|
---|
[3ca2208] | 67 |
|
---|
[99fc891] | 68 | <tbody>
|
---|
| 69 | <row>
|
---|
| 70 | <entry>MIPS 32 bits Little Endian</entry>
|
---|
| 71 | <entry>mipsel-unknown-linux-uclibc</entry>
|
---|
[c14754c] | 72 | <entry>1</entry>
|
---|
[99fc891] | 73 | </row>
|
---|
| 74 | <row>
|
---|
| 75 | <entry>MIPS 32 bits Big Endian</entry>
|
---|
| 76 | <entry>mips-unknown-linux-uclibc</entry>
|
---|
[c14754c] | 77 | <entry>1</entry>
|
---|
[99fc891] | 78 | </row>
|
---|
| 79 | <row>
|
---|
| 80 | <entry>MIPS 64 bits Little Endian</entry>
|
---|
| 81 | <entry>mips64el-unknown-linux-uclibc</entry>
|
---|
[c14754c] | 82 | <entry>3</entry>
|
---|
[99fc891] | 83 | </row>
|
---|
| 84 | <row>
|
---|
| 85 | <entry>MIPS 64 bits Big Endian</entry>
|
---|
| 86 | <entry>mips64-unknown-linux-uclibc</entry>
|
---|
[c14754c] | 87 | <entry>3</entry>
|
---|
[99fc891] | 88 | </row>
|
---|
| 89 | </tbody>
|
---|
[3ca2208] | 90 |
|
---|
[99fc891] | 91 | </tgroup>
|
---|
[3ca2208] | 92 |
|
---|
[99fc891] | 93 | </table>
|
---|
| 94 |
|
---|
| 95 | </sect1>
|
---|