BusyBox编译配置

1.  下载Busybox tar包,如busybox-1.23.0.tar.bz2。

      官网:http://www.busybox.net/

2.   make distclean;清除原有配置

      make menuconfig;  配置命令选项

      make;编译

      make install;安装编译文件,主要为bin, sbin,  linuxrc,  usr

3.   主要配置选项:

      busybox setting -> build options -> Build Busybox as a static binary (no shared libs).   选中 静态编译。

                                                         ->Cross Compiler prefix  ;交叉编译器配置。

                                -> Installation options -> BusyBox installation prefix ;默认生成命令保存位置。

                                                                       可不指定,生成后移到rootfs,若已有rootfs,可指定rootfs位置(推荐,自动完成)。

      其他选项根据需要裁剪。

      当然也可直接修改.config配置文件完成配置选项。

4.  注:此版本busybox已支持mtd-utils:flash_erase, flash_eraseall, nanddump, nandwrite, 若不支持,还需单独编译mtd-utils相关工具。

     推荐网址:http://www.crifan.com/files/doc/docbook/runtime_upgrade_linux/release/webhelp/some_note.html

                     在Linux运行期间升级Linux系统(Uboot+kernel+Rootfs)

5.  编译中一个错误:关于__user,可参考其他文件,用宏定义将__user定义为空即可。

原文地址:https://www.cnblogs.com/embedded-linux/p/4821993.html