BusyBox : The Swiss Army Knife of Embedded Linux

Honoured as ‟the swiss army knife of embedded Linux‟, BusyBox is one of the most useful application for embedded development, it combines tiny versions of most Unix command line utilities, provids replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. In fact, BusyBox can pack almost 3.5MB of utilities into a single executable around 200KB, and therefore provides greater functionality to bootable floppy disks and embedded devices that use Linux.

     BusyBox exploits the fact that the standard Linux utilities share many common elements. For example, many file-based utilities (such as grep and find) require code to recurse a directory in search of files. When the utilities are combined into a single executable, they can share these common elements, which results in a smaller executable. In fact, BusyBox can pack almost 3.5MB of utilities into around 200KB. This provides greater functionality to bootable floppy disks and embedded devices that use Linux. You can use BusyBox with both the 2.4 and 2.6 Linux kernels.

Configuring and Building BusyBox
     Get the latest stable source from http://www.busybox.net/downloads/, execute the command below to untar downloaded tarball: (If it is other versions that you have downloaded, change the version number in the command)

$ tar xvfz busybox-1.10.1.tar.gz
$

     This results in a directory called busybox-1.10.1 which contains the source code of Busybox. Use the command defconfig to build the default configuration:
$ cd busybox-1.10.1
$ make defconfig
$ make
$

     Meanwhile, if some specific needs are required by your embedded platform, you can also use the command make menuconfig to configure the contents of your BusyBox by hand:

$ make menuconfig
$ make
$
     then choose the command options and features that you need in the configuration interface.
     BusyBox includes several build options to help you to build and debug the right BusyBox. As shown in the table below:
 Option Description
 help Show the complete list of make options
 defconfig Enable a default (generic) configuration
 allnoconfig Disable all applications (empty configuration)
 allyesconfig Enable all applications (complete configuration)
 Allbareconfig Enable all applications, but no subfeatures
 config Text-based configurator
 menuconfig Menu-based configurator
 all Build the BusyBox binary and documentation (./docs)
 busyboxBuild the BusyBox binary
 clean Clean the source tree
 distclean Completely clean the source tree
 sizes Emit the text/data sizes of the enabled applications