Reproduced in:http://blog.sina.com.cn/wyw1976
What is BusyBox?
(1) BusyBox is an application on Linux (application), that is, there is only one elf file header.
(2) It integrates many tools and commands commonly used on Linux (utilities) such as RM, LS, gzip, TFTP, etc. For these tools and commands, the implementation in BusyBox may not be the most complete, but is the most commonly used, so it is characterized by short and concise, especially for the size of the embedded system is very sensitive.
(3) BusyBox's official website is http://www.busybox.net/, where you can find all the information related to BusyBox.
BusyBox Compiling and porting
The compilation of BusyBox is similar to the Linux kernel compilation process. Download the latest source code from http://www.busybox.net/downloads/, after decompression, through the following steps, you can complete the BusyBox compilation and Migration:
(1) Make Xxxxxxconfig
BusyBox provides several configurations: Defconfig (Default configuration), Allyesconfig (maximum configuration), Allnoconfig (minimum configuration), which are generally selected by default.
When this step is finished, the. config will be generated
(2) Make Menuconfig
This step is optional, and you can use this step to fine-tune, add, or remove certain commands when you think there's something wrong with the above configuration.
This step is actually a modification. config
(3) make cross_compile=arm-linux-
This step is based on. config, generate BusyBox, of course you can also specify other compilers, such as arm-linux-gnueabi-. ("Make cross_compile=" will use GCC to compile the busybox running on the PC.)
Use of BusyBox
The use of BusyBox is simple and has the following three ways:
(1) after busybox directly with the order, such as
BusyBox ls
BusyBox TFTP
(2) Rename the BusyBox directly, as
CP BusyBox TFTP
CP BusyBox Tar
Then execute TFTP, tar
(3) Create Symbolic Links (symbolic link), such as
Ln-s BusyBox RM
Ln-s BusyBox Mount
Then you can execute Rm,mount and so on.
Installation of BusyBox
Of the above three methods, the third method is the most concise and convenient, but if you manually create a soft link for each command in BusyBox, it is quite a bother. To do this, BusyBox provides an automated method:
After the BusyBox compilation succeeds, the "make install" is then executed, resulting in a _install directory that contains BusyBox and soft links for each command. Just copy this directory to the target platform later on.
compilation, use and installation of BusyBox