I.MX6 Android busybox 从哪里生成的

/****************************************************************************
 *                 I.MX6 Android busybox 从哪里生成的
 * 说明:
 *     一直在Android中找busybox的源代码在哪里,在external文件夹下有一份busybox
 * 源代码,但是没有Android.mk,以为应该是将Android.mk文件放在了别的地方,结果
 * 找出来是别的地方放了一份编译好的busybox可执行文件。
 *
 *                                          2016-8-20 深圳 南山平山村 曾剑锋
 ***************************************************************************/


一、参考文档:
    1. 怎样判断两个bin文件,是不是同一个文件。。两个bin文件,名字不同。不知道内容是不是一样的。
        http://zhidao.baidu.com/question/486446127.html
    2. linux md5sum 的用法(转)
        http://www.cnblogs.com/chenwenbiao/archive/2012/07/10/2585507.html

二、原因:
    在~/myandroid/external/busybox目录下并没有找到对应Android.mk文件,说明busybox并不是从这份源代码中生成出来的,而是从别的地方生成的,于是得重新找busybox真是的出处。

三、cat ~/myandroid/device/fsl-proprietary/test/Android.mk
    LOCAL_PATH := $(call my-dir)
    
    include $(CLEAR_VARS)
    LOCAL_MODULE := mxc_ipudev_test
    LOCAL_MODULE_TAGS := eng
    LOCAL_MODULE_PATH := $(TARGET_OUT)/bin
    LOCAL_MODULE_CLASS := EXECUTABLES
    LOCAL_SRC_FILES :=  bin/mxc_ipudev_test
    include $(BUILD_PREBUILT)
    
    include $(CLEAR_VARS)
    LOCAL_MODULE := mxc_vpu_test
    LOCAL_MODULE_TAGS := eng
    LOCAL_MODULE_PATH := $(TARGET_OUT)/bin
    LOCAL_MODULE_CLASS := EXECUTABLES
    LOCAL_SRC_FILES :=  bin/mxc_vpu_test
    include $(BUILD_PREBUILT)
    
    include $(CLEAR_VARS)
    LOCAL_MODULE := busybox
    LOCAL_MODULE_TAGS := optional
    LOCAL_MODULE_PATH := $(TARGET_OUT)/bin
    LOCAL_MODULE_CLASS := EXECUTABLES
    LOCAL_SRC_FILES :=  bin/busybox
    include $(BUILD_PREBUILT)

四、检查两个busybox是否是同一个busybox:
    myzr@myzr:~/myandroid/device/fsl-proprietary/test/bin$ stat busybox 
      File: `busybox'
      Size: 1634104       Blocks: 3192       IO Block: 4096   regular file
    Device: 801h/2049d    Inode: 1313488     Links: 1
    Access: (0775/-rwxrwxr-x)  Uid: ( 1000/    myzr)   Gid: ( 1000/    myzr)
    Access: 2016-08-20 11:09:25.828600234 +0800
    Modify: 2014-04-11 14:10:13.000000000 +0800
    Change: 2015-04-02 14:43:27.691788786 +0800
     Birth: -
    myzr@myzr:~/myandroid/device/fsl-proprietary/test/bin$ stat /home/myzr/myandroid/out/target/product/sabresd_6dq/obj/EXECUTABLES/busybox_intermediates/busybox
      File: `/home/myzr/myandroid/out/target/product/sabresd_6dq/obj/EXECUTABLES/busybox_intermediates/busybox'
      Size: 1634104       Blocks: 3192       IO Block: 4096   regular file
    Device: 801h/2049d    Inode: 1225352     Links: 1
    Access: (0775/-rwxrwxr-x)  Uid: ( 1000/    myzr)   Gid: ( 1000/    myzr)
    Access: 2016-07-18 12:31:09.275109144 +0800
    Modify: 2016-07-18 12:31:09.255109144 +0800
    Change: 2016-07-18 12:31:09.255109144 +0800
     Birth: -
    myzr@myzr:~/myandroid/device/fsl-proprietary/test/bin$ md5sum /home/myzr/myandroid/out/target/product/sabresd_6dq/obj/EXECUTABLES/busybox_intermediates/busybox
    7acb4ae8ca9bff56200c3d8ea54926a9  /home/myzr/myandroid/out/target/product/sabresd_6dq/obj/EXECUTABLES/busybox_intermediates/busybox
    myzr@myzr:~/myandroid/device/fsl-proprietary/test/bin$ md5sum busybox 
    7acb4ae8ca9bff56200c3d8ea54926a9  busybox
    myzr@myzr:~/myandroid/device/fsl-proprietary/test/bin$ 

 

posted on 2016-08-20 11:37  zengjf  阅读(664)  评论(0编辑  收藏  举报

导航