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

Last change on this file since 3800899 was e666df1, checked in by Jim Gifford <clfs@…>, 18 years ago

Updated Date
Added Busybox
Added Patches
Updated uClibc to build Busybox

  • Property mode set to 100644
File size: 4.2 KB
RevLine 
[a9e389d]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/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 <para os="a">Since we are cross-compiling, we need to make sure when we
32 configuration for our architecture we get the correct information. The
33 following sed makes sure we are using the proper settings for our
34 architecture: (This is a place holder for the other architectures</para>
35
36<screen os="b"><userinput>cp extra/Configs/Config.in extra/Configs/Config.in.orig
37sed -e "s:default TARGET_i386:default TARGET_i386:" \
38 extra/Configs/Config.in.orig > extra/Configs/Config.in</userinput></screen>
39
[e2d2a2d]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>
[a9e389d]45
[e2d2a2d]46 <para os="d">Create default configuration:</para>
[a9e389d]47
[e2d2a2d]48<screen os="e"><userinput>make defconfig</userinput></screen>
49
50 <para os="f">We will need to edit the configuration file, to make sure everything gets
[a9e389d]51 compiled and put into it's proper locations:</para>
52
[e2d2a2d]53<screen os="g"><userinput>cp .config .config.orig
[a9e389d]54sed -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>
60
[e666df1]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>
[a9e389d]63
[e666df1]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"
66for config in $UCLIBC_OPTIONS; do
67 cp .config .config.orig
68 sed -e "s:# ${config} is not set:${config}=y:" .config.orig > .config
69done
70echo "UCLIBC_HAS_FULL_RPC=y" >> .config</userinput></screen>
[a9e389d]71
[e666df1]72 <para os="j">Compile the package:</para>
73
74<screen os="k"><userinput>make TARGET_ARCH=i386</userinput></screen>
75
76 <para os="l">We will remove the files that were copied over from our Linux Headers, these
[a9e389d]77 files were copied into the source directory of uClibc:</para>
78
[e666df1]79<screen os="m"><userinput>rm include/{asm,asm-generic,linux}</userinput></screen>
[a9e389d]80
[e666df1]81 <para os="n">Install the package:</para>
[a9e389d]82
[e666df1]83<screen os="o"><userinput>make PREFIX=${CLFS} install</userinput></screen>
[a9e389d]84
85 </sect2>
86
87 <sect2 id="contents-uclibc" role="content">
88 <title>Contents of uClibc</title>
89
90 <segmentedlist>
91 <segtitle>Installed uClibc</segtitle>
92
93 <seglistitem>
94 <seg>To Be Written</seg>
95 </seglistitem>
96 </segmentedlist>
[6561a0f]97<!--
[a9e389d]98 <variablelist>
99 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
100 <?dbfo list-presentation="list"?>
101 <?dbhtml list-presentation="table"?>
102
[6561a0f]103 <varlistentry id="uclibc">
[a9e389d]104 <term><filename
105 class="headerfile">/usr/include/{asm,linux}/*.h</filename></term>
106 <listitem>
107 <para>The Linux API headers</para>
108 <indexterm zone="ch-system-linux-headers linux-headers">
109 <primary
110 sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary>
111 </indexterm>
112 </listitem>
113 </varlistentry>
114 </variablelist>
[6561a0f]115-->
[a9e389d]116
117 </sect2>
118</sect1>
Note: See TracBrowser for help on using the repository browser.