source: clfs-embedded/BOOK/cross-tools/x86/uclibc.xml@ e1b2402

Last change on this file since e1b2402 was 3c8eaa6, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Updated uClibc make command in the cross-tools section for CLFS Embedded, Thanks to Simon for Reporting this on IRC and the Mailing List.

  • Property mode set to 100644
File size: 4.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
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
31 <note os="e">
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>
35 </note>
36
37 <para os="p1">The following patch creates a condition in a header so that
38 the struct flock will not be redefined:</para>
39
40<screen os="p2"><userinput>patch -Np1 -i ../&uclibc-flock_fixes-patch;</userinput></screen>
41
42 <para os="f">Create the default configuration:</para>
43
44<screen os="g"><userinput>make defconfig ARCH=i386</userinput></screen>
45
46 <para os="h">We will need to edit the configuration file, to make sure everything gets
47 compiled and put into its proper location:</para>
48
49<screen os="i"><userinput>cp .config{,.orig}
50sed -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CLFS_TARGET}-\":" \
51 -e "/^KERNEL_HEADERS/s:=.*:=\"${CLFS}/usr/include\":" \
52 -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/lib\":" \
53 -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
54 -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
55 .config.orig > .config</userinput></screen>
56
57 <para os="j">We will need to make sure that some settings in uClibc are set so we
58 can utilize all the features of BusyBox:</para>
59
60<screen os="k"><userinput>UCLIBC_OPTIONS="DO_C99_MATH UCLIBC_HAS_RPC UCLIBC_HAS_CTYPE_CHECKED
61 UCLIBC_HAS_WCHAR UCLIBC_HAS_HEXADECIMAL_FLOATS LDSO_PRELOAD_FILE_SUPPORT
62 UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE UCLIBC_HAS_PRINTF_M_SPEC UCLIBC_HAS_IPV6
63 UCLIBC_HAS_GLIBC_CUSTOM_PRINTF UCLIBC_USE_NETLINK UCLIBC_HAS_FTW"
64for config in $UCLIBC_OPTIONS; do
65 cp .config{,.orig}
66 sed -e "s:# ${config} is not set:${config}=y:" .config.orig > .config
67done
68UCLIBC_OPTIONS="UCLIBC_HAS_CTYPE_UNSAFE"
69for config in $UCLIBC_OPTIONS; do
70 cp .config{,.orig}
71 sed -e "s:${config}=y:# ${config} is not set:" .config.orig > .config
72done
73echo "UCLIBC_HAS_FULL_RPC=y" &gt;&gt; .config
74echo "UCLIBC_HAS_REENTRANT_RPC=y" &gt;&gt; .config</userinput></screen>
75
76 <para os="l">We have made some changes to our config, let's make sure
77 that we didn't miss and dependencies:</para>
78
79<screen os="m"><userinput>make oldconfig</userinput></screen>
80
81 <para os="n">Compile the package:</para>
82
83<screen os="o"><userinput>make CC="${CLFS_TARGET}-gcc ${BUILD}"</userinput></screen>
84
85 <para os="p">Install the package:</para>
86
87<screen os="q"><userinput>make PREFIX=${CLFS} install</userinput></screen>
88
89 </sect2>
90
91 <sect2 id="contents-uclibc" role="content">
92 <title>Contents of uClibc</title>
93
94 <segmentedlist>
95 <segtitle>Installed uClibc</segtitle>
96
97 <seglistitem>
98 <seg>To Be Written</seg>
99 </seglistitem>
100 </segmentedlist>
101<!--
102 <variablelist>
103 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
104 <?dbfo list-presentation="list"?>
105 <?dbhtml list-presentation="table"?>
106
107 <varlistentry id="uclibc">
108 <term><filename
109 class="headerfile">/usr/include/{asm,linux}/*.h</filename></term>
110 <listitem>
111 <para>The Linux API headers</para>
112 <indexterm zone="ch-system-linux-headers linux-headers">
113 <primary
114 sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary>
115 </indexterm>
116 </listitem>
117 </varlistentry>
118 </variablelist>
119-->
120
121 </sect2>
122</sect1>
Note: See TracBrowser for help on using the repository browser.