Android i2c-tools移植

來源:互聯網
上載者:User

標籤:https   產生   get   命令編譯   dump   oca   col   clone   table   

 一、下載I2C-tools工具:

最近在移植i2c-tools工具,:https://i2c.wiki.kernel.org/index.php/I2C_Tools;百度到了wiki中的git地址;

1  git clone git://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git -b i2c-tools-3.1

 

 

二、將git下載到external目錄下,編寫Android.mk,將其打包system.img:

Android.mk內容如下:

 1 LOCAL_PATH:= $(call my-dir) 2  3 include $(CLEAR_VARS) 4  5 LOCAL_MODULE_TAGS := optional 6 LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include 7 LOCAL_SRC_FILES := tools/i2cbusses.c tools/util.c 8 LOCAL_MODULE := i2c-tools 9 include $(BUILD_STATIC_LIBRARY)10 11 include $(CLEAR_VARS)12 13 LOCAL_MODULE_TAGS := optional14 LOCAL_SRC_FILES:=tools/i2cdetect.c15 LOCAL_MODULE:=i2cdetect16 LOCAL_CPPFLAGS += -DANDROID17 LOCAL_SHARED_LIBRARIES:=libc18 LOCAL_STATIC_LIBRARIES := i2c-tools19 LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include20 include $(BUILD_EXECUTABLE)21 22 include $(CLEAR_VARS)23 24 LOCAL_MODULE_TAGS := optional25 LOCAL_SRC_FILES:=tools/i2cget.c26 LOCAL_MODULE:=i2cget27 LOCAL_CPPFLAGS += -DANDROID28 LOCAL_SHARED_LIBRARIES:=libc29 LOCAL_STATIC_LIBRARIES := i2c-tools30 LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include31 include $(BUILD_EXECUTABLE)32 33 include $(CLEAR_VARS)34 35 LOCAL_MODULE_TAGS := optional36 LOCAL_SRC_FILES:=tools/i2cset.c37 LOCAL_MODULE:=i2cset38 LOCAL_CPPFLAGS += -DANDROID39 LOCAL_SHARED_LIBRARIES:=libc40 LOCAL_STATIC_LIBRARIES := i2c-tools41 LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include42 include $(BUILD_EXECUTABLE)43 44 include $(CLEAR_VARS)45 46 LOCAL_MODULE_TAGS := optional47 LOCAL_SRC_FILES:=tools/i2cdump.c48 LOCAL_MODULE:=i2cdump49 LOCAL_CPPFLAGS += -DANDROID50 LOCAL_SHARED_LIBRARIES:=libc51 LOCAL_STATIC_LIBRARIES := i2c-tools52 LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include53 include $(BUILD_EXECUTABLE)

然後mm命令編譯目前的目錄,產生到:

make snod編譯進板子上的system/bin目錄下;

 

 

Android下的i2c-tools使用如連結所示,就不提及了;

http://blog.csdn.net/hui872370036/article/details/50379036

 

Android i2c-tools移植

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.