移植 Busybox

下载 busybox

http://www.busybox.net/downloads/busybox­1.1.3.tar.gz/下载 busybox­1.1.3 到/tmp 目录当中,并解压.

 进入解压后的目录,配置 Busybox [arm@localhost busybox­1.1.3]$ make menuconfig Busybox Settings ­­­>

General Configuration ­­­>

[*] Support for devfs Build Options ­­­>

[*] Build BusyBox as a static binary (no shared libs)

/* 将 busybox 编译为静态连接,少了启动时找动态库的麻烦 */ [*] Do you want to build BusyBox with a Cross Compiler? (/usr/local/arm/3.3.2/bin/arm­linux­) Cross Compiler prefix

Init Utilities ­­­>

[*] init


/* 指定交叉编译工具路径 */

[*] Support reading an inittab file

/* 支持 init 读取/etc/inittab 配置文件,一定要选上 */

Shells ­­­>

Choose your default shell (ash) ­­­>

/* (X) ash 选中 ash,这样生成的时候才会生成 bin/sh 文件

* 看看我们前头的 linuxrc 脚本的头一句:

* #!/bin/sh 是由 bin/sh 来解释执行的

*/ [*] ash

Coreutils ­­­>


[*] cp

[*] cat

[*] ls

[*] mkdir

[*] echo (basic SuSv3 version taking no options) [*] env

[*] mv

[*] pwd

[*] rm [*] touch

Editors ­­­>          [*] vi

Linux System Utilities ­­­>

[*] mount [*] umount

[*] Support loopback mounts

[*] Support for the old /etc/mtab file

Networking Utilities ­­­>


[*] inetd


/*

* 支持 inetd 超级服务器

* inetd 的配置文件为/etc/inetd.conf 文件,

* "在该部分的 4: 相关配置文件的创建"一节会有说明

*/

编译并安装 Busybox

[arm@localhost busybox­1.1.3]$ make TARGET_ARCH=arm CROSS=arm­linux­ \ PREFIX=/home/arm/dev_home/rootfs/my_rootfs/ all install

PREFIX 指明安装路径:就是我们根文件系统所在路径。

*这里需要注意一点的是,只要 install busybox,我们根文件系统下先前建好的 linuxrc 就会被覆盖为一同名二进 制文件。

所以要事先备份我们自己的 linuxrc,在安装完 busybox 后,将 linuxrc 复制回去就好。

猜你喜欢

转载自www.cnblogs.com/fanweisheng/p/11105665.html
今日推荐