Changeset a9bbc46 in clfs-embedded for BOOK/cross-tools
- Timestamp:
- Nov 28, 2010, 7:46:43 AM (14 years ago)
- Branches:
- master
- Children:
- d9bcc87
- Parents:
- 87d09b7
- Location:
- BOOK/cross-tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/cross-tools/arm/variables.xml
r87d09b7 ra9bbc46 25 25 xpointer="xpointer(//*[@os='c'])"/> 26 26 27 <screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/arm.*/arm/g')</userinput></screen> 28 29 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 30 href="../x86/variables.xml" 31 xpointer="xpointer(//*[@os='e'])"/> 32 33 <screen os="f"><userinput>export CLFS_ENDIAN=$(echo ${CLFS_ARCH} | sed -e 's/armeb/BIG/' -e 's/arm/LITTLE/') 34 if [ "${CLFS_ENDIAN}" = "LITTLE" ]; then 35 export CLFS_NOT_ENDIAN=BIG 36 else 37 export CLFS_NOT_ENDIAN=LITTLE 38 fi</userinput></screen> 27 <screen os="d"><userinput>export CLFS_ARCH=arm 28 export CLFS_ENDIAN=<replaceable>[endianess]</replaceable></userinput></screen> 39 29 40 30 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" … … 58 48 <row> 59 49 <entry>Processor</entry> 50 <entry>Endianess</entry> 60 51 <entry>Target Triplet</entry> 61 52 </row> … … 64 55 <tbody> 65 56 <row> 66 <entry>Generic arm, little endian</entry> 57 <entry>Generic arm</entry> 58 <entry>little</entry> 67 59 <entry>arm-unknown-linux-uclibc</entry> 68 60 </row> 69 61 <row> 70 <entry>Generic arm, version 5, little endian</entry> 62 <entry>Generic arm, version 5</entry> 63 <entry>little</entry> 71 64 <entry>armv5l-unknown-linux-uclibc</entry> 72 65 </row> 73 66 <row> 74 <entry>Generic arm, version 5, big endian</entry> 67 <entry>Generic arm, version 5</entry> 68 <entry>big</entry> 75 69 <entry>armv5b-unknown-linux-uclibc</entry> 76 70 </row> -
BOOK/cross-tools/common/uclibc.xml
r87d09b7 ra9bbc46 35 35 </note> 36 36 37 <para os=" p1">The following patch contains a number of updates to the38 &uclibc-version; branch by the uClibc developers:</para>37 <para os="b">The following patch contains the default configurations for 38 the architectures covered in this book:</para> 39 39 40 <screen os=" p2"><userinput>patch -Np1 -i ../&uclibc-branch_update-patch;</userinput></screen>40 <screen os="c"><userinput>patch -Np1 -i ../&uclibc-configs-patch;</userinput></screen> 41 41 42 <para os="b">Copy the uClibc config file from where you downloaded it:</para> 42 <para os="d">Now we will copy the configuration file best matching this 43 build and use that as the base:</para> 43 44 44 <screen os="c"><userinput>cp ${CLFS}/sources/uClibc-&uclibc-version;.config .config</userinput></screen> 45 46 <para os="d">We will need to edit the configuration file, to make sure everything gets 47 compiled and it's compiled to the proper architecture:</para> 48 49 <screen os="e"><userinput>cp .config{,.orig} 50 sed -e "s@# TARGET_${CLFS_ARCH} is not set@TARGET_${CLFS_ARCH}=y@" \ 51 -e "s@\(^TARGET_ARCH=\).*@\1\"${CLFS_ARCH}\"@" \ 52 -e "s@\(^CROSS_COMPILER_PREFIX=\).*@\1\"${CLFS_TARGET}-\"@" \ 53 -e "s@\(^KERNEL_HEADERS=\).*@\1\"${CLFS}/usr/include\"@" \ 54 -e "s@.*\(^ARCH_${CLFS_NOT_ENDIAN}_ENDIAN\).*@# \1 is not set@g" \ 55 -e "s@.*\(ARCH_${CLFS_ENDIAN}_ENDIAN\).*@\1=y@g" \ 56 -e "s@.*\(ARCH_WANTS_${CLFS_ENDIAN}_ENDIAN\).*@\1=y@g" \ 57 .config.orig > .config</userinput></screen> 45 <screen os="e"><userinput>cp clfs/config.${CLFS_ARCH}.${CLFS_ENDIAN} .config</userinput></screen> 58 46 59 47 <para os="f">The config is a basic working system, but there are some … … 66 54 <para os="h">Compile the package:</para> 67 55 68 <screen os="i"><userinput>make CROSS=${CLFS_TARGET}- CC="${CLFS_TARGET}-gcc ${BUILD}"</userinput></screen>56 <screen os="i"><userinput>make</userinput></screen> 69 57 70 58 <para os="l">Install the package:</para> -
BOOK/cross-tools/mips/variables.xml
r87d09b7 ra9bbc46 25 25 xpointer="xpointer(//*[@os='c'])"/> 26 26 27 <screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/mips64/mips/')</userinput></screen> 28 29 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 30 href="../x86/variables.xml" 31 xpointer="xpointer(//*[@os='e'])"/> 32 33 <screen os="f"><userinput>export CLFS_ENDIAN=$(echo ${CLFS_ARCH} | sed -e 's/mipsel/LITTLE/' -e 's/mips/BIG/') 34 if [ "${CLFS_ENDIAN}" = "LITTLE" ]; then 35 export CLFS_NOT_ENDIAN=BIG 36 else 37 export CLFS_NOT_ENDIAN=LITTLE 38 fi</userinput></screen> 27 <screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/\(mips\)\(64\)\?\(el\)\?-.*/\1\3/') 28 export CLFS_ENDIAN=$(echo ${CLFS_ARCH} | sed -e 's/mipsel/little/' -e 's/mips/big/')</userinput></screen> 39 29 40 30 <para os="m1">Now you will need to set the MIPS LEVEL. This determines how your … … 53 43 echo export CLFS_ARCH=\""${CLFS_ARCH}\"" >> ~/.bashrc 54 44 echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" >> ~/.bashrc 55 echo export CLFS_NOT_ENDIAN=\""${CLFS_NOT_ENDIAN}\"" >> ~/.bashrc56 45 echo export CLFS_MIPS_LEVEL=\""${CLFS_MIPS_LEVEL}\"" >> ~/.bashrc</userinput></screen> 57 46 -
BOOK/cross-tools/x86/variables.xml
r87d09b7 ra9bbc46 15 15 <para os="a">During the building of the cross-compile tools you will need to 16 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 18 architecture. You can do this by running the same command as above, just 19 running it on the target machine. If you can't run the command on the 20 target machine, you can use the table at the bottom of this page. Set 17 You will need to set the target triplet for the target architecture. As well 18 as the CPUs type and endianess. If you do not know what triplet you want, 19 you can use the table at the bottom of this page as a reference. Set 21 20 the command using the method listed below:</para> 22 21 23 22 <screen os="b"><userinput>export CLFS_HOST=$(echo ${MACHTYPE} | sed "s/-[^-]*/-cross/") 24 export CLFS_TARGET= "{target triplet}"</userinput></screen>23 export CLFS_TARGET=<replaceable>[target triplet]</replaceable></userinput></screen> 25 24 26 <para os="c">Now we will setup out default architecture needed we need to build:</para> 25 <para os="c">Now we will set the architecture and endianess of the CPU based 26 on the target triplet provided above:</para> 27 27 28 <screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/i.86/i386/')</userinput></screen> 29 30 <para os="e">Now we will setup out default endian needed we need to build and set the one we don't need:</para> 31 32 <screen os="f"><userinput>export CLFS_ENDIAN=LITTLE 33 export CLFS_NOT_ENDIAN=BIG</userinput></screen> 28 <screen os="d"><userinput>export CLFS_ARCH=$(echo ${CLFS_TARGET} | sed -e 's/-.*//' -e 's/i.86/i386/') 29 export CLFS_ENDIAN=little</userinput></screen> 34 30 35 31 <para os="g">Now we will add this to <filename>~/.bashrc</filename>, just in … … 39 35 echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc 40 36 echo export CLFS_ARCH=\""${CLFS_ARCH}\"" >> ~/.bashrc 41 echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" >> ~/.bashrc 42 echo export CLFS_NOT_ENDIAN=\""${CLFS_NOT_ENDIAN}\"" >> ~/.bashrc</userinput></screen> 37 echo export CLFS_ENDIAN=\""${CLFS_ENDIAN}\"" >> ~/.bashrc</userinput></screen> 43 38 44 39 <table os="i">
Note:
See TracChangeset
for help on using the changeset viewer.