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

Last change on this file since 02ef21b was 492e5a3, checked in by Jim Gifford <clfs@…>, 18 years ago

Fixes for uclibc wording

  • 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.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
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>
45
46 <para os="d">Create default configuration:</para>
47
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
51 compiled and put into it's proper locations:</para>
52
53<screen os="g"><userinput>cp .config .config.orig
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
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>
63
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>
71
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 during
77 the building of uClibc. These files were copied into the include directory of the source
78 directory of uClibc:</para>
79
80<screen os="m"><userinput>rm include/{asm,asm-generic,linux}</userinput></screen>
81
82 <para os="n">Install the package:</para>
83
84<screen os="o"><userinput>make PREFIX=${CLFS} install</userinput></screen>
85
86 </sect2>
87
88 <sect2 id="contents-uclibc" role="content">
89 <title>Contents of uClibc</title>
90
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-->
117
118 </sect2>
119</sect1>
Note: See TracBrowser for help on using the repository browser.