Next: Building Curses and dialog
Up: Making Linux Installation Disks
Previous: Building uClibc
Contents
First cd into the $MYBOOT/busybox-0.60.5 subdirectory.
Edit the file Conf.h as follows:
- Add or remove support for programs you do or do not want. For
each program there is a #define BB_XXX line that can be
commented out or not. I uncommented the following lines, some of
these commands are expected to be useful in install scripts, others are
necessary for network access or modules and of course I wanted the vi
editor: BB_CMP, BB_EXPR, BB_IFCONFIG, BB_INSMOD,
BB_PING, BB_RMMOD, BB_ROUTE, BB_VI and BB_WGET.
- Add or remove features that you do or do not want by uncommenting or
commenting th corresponding feature line. I uncommented the following:
BB_FEATURE_USE_TERMIOS, BB_FEATURE_MOUNT_NFSMOUNT and
BB_FEATURE_IFCONFIG_STATUS.
Edit the Makefile as follows:
- Uncomment the CC= line below the comment about uClibc and
change it to CC=${MYBOOT}/uclibc-dev/bin/gcc
- You could enable LFS support, as it is already selected in uClibc
as well.
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: Building Curses and dialog
Up: Making Linux Installation Disks
Previous: Building uClibc
Contents
Lennart Benschop
2003-07-16