Changeset 33bc2cb in clfs-embedded for BOOK/cross-tools


Ignore:
Timestamp:
Nov 11, 2006, 8:28:14 PM (18 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
master
Children:
02ef21b
Parents:
99fc891
Message:

Streamlined, and updates to some MIPS specific checks

Location:
BOOK/cross-tools/mips
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • BOOK/cross-tools/mips/linux-headers.xml

    r99fc891 r33bc2cb  
    1515  </indexterm>
    1616
    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'])"/>
    2420
    2521  <sect2 role="installation">
    2622    <title>Installation of Linux Headers</title>
    2723
    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'])"/>
    3627
    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'])"/>
    3831
    3932<screen os="c"><userinput>install -dv ${CLFS}/usr/include
    4033cp -av include/{asm-generic,linux,mtd,scsi,sound} ${CLFS}/usr/include</userinput></screen>
    4134
    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'])"/>
    4338
    4439<screen><userinput>cp -av include/asm-mips ${CLFS}/usr/include/asm</userinput></screen>
     
    4641  </sect2>
    4742
    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'])"/>
    7946
    8047</sect1>
     48
     49
  • BOOK/cross-tools/mips/uclibc-headers.xml

    r99fc891 r33bc2cb  
    4747  xpointer="xpointer(//*[@os='f'])"/>
    4848
    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'])"/>
    5552
    5653  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     
    6259  xpointer="xpointer(//*[@os='i'])"/>
    6360
    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'])"/>
    6564
    6665<screen os="d3"><userinput>make TARGET_ARCH=mips headers</userinput></screen>
     
    7877  xpointer="xpointer(//*[@os='n'])"/>
    7978
    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'])"/>
    8182
    8283  </sect2>
  • BOOK/cross-tools/mips/uclibc.xml

    r99fc891 r33bc2cb  
    1616  </indexterm>
    1717
    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'])"/>
    2921
    3022  <sect2 role="installation">
    3123    <title>Installation of uClibc</title>
    3224
    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'])"/>
    3728
    38 <screen os="b"><userinput>make menuconfig</userinput></screen>
     29<screen os="b"><userinput>cp extra/Configs/Config.in extra/Configs/Config.in.orig
     30sed -e "s:default TARGET_i386:default TARGET_mips:" \
     31   extra/Configs/Config.in.orig > extra/Configs/Config.in</userinput></screen>
    3932
    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'])"/>
    4536
    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'])"/>
    4740
    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'])"/>
    4944
    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'])"/>
    5248
    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'])"/>
    6052
    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'])"/>
    6356
    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'])"/>
    7160
    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'])"/>
    7364
    74 <screen os="k"><userinput>make</userinput></screen>
     65<screen os="k"><userinput>make TARGET_ARCH=mips</userinput></screen>
    7566
    76    <para os="l">We will remove the files that were copied over from our Linux Headers during
    77    the building of uClibc. These files were copied into the include directory of the source
    78    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'])"/>
    7970
    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'])"/>
    8174
    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'])"/>
    8378
    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'])"/>
    8582
    8683  </sect2>
    8784
    88   <sect2 id="contents-uclibc" role="content">
    89     <title>Contents of uClibc</title>
     85  <sect2 role="content" id="contents-uclibc">
     86    <title/>
    9087
    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>
    11790
    11891  </sect2>
     92
    11993</sect1>
     94
  • BOOK/cross-tools/mips/variables.xml

    r99fc891 r33bc2cb  
    1313  <bridgehead renderas="sect4">Setting Host and Target</bridgehead>
    1414
    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'])"/>
    2118
    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'])"/>
    2322
    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'])"/>
    2926
    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'])"/>
    3130
    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'])"/>
    3434
    35 <screen os="f"><userinput>echo export CLFS_HOST=\""${CLFS_HOST}\"" &gt;&gt; ~/.bashrc
    36 echo export CLFS_TARGET=\""${CLFS_TARGET}\"" &gt;&gt; ~/.bashrc</userinput></screen>
     35  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     36  href="../x86/variables.xml"
     37  xpointer="xpointer(//*[@os='f'])"/>
    3738
    3839  <table os="g">
Note: See TracChangeset for help on using the changeset viewer.