zoukankan      html  css  js  c++  java
  • ok6410 android driver(4)

      Install busybox for goldfish/phone

      1. Download busybox source code

    http://www.busybox.net/

      2. Decompress busybox

    $ tar xvf busybox-1.21.0.tar.bz2 -C ~/Android/
    $ cd ~/Android/busybox-1.21.0

      3. Correct the cross compiler

    $ vim Makefile
    // add the compiler following CROSS_COMPILE
    CROSS_COMPILE ?= arm-linux-

      TIPS : You must got an cross compiler already.

      4. configure busybox

    $ make menuconfig

      If we would like to use the busybox on other platform, we should choose the following option :

    Busybox Setting --> Build Options -->
    [*] Build Busybox as a static binary (no shared libs)

      And we don't want the busybox install in our localhost system :

    General Configuration -->
    [*] Don't use /usr

      Cross Compiler prefix

    Busybox Setting --> Build Option -->
    (arm-linux-) Cross Compiler prefix

      TIPS : Check your cross compiler export path, if not, you should enter the complete path into Cross Compiler prefix.

      Save configurations.

      5. Compile the busybox

    $ make     

      Wait a minute, there would be a new executable file : busybox

      6. Push busybox to you emulator/phone

    $ adb push busybox /data/busybox

      7. Export the path to busybox

    $ export PATH=$PATH:/data/busybox

      TIPS: /data/busybox directory must already exist

      8. Install busybox

      (1) make install in localhost

    $ pwd
    ~/Android/busybox-1.21.0
    $ make install

      (2) push the /bin to emulator/phone

    // adb shell
    /# mkdir /data/busybox/bin
    // local host
    $ adb push _install/bin/ /data/busybox/bin/
     (3) export the PATH in init.rc
     TIPS:
     This part we shoult not edit the init.rc directly, the init.rc was loaded by ramdisk.img.
     It is no use to change init.rc on the rootfs.
     We can change the init.rc by gunziping the ramdisk.img and rebuild it.
     More details check :
    http://blog.csdn.net/pansing/article/details/7565923
    
    
     Or just copy the file to "/system/sbin/".





  • 相关阅读:
    java 中静态变量和实例变量之间的区别
    java 中final 引用不可变,但是引用还是可以发生变化的
    java中char和Unicode之间的关系
    java 中终止内层循环的方法
    ssh 公钥免密码登陆
    关于Python 中unicode 转码的问题
    Python中Unicode码和非Unicode码引起的错误与格式转换
    第一次写博客,怎么写?
    zookeeper实现主-从结构的一般原理
    Python中Tuple的词源有趣探索
  • 原文地址:https://www.cnblogs.com/plinx/p/3210071.html
Copyright © 2011-2022 走看看