[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, |
---|
[5470f08] | 19 | you can use the table as a reference. Set |
---|
[7926af1] | 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 | |
---|
[0dad5b9] | 26 | <table os="i"> |
---|
[99fc891] | 27 | <title>Processor Type and Target Triplets</title> |
---|
[3ca2208] | 28 | <?dbfo table-width="5.5in" ?> |
---|
| 29 | |
---|
[5c58544] | 30 | <tgroup cols="3"> |
---|
[3ca2208] | 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 | |
---|
[99fc891] | 36 | <thead> |
---|
| 37 | <row> |
---|
| 38 | <entry>Processor</entry> |
---|
| 39 | <entry>Target Triplet</entry> |
---|
[1261c88] | 40 | <entry>MIPS Level</entry> |
---|
[99fc891] | 41 | </row> |
---|
| 42 | </thead> |
---|
[3ca2208] | 43 | |
---|
[99fc891] | 44 | <tbody> |
---|
| 45 | <row> |
---|
| 46 | <entry>MIPS 32 bits Little Endian</entry> |
---|
[7f1f997] | 47 | <entry>mipsel-linux-musl</entry> |
---|
[c14754c] | 48 | <entry>1</entry> |
---|
[99fc891] | 49 | </row> |
---|
| 50 | <row> |
---|
| 51 | <entry>MIPS 32 bits Big Endian</entry> |
---|
[7f1f997] | 52 | <entry>mips-linux-musl</entry> |
---|
[c14754c] | 53 | <entry>1</entry> |
---|
[99fc891] | 54 | </row> |
---|
| 55 | <row> |
---|
| 56 | <entry>MIPS 64 bits Little Endian</entry> |
---|
[7f1f997] | 57 | <entry>mips64el-linux-musl</entry> |
---|
[c14754c] | 58 | <entry>3</entry> |
---|
[99fc891] | 59 | </row> |
---|
| 60 | <row> |
---|
| 61 | <entry>MIPS 64 bits Big Endian</entry> |
---|
[7f1f997] | 62 | <entry>mips64-linux-musl</entry> |
---|
[c14754c] | 63 | <entry>3</entry> |
---|
[99fc891] | 64 | </row> |
---|
| 65 | </tbody> |
---|
[3ca2208] | 66 | |
---|
[99fc891] | 67 | </tgroup> |
---|
[3ca2208] | 68 | |
---|
[99fc891] | 69 | </table> |
---|
| 70 | |
---|
[5470f08] | 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 |
---|
| 76 | export 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}\"" >> ~/.bashrc |
---|
| 96 | echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc |
---|
| 97 | echo export CLFS_ARCH=\""${CLFS_ARCH}\"" >> ~/.bashrc |
---|
| 98 | echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" >> ~/.bashrc |
---|
| 99 | echo export CLFS_MIPS_LEVEL=\""${CLFS_MIPS_LEVEL}\"" >> ~/.bashrc |
---|
| 100 | echo export CLFS_FLOAT=\""${CLFS_FLOAT}\"" >> ~/.bashrc</userinput></screen> |
---|
| 101 | |
---|
[99fc891] | 102 | </sect1> |
---|