%general-entities; ]> uClibc-&uclibc-version; uClibc cross tools <para>The uClibc package contains the main C library. This library provides the basic routines for allocating memory, searching directories, opening and closing files, reading and writing files, string handling, pattern matching, arithmetic, and so on.</para> </sect2> <sect2 role="installation"> <title>Installation of uClibc Below we are just telling uClibc to use its default configuration. For those for more adventureous, you can use make menuconfig, and do a more custom build for your uClibc installation. The following patch contains a number of updates to the &uclibc-version; branch by the uClibc developers: patch -Np1 -i ../&uclibc-branch_update-patch; Copy the uClibc config file from where you downloaded it: cp ${CLFS}/sources/uClibc-&uclibc-version;.config .config We will need to edit the configuration file, to make sure everything gets compiled and it's compiled to the proper architecture: cp .config{,.orig} sed -e "s@# TARGET_${CLFS_ARCH} is not set@TARGET_${CLFS_ARCH}=y@" \ -e "s@\(^TARGET_ARCH=\).*@\1\"${CLFS_ARCH}\"@" \ -e "s@\(^CROSS_COMPILER_PREFIX=\).*@\1\"${CLFS_TARGET}-\"@" \ -e "s@\(^KERNEL_HEADERS=\).*@\1\"${CLFS}/usr/include\"@" \ -e "s@.*\(^ARCH_${CLFS_NOT_ENDIAN}_ENDIAN\).*@# \1 is not set@g" \ -e "s@.*\(ARCH_${CLFS_ENDIAN}_ENDIAN\).*@\1=y@g" \ -e "s@.*\(ARCH_WANTS_${CLFS_ENDIAN}_ENDIAN\).*@\1=y@g" \ .config.orig > .config The config is a basic working system, but there are some options that are architecture specifc that need to be set. The following command will only bring up items that need a value that we did not specify in our Generic config file: make oldconfig Compile the package: make CROSS=${CLFS_TARGET}- CC="${CLFS_TARGET}-gcc ${BUILD}" Install the package: make PREFIX=${CLFS} install Contents of uClibc Installed uClibc To Be Written