busybox fix

因为需要,要搞个busybox,中间收获如下:mount -n 就是不往/etc/mtab里面写,大家都知道mtab就是已经挂载的东西,如果etc是只读目录,那么就需要有这么项。mount -f 表示fake一下

还是看不懂这个:mount -f -t cramfs -o remount,ro /dev/mtdblock2 /为什么要加这个?注释上面写的是,re-create the /etc/mtab entries。

扫盲:shm显然就是share memory,这里实际上就是tempfs,可以在fstab等里面修改其大小。

从 http://www.busybox.net/downloads/busybox­1.1.3.tar.gz/下载 busybox­1.1.3 到/tmp 目录当中,并解压.
2.2 进入解压后的目录,配置 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  ­­­>
 
Editors  ­­­>
[*] cp
[*] cat
[*] ls
[*] mkdir 
[*] echo (basic SuSv3 version taking no options)
[*] env
[*] mv
[*] pwd
[*] rm
[*] touch
[*] 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: 相关配置文件的创建"一节会有说明
*/
2.3 编译并安装 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 复制回去就好。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值