next up previous contents
Next: Building Busybox Up: Making Linux Installation Disks Previous: First Preparation   Contents

Building uClibc

The trickiest part to get right is probably the C library, especially because we want to use shared libraries. The space savings are tremendous and once this is done right, you can fit many more utilities on a diskette. The directory where the shared libraries exist on the target system (where they will be used) is different from the directory where they exist on the host system. Without special tricks, the binaries that are compiled with uClibc won't run on the host system.

First create the following subdirectories under the myboot directory.

Next cd into the myboot/uClibc-0.9.20 directory. There run the following command:

make menuconfig

Next set the following configuration options in the menu:

Run the following commands to make and install the library. Note that we do not install the library as root as we do not install it in a system-wide directory.

make
make install
make PREFIX=$MYBOOT/rootfs install_target

The first command compiles the libraries, the second command installs the development code into the uclibc-dev directory and the last command installs the shared libraries into the rootfs directory. These will end up on the root file system of the bootable diskette.

Compiling with uClibc can be as simple as putting the uclibc-dev directory first in your path and just running make. Note that you cannot run the programs you have just made on the host system.


next up previous contents
Next: Building Busybox Up: Making Linux Installation Disks Previous: First Preparation   Contents
Lennart Benschop 2003-07-16