source: clfs-embedded/BOOK/cross-tools/common/uclibc.xml@ 7c5d3a4

Last change on this file since 7c5d3a4 was 9c034b9, checked in by Jim Gifford <clfs@…>, 16 years ago

Fixed uClibc

  • Property mode set to 100644
File size: 3.7 KB
RevLine 
[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
[0dad5b9]31 <note os="a">
[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
[0dad5b9]37 <para os="p1">The following patch contains a number of updates to the
38 &uclibc-version; branch by the uClibc developers:</para>
[a9e389d]39
[0dad5b9]40<screen os="p2"><userinput>patch -Np1 -i ../&uclibc-branch_update-patch;</userinput></screen>
[e2d2a2d]41
[0dad5b9]42 <para os="b">Copy the uClibc config file from where you downloaded it:</para>
43
[3a3ba13]44<screen os="c"><userinput>cp ${CLFS}/sources/uClibc-&uclibc-version;.config .config</userinput></screen>
[0dad5b9]45
46 <para os="d">We will need to edit the configuration file, to make sure everything gets
[b327081]47 compiled and it's compiled to the proper architecture:</para>
[a9e389d]48
[0dad5b9]49<screen os="e"><userinput>cp .config{,.orig}
50sed -e "s@# TARGET_${CLFS_ARCH} is not set@TARGET_${CLFS_ARCH}=y@" \
51 -e "s@\(^TARGET_ARCH=\).*@\1\"${CLFS_ARCH}\"@" \
52 -e "s@\(^CROSS_COMPILER_PREFIX=\).*@\1\"${CLFS_TARGET}-\"@" \
[9c034b9]53 -e "s@\(^KERNEL_HEADERS=\).*@\1\"${CLFS}/usr/include\"@" \
[0dad5b9]54 -e "s@.*\(^ARCH_${CLFS_NOT_ENDIAN}_ENDIAN\).*@# \1 is not set@g" \
55 -e "s@.*\(ARCH_${CLFS_ENDIAN}_ENDIAN\).*@\1=y@g" \
56 -e "s@.*\(ARCH_WANTS_${CLFS_ENDIAN}_ENDIAN\).*@\1=y@g" \
57 .config.orig > .config</userinput></screen>
58
[b327081]59 <para os="f">The config is a basic working system, but there are some
60 options that are architecture specifc that need to be set. The following
61 command will only bring up items that need a value that we did not
62 specify in our Generic config file:</para>
[e666df1]63
[0dad5b9]64<screen os="g"><userinput>make oldconfig</userinput></screen>
[e666df1]65
[0dad5b9]66 <para os="h">Compile the package:</para>
[f23b5ee]67
[0dad5b9]68<screen os="i"><userinput>make CC="${CLFS_TARGET}-gcc ${BUILD}"</userinput></screen>
[f23b5ee]69
[0dad5b9]70 <para os="l">Install the package:</para>
[a9e389d]71
[0dad5b9]72<screen os="j"><userinput>make PREFIX=${CLFS} install</userinput></screen>
[a9e389d]73
74 </sect2>
75
76 <sect2 id="contents-uclibc" role="content">
77 <title>Contents of uClibc</title>
78
79 <segmentedlist>
80 <segtitle>Installed uClibc</segtitle>
81
82 <seglistitem>
83 <seg>To Be Written</seg>
84 </seglistitem>
85 </segmentedlist>
[6561a0f]86<!--
[a9e389d]87 <variablelist>
88 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
89 <?dbfo list-presentation="list"?>
90 <?dbhtml list-presentation="table"?>
91
[6561a0f]92 <varlistentry id="uclibc">
[a9e389d]93 <term><filename
94 class="headerfile">/usr/include/{asm,linux}/*.h</filename></term>
95 <listitem>
96 <para>The Linux API headers</para>
97 <indexterm zone="ch-system-linux-headers linux-headers">
98 <primary
99 sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary>
100 </indexterm>
101 </listitem>
102 </varlistentry>
103 </variablelist>
[6561a0f]104-->
[a9e389d]105
106 </sect2>
107</sect1>
Note: See TracBrowser for help on using the repository browser.