免费注册 查看新帖 |

Chinaunix

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

替换android默认的busybox [复制链接]

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

               
Installing Busybox command line tools
Installing Busybox Command Line Tools
This article describes how to install the busybox command line tools in the Android file-system.
Please note that a pre-built version of busybox has been attached to
this article if you would prefer not to build busybox yourself. To use
the pre-built version please go to "installing busybox" and "make the
busybox shell the default shell".
You can download the prebuilt version from here
www.omapzoom.org/gf/download/wikifiles/317/1354/busybox

Building Busybox
To build busybox

  •    
    Download the latest version of busybox from the following website. At the time of writing the latest version was v.1.13.3.
       

http://www.busybox.net

  •    
    Extract the busybox source:
       

tar jxf busybox-1.13.3.tar.bz2

  •    
    Configure busybox by running menuconfig
       

cd busybox-1.13.3/
make menuconfig

  •    
    In menuconfig set the following options
       

Busybox Settings --> Build Options --> Build Busybox as a static binary (no shared libs)  -  Enable this option by pressing "Y"
Busybox Settings --> Build Options --> Cross compiler prefix  -  Set this option equal to "arm-none-linux-gnueabi-"
Busybox Settings --> Installation Options --> Don't use /usr  -  Enable this option by pressing "Y"

  •    
    Export path to where the cross-compiler is located on the host, for example:
       

export PATH=/opt/arm/arm-2007q3/bin:$PATH

  •    
    Build busybox
       

make

Installing Busybox
To install busybox in the target file-system

  •    
    Create a /bin directory in the target file-system. For example:
       

mkdir //bin

  •    
    Copy the busybox binary to the /bin directory in the target file-system
       

cp busybox //bin

  •    
    Install the busybox command line tools on the target by executing the following commands:
       

cd /bin
./busybox --install

Make the Busybox shell the default shell

To make the busybox shell the default shell, edit the file "init.rc" in the target file-system as follows:

  •    
    Edit the console service so that it runs the busybox shell and not the default shell by replacing:
       

service console /system/bin/sh
With:
service console /bin/sh

  •    
    Add the path of the busybox command line tools to the system path variable by replacing:
       

export PATH /sbin:/system/sbin:/system/bin:/system/xbin
With
export PATH /bin:/sbin:/system/sbin:/system/bin:/system/xbin

               
               

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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP