免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 988 | 回复: 0
打印 上一主题 下一主题

busybox 1.1.3 编译问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-01-08 20:02 |只看该作者 |倒序浏览

                按照如下方式配置busybox 1.1.3 之后,使用交叉编译工具arm-linux-gcc3.4总是报错,后来修改了一处配置就ok了,最下面的用红颜色标注的就是修改的配置,以供参考。
1.
[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: 相关配置文件的创建"一节会有说明
                                            */
    2.编译并安装 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 复制回去就好。
    make menuconfigBusybox settins -->Build options -->
  • Compile all sources at once
                   
                   
                   
                   
                   

    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/86142/showart_1783495.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP