- Timestamp:
- Nov 11, 2006, 8:28:14 PM (18 years ago)
- Branches:
- master
- Children:
- 02ef21b
- Parents:
- 99fc891
- Location:
- BOOK
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/cross-tools/mips/linux-headers.xml
r99fc891 r33bc2cb 15 15 </indexterm> 16 16 17 <sect2 role="package"> 18 <title/> 19 20 <para>The Linux Headers package contains the 21 <quote>sanitized</quote> kernel headers.</para> 22 23 </sect2> 17 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 18 href="../x86/linux-headers.xml" 19 xpointer="xpointer(//*[@role='package'])"/> 24 20 25 21 <sect2 role="installation"> 26 22 <title>Installation of Linux Headers</title> 27 23 28 <para os="a">For years it has been common practice to use 29 <quote>raw</quote> kernel headers (straight from a kernel tarball) in 30 <filename class="directory">/usr/include</filename>, but over the last few 31 years, the kernel developers have taken a strong stance that this 32 should not be done. This gave birth to the Linux-Libc-Headers Project, 33 which was designed to maintain an API stable version of the Linux 34 headers. Recently this project stopped producing updates, so the Cross-LFS 35 team started development on our own project to sanitize the headers.</para> 24 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 25 href="../x86/linux-headers.xml" 26 xpointer="xpointer(//*[@os='a'])"/> 36 27 37 <para os="b">Install the header files that are common to all architectures:</para> 28 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 29 href="../x86/linux-headers.xml" 30 xpointer="xpointer(//*[@os='b'])"/> 38 31 39 32 <screen os="c"><userinput>install -dv ${CLFS}/usr/include 40 33 cp -av include/{asm-generic,linux,mtd,scsi,sound} ${CLFS}/usr/include</userinput></screen> 41 34 42 <para os="d">Install the header files that are specific to this architecture:</para> 35 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 36 href="../x86/linux-headers.xml" 37 xpointer="xpointer(//*[@os='d'])"/> 43 38 44 39 <screen><userinput>cp -av include/asm-mips ${CLFS}/usr/include/asm</userinput></screen> … … 46 41 </sect2> 47 42 48 <sect2 id="contents-linux-headers" role="content"> 49 <title>Contents of Linux-Headers</title> 50 51 <segmentedlist> 52 <segtitle>Installed headers</segtitle> 53 54 <seglistitem> 55 <seg>/usr/include/{asm,linux}/*.h</seg> 56 </seglistitem> 57 </segmentedlist> 58 59 <variablelist> 60 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 61 <?dbfo list-presentation="list"?> 62 <?dbhtml list-presentation="table"?> 63 64 <varlistentry id="linux-headers"> 65 <term><filename 66 class="headerfile">/usr/include/{asm,linux}/*.h</filename></term> 67 <listitem> 68 <para>The Linux API headers</para> 69 <indexterm zone="ch-system-linux-headers linux-headers"> 70 <primary 71 sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary> 72 </indexterm> 73 </listitem> 74 </varlistentry> 75 76 </variablelist> 77 78 </sect2> 43 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 44 href="../x86/linux-headers.xml" 45 xpointer="xpointer(//*[@role='content'])"/> 79 46 80 47 </sect1> 48 49 -
BOOK/cross-tools/mips/uclibc-headers.xml
r99fc891 r33bc2cb 47 47 xpointer="xpointer(//*[@os='f'])"/> 48 48 49 <screen os="d1"><userinput>cp .config .config.orig 50 sed -e "/^KERNEL_SOURCE/s:=.*:=\"${CLFS}/usr\":" \ 51 -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/lib\":" \ 52 -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ 53 -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ 54 .config.orig > .config</userinput></screen> 49 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 50 href="../x86/uclibc-headers.xml" 51 xpointer="xpointer(//*[@os='d1'])"/> 55 52 56 53 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" … … 62 59 xpointer="xpointer(//*[@os='i'])"/> 63 60 64 <para os="d2">Create the Headers:</para> 61 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 62 href="../x86/uclibc-headers.xml" 63 xpointer="xpointer(//*[@os='d2'])"/> 65 64 66 65 <screen os="d3"><userinput>make TARGET_ARCH=mips headers</userinput></screen> … … 78 77 xpointer="xpointer(//*[@os='n'])"/> 79 78 80 <screen os="d5"><userinput>cp -a include/* ${CLFS}/usr/include</userinput></screen> 79 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 80 href="../x86/uclibc-headers.xml" 81 xpointer="xpointer(//*[@os='d5'])"/> 81 82 82 83 </sect2> -
BOOK/cross-tools/mips/uclibc.xml
r99fc891 r33bc2cb 16 16 </indexterm> 17 17 18 <sect2 role="package"> 19 <title/> 20 21 <para>The uClibc package contains the main C library. This library provides 22 the basic routines for allocating memory, searching directories, opening and 23 closing files, reading and writing files, string handling, pattern matching, 24 arithmetic, and so on.</para> 25 26 <para>THIS IS JUST A PLACEHOLDER, YOU *WILL* NEED TO DO 'make menuconfig' SELECT MIPS ARCHITECTURE AND THE SPECIFIC MIPS YOU ARE USING!</para> 27 28 </sect2> 18 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 19 href="../x86/uclibc.xml" 20 xpointer="xpointer(//*[@role='package'])"/> 29 21 30 22 <sect2 role="installation"> 31 23 <title>Installation of uClibc</title> 32 24 33 <para os="a">Since we are cross-compiling, we need to make sure when we 34 configuration for our architecture we get the correct information. The 35 following sed makes sure we are using the proper settings for our 36 architecture: (This is a place holder for the other architectures). Make sure you select the MIPS architecture and the correct processor/endianness.</para> 25 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 26 href="../x86/uclibc.xml" 27 xpointer="xpointer(//*[@os='a'])"/> 37 28 38 <screen os="b"><userinput>make menuconfig</userinput></screen> 29 <screen os="b"><userinput>cp extra/Configs/Config.in extra/Configs/Config.in.orig 30 sed -e "s:default TARGET_i386:default TARGET_mips:" \ 31 extra/Configs/Config.in.orig > extra/Configs/Config.in</userinput></screen> 39 32 40 <note os="c"> 41 <para>Below we are just telling uClibc to use the default configuration of 42 uClibc. For those for more adventureous, you can use make menuconfig, and 43 do a more custom build of your uClibc.</para> 44 </note> 33 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 34 href="../x86/uclibc.xml" 35 xpointer="xpointer(//*[@os='c'])"/> 45 36 46 <para os="d">Create default configuration:</para> 37 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 38 href="../x86/uclibc.xml" 39 xpointer="xpointer(//*[@os='d'])"/> 47 40 48 <screen os="e"><userinput>make defconfig</userinput></screen> 41 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 42 href="../x86/uclibc.xml" 43 xpointer="xpointer(//*[@os='e'])"/> 49 44 50 <para os="f">We will need to edit the configuration file, to make sure everything gets 51 compiled and put into it's proper locations:</para> 45 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 46 href="../x86/uclibc.xml" 47 xpointer="xpointer(//*[@os='f'])"/> 52 48 53 <screen os="g"><userinput>cp .config .config.orig 54 sed -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CLFS_TARGET}-\":" \ 55 -e "/^KERNEL_SOURCE/s:=.*:=\"${CLFS}/usr\":" \ 56 -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/lib\":" \ 57 -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ 58 -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ 59 .config.orig > .config</userinput></screen> 49 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 50 href="../x86/uclibc.xml" 51 xpointer="xpointer(//*[@os='g'])"/> 60 52 61 <para os="h">We will need to make sure that some settings in uClibc are set so we 62 can utilize all the features of BusyBox:</para> 53 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 54 href="../x86/uclibc.xml" 55 xpointer="xpointer(//*[@os='h'])"/> 63 56 64 <screen os="i"><userinput>UCLIBC_OPTIONS="DO_C99_MATH UCLIBC_HAS_RPC UCLIBC_HAS_CTYPE_CHECKED UCLIBC_HAS_WCHAR UCLIBC_HAS_HEXADECIMAL_FLOATS 65 UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE UCLIBC_HAS_PRINTF_M_SPEC UCLIBC_HAS_FTW UCLIBC_HAS_IPV6" 66 for config in $UCLIBC_OPTIONS; do 67 cp .config .config.orig 68 sed -e "s:# ${config} is not set:${config}=y:" .config.orig > .config 69 done 70 echo "UCLIBC_HAS_FULL_RPC=y" >> .config</userinput></screen> 57 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 58 href="../x86/uclibc.xml" 59 xpointer="xpointer(//*[@os='i'])"/> 71 60 72 <para os="j">Compile the package:</para> 61 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 62 href="../x86/uclibc.xml" 63 xpointer="xpointer(//*[@os='j'])"/> 73 64 74 <screen os="k"><userinput>make </userinput></screen>65 <screen os="k"><userinput>make TARGET_ARCH=mips</userinput></screen> 75 66 76 <para os="l">We will remove the files that were copied over from our Linux Headers during77 the building of uClibc. These files were copied into the include directory of the source78 directory of uClibc:</para>67 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 68 href="../x86/uclibc.xml" 69 xpointer="xpointer(//*[@os='l'])"/> 79 70 80 <screen os="m"><userinput>rm include/{asm,asm-generic,linux}</userinput></screen> 71 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 72 href="../x86/uclibc.xml" 73 xpointer="xpointer(//*[@os='m'])"/> 81 74 82 <para os="n">Install the package:</para> 75 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 76 href="../x86/uclibc.xml" 77 xpointer="xpointer(//*[@os='n'])"/> 83 78 84 <screen os="o"><userinput>make PREFIX=${CLFS} install</userinput></screen> 79 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 80 href="../x86/uclibc.xml" 81 xpointer="xpointer(//*[@os='o'])"/> 85 82 86 83 </sect2> 87 84 88 <sect2 id="contents-uclibc" role="content">89 <title >Contents of uClibc</title>85 <sect2 role="content" id="contents-uclibc"> 86 <title/> 90 87 91 <segmentedlist> 92 <segtitle>Installed uClibc</segtitle> 93 94 <seglistitem> 95 <seg>To Be Written</seg> 96 </seglistitem> 97 </segmentedlist> 98 <!-- 99 <variablelist> 100 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 101 <?dbfo list-presentation="list"?> 102 <?dbhtml list-presentation="table"?> 103 104 <varlistentry id="uclibc"> 105 <term><filename 106 class="headerfile">/usr/include/{asm,linux}/*.h</filename></term> 107 <listitem> 108 <para>The Linux API headers</para> 109 <indexterm zone="ch-system-linux-headers linux-headers"> 110 <primary 111 sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary> 112 </indexterm> 113 </listitem> 114 </varlistentry> 115 </variablelist> 116 --> 88 <para>Details on this package are located in <xref 89 linkend="contents-uclibc" role="."/></para> 117 90 118 91 </sect2> 92 119 93 </sect1> 94 -
BOOK/cross-tools/mips/variables.xml
r99fc891 r33bc2cb 13 13 <bridgehead renderas="sect4">Setting Host and Target</bridgehead> 14 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 The first variable will be the triplet of the <envar>HOST</envar> machine. 18 You will need to set the <envar>CHOST</envar> triplet to match your 19 particular needs. To set this information you can issue the following 20 command:</para> 15 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 16 href="../x86/variables.xml" 17 xpointer="xpointer(//*[@os='a'])"/> 21 18 22 <screen os="b"><userinput>export CLFS_HOST="$(echo $MACHTYPE | sed "s/$(echo $MACHTYPE | cut -d- -f2)/cross/")"</userinput></screen> 19 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 20 href="../x86/variables.xml" 21 xpointer="xpointer(//*[@os='b'])"/> 23 22 24 <para os="c">Now you will need to set the target triplet for the target 25 architecture. You can do this by running the same command as above, just 26 running it on the target machine. If you can't run the command on the 27 target machine, you can use the table at the bottom of this page. Set 28 the command using the method listed below:</para> 23 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 24 href="../x86/variables.xml" 25 xpointer="xpointer(//*[@os='c'])"/> 29 26 30 <screen os="d"><userinput>export CLFS_TARGET="{target tripplet}"</userinput></screen> 27 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 28 href="../x86/variables.xml" 29 xpointer="xpointer(//*[@os='d'])"/> 31 30 32 <para os="e">Now we will add these to <filename>~/.bashrc</filename>, just in 33 case you have to exit and restart building later:</para> 31 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 32 href="../x86/variables.xml" 33 xpointer="xpointer(//*[@os='e'])"/> 34 34 35 <screen os="f"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" >> ~/.bashrc 36 echo export CLFS_TARGET=\""${CLFS_TARGET}\"" >> ~/.bashrc</userinput></screen> 35 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" 36 href="../x86/variables.xml" 37 xpointer="xpointer(//*[@os='f'])"/> 37 38 38 39 <table os="g"> -
BOOK/introduction/mips-chapter.xml
r99fc891 r33bc2cb 22 22 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/resources.xml"/> 23 23 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="common/askforhelp.xml"/> 24 <!-- This page is only for published versions if the LiveCD is included25 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mips/livecd.xml"/>26 -->27 24 28 25 </chapter> -
BOOK/stylesheets/top-index.xsl
r99fc891 r33bc2cb 116 116 <h4> 117 117 <a href="mips"> 118 <xsl:text> mips</xsl:text>118 <xsl:text>MIPS</xsl:text> 119 119 </a> 120 120 </h4>
Note:
See TracChangeset
for help on using the changeset viewer.