[a9e389d] | 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" [
|
---|
[a9e389d] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-cross-tools-uclibc" role="wrap">
|
---|
| 9 | <?dbhtml filename="uclibc.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>uClibc-&uclibc-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-cross-tools-uclibc">
|
---|
| 14 | <primary sortas="a-uClibc">uClibc</primary>
|
---|
| 15 | <secondary>cross tools</secondary>
|
---|
| 16 | </indexterm>
|
---|
| 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 | </sect2>
|
---|
| 27 |
|
---|
| 28 | <sect2 role="installation">
|
---|
| 29 | <title>Installation of uClibc</title>
|
---|
| 30 |
|
---|
[0bd108d] | 31 | <note os="e">
|
---|
[e57d05e] | 32 | <para>Below we are just telling uClibc to use its default configuration.
|
---|
| 33 | For those for more adventureous, you can use make menuconfig, and
|
---|
| 34 | do a more custom build for your uClibc installation.</para>
|
---|
[e2d2a2d] | 35 | </note>
|
---|
[a9e389d] | 36 |
|
---|
[e57d05e] | 37 | <para os="f">Create the default configuration:</para>
|
---|
[a9e389d] | 38 |
|
---|
[4884635] | 39 | <screen os="g"><userinput>make defconfig ARCH=i386</userinput></screen>
|
---|
[e2d2a2d] | 40 |
|
---|
[0bd108d] | 41 | <para os="h">We will need to edit the configuration file, to make sure everything gets
|
---|
[e57d05e] | 42 | compiled and put into its proper location:</para>
|
---|
[a9e389d] | 43 |
|
---|
[8550e7a] | 44 | <screen os="i"><userinput>cp .config{,.orig}
|
---|
[a9e389d] | 45 | sed -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CLFS_TARGET}-\":" \
|
---|
[961b7c5] | 46 | -e "/^KERNEL_HEADERS/s:=.*:=\"${CLFS}/usr/include\":" \
|
---|
[a9e389d] | 47 | -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/lib\":" \
|
---|
| 48 | -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
|
---|
| 49 | -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
|
---|
| 50 | .config.orig > .config</userinput></screen>
|
---|
| 51 |
|
---|
[0bd108d] | 52 | <para os="j">We will need to make sure that some settings in uClibc are set so we
|
---|
[e666df1] | 53 | can utilize all the features of BusyBox:</para>
|
---|
[a9e389d] | 54 |
|
---|
[ffd218b] | 55 | <screen os="k"><userinput>UCLIBC_OPTIONS="DO_C99_MATH UCLIBC_HAS_RPC UCLIBC_HAS_CTYPE_CHECKED
|
---|
[3ca2208] | 56 | UCLIBC_HAS_WCHAR UCLIBC_HAS_HEXADECIMAL_FLOATS LDSO_PRELOAD_FILE_SUPPORT
|
---|
| 57 | UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE UCLIBC_HAS_PRINTF_M_SPEC UCLIBC_HAS_IPV6
|
---|
| 58 | UCLIBC_HAS_GLIBC_CUSTOM_PRINTF UCLIBC_USE_NETLINK UCLIBC_HAS_FTW"
|
---|
[e666df1] | 59 | for config in $UCLIBC_OPTIONS; do
|
---|
[3ca2208] | 60 | cp .config{,.orig}
|
---|
| 61 | sed -e "s:# ${config} is not set:${config}=y:" .config.orig > .config
|
---|
[e666df1] | 62 | done
|
---|
[b277e24] | 63 | UCLIBC_OPTIONS="UCLIBC_HAS_CTYPE_UNSAFE"
|
---|
| 64 | for config in $UCLIBC_OPTIONS; do
|
---|
[3ca2208] | 65 | cp .config{,.orig}
|
---|
| 66 | sed -e "s:${config}=y:# ${config} is not set:" .config.orig > .config
|
---|
[b277e24] | 67 | done
|
---|
[be76242] | 68 | echo "UCLIBC_HAS_FULL_RPC=y" >> .config
|
---|
| 69 | echo "UCLIBC_HAS_REENTRANT_RPC=y" >> .config</userinput></screen>
|
---|
[a9e389d] | 70 |
|
---|
[f23b5ee] | 71 | <para os="l">We have made some changes to our config, let's make sure
|
---|
| 72 | that we didn't miss and dependencies:</para>
|
---|
[e666df1] | 73 |
|
---|
[c06227f] | 74 | <screen os="m"><userinput>make oldconfig</userinput></screen>
|
---|
[e666df1] | 75 |
|
---|
[f23b5ee] | 76 | <para os="n">Compile the package:</para>
|
---|
| 77 |
|
---|
[3c8eaa6] | 78 | <screen os="o"><userinput>make CC="${CLFS_TARGET}-gcc ${BUILD}"</userinput></screen>
|
---|
[f23b5ee] | 79 |
|
---|
[f540eb0] | 80 | <para os="p">Install the package:</para>
|
---|
[a9e389d] | 81 |
|
---|
[f540eb0] | 82 | <screen os="q"><userinput>make PREFIX=${CLFS} install</userinput></screen>
|
---|
[a9e389d] | 83 |
|
---|
| 84 | </sect2>
|
---|
| 85 |
|
---|
| 86 | <sect2 id="contents-uclibc" role="content">
|
---|
| 87 | <title>Contents of uClibc</title>
|
---|
| 88 |
|
---|
| 89 | <segmentedlist>
|
---|
| 90 | <segtitle>Installed uClibc</segtitle>
|
---|
| 91 |
|
---|
| 92 | <seglistitem>
|
---|
| 93 | <seg>To Be Written</seg>
|
---|
| 94 | </seglistitem>
|
---|
| 95 | </segmentedlist>
|
---|
[6561a0f] | 96 | <!--
|
---|
[a9e389d] | 97 | <variablelist>
|
---|
| 98 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 99 | <?dbfo list-presentation="list"?>
|
---|
| 100 | <?dbhtml list-presentation="table"?>
|
---|
| 101 |
|
---|
[6561a0f] | 102 | <varlistentry id="uclibc">
|
---|
[a9e389d] | 103 | <term><filename
|
---|
| 104 | class="headerfile">/usr/include/{asm,linux}/*.h</filename></term>
|
---|
| 105 | <listitem>
|
---|
| 106 | <para>The Linux API headers</para>
|
---|
| 107 | <indexterm zone="ch-system-linux-headers linux-headers">
|
---|
| 108 | <primary
|
---|
| 109 | sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary>
|
---|
| 110 | </indexterm>
|
---|
| 111 | </listitem>
|
---|
| 112 | </varlistentry>
|
---|
| 113 | </variablelist>
|
---|
[6561a0f] | 114 | -->
|
---|
[a9e389d] | 115 |
|
---|
| 116 | </sect2>
|
---|
| 117 | </sect1>
|
---|