next up previous contents
Next: Building Curses and dialog Up: Making Linux Installation Disks Previous: Building uClibc   Contents

Building Busybox

First cd into the $MYBOOT/busybox-0.60.5 subdirectory.

Edit the file Conf.h as follows:

Edit the Makefile as follows:

Now build the program.

make
make PREFIX=$MYBOOT/rootfs install

Because you have linked with the dynamic uClibc library and these are not installed in the host system's /lib directory, the program cannot run. There is a trick to work around it: by using the chroot command, you can run a program whose root directory is the specified directory. Become root and type the following command:

/usr/sbin/chroot $MYBOOT/rootfs /bin/sh
The shell that you are now in is the shell inside the $MYBOOT/rootfs directory. This shell thinks that this rootfs directory is in fact the root directory: even the shared libraries of uClibc in the /lib directory will be found. Type the command ls / and it will be clear. Exit the chroot subshell with Control-D and everything will be back to normal.

Now you have most common Unix utilities including an editor and a shell and you've spent only 614kB of disk space!


next up previous contents
Next: Building Curses and dialog Up: Making Linux Installation Disks Previous: Building uClibc   Contents
Lennart Benschop 2003-07-16