当前位置: 首页 > article >正文

i2c-tools 4.3 for Android 9.0

i2c-tools 4.3

Android 9.0下编译i2c-tools 4.3

下载源码

cd external

wget https://mirrors.edge.kernel.org/pub/software/utils/i2c-tools/i2c-tools-4.3.tar.gz

tar -zxvf i2c-tools-4.3.tar.gz

增加Android.mk

Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include
LOCAL_SRC_FILES := lib/smbus.c tools/i2cbusses.c tools/util.c
LOCAL_MODULE := i2c-tools
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES:=tools/i2cdetect.c
LOCAL_MODULE:=i2cdetect
LOCAL_CPPFLAGS += -DANDROID
LOCAL_SHARED_LIBRARIES:=libc
LOCAL_STATIC_LIBRARIES := i2c-tools
LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES:=tools/i2cget.c
LOCAL_MODULE:=i2cget
LOCAL_CPPFLAGS += -DANDROID
LOCAL_SHARED_LIBRARIES:=libc
LOCAL_STATIC_LIBRARIES := i2c-tools
LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES:=tools/i2cset.c
LOCAL_MODULE:=i2cset
LOCAL_CPPFLAGS += -DANDROID
LOCAL_SHARED_LIBRARIES:=libc
LOCAL_STATIC_LIBRARIES := i2c-tools
LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES:=tools/i2cdump.c
LOCAL_MODULE:=i2cdump
LOCAL_CPPFLAGS += -DANDROID
LOCAL_SHARED_LIBRARIES:=libc
LOCAL_STATIC_LIBRARIES := i2c-tools
LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include
include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES:=tools/i2ctransfer.c
LOCAL_MODULE:=i2ctransfer
LOCAL_CPPFLAGS += -DANDROID
LOCAL_SHARED_LIBRARIES:=libc
LOCAL_STATIC_LIBRARIES := i2c-tools
LOCAL_C_INCLUDES += $(LOCAL_PATH) $(LOCAL_PATH)/$(KERNEL_DIR)/include
include $(BUILD_EXECUTABLE)

编译

#!/bin/bash

set -e
source build/envsetup.sh
lunch full_ac8257_demo_1g_32-user
mmm external/i2c-tools-4.3


http://www.kler.cn/a/389623.html

相关文章:

  • 【前端】深入浅出的React.js详解
  • 【Elasticsearch入门到落地】1、初识Elasticsearch
  • 2024年11月10日系统架构设计师考试题目回顾
  • 动态规划---解决多段图问题
  • Linux下useradd 和 adduser的区别
  • 域名服务系统DNS (Domain Name System)
  • stm32 ADC实例解析(3)-多通道采集互相干扰的问题
  • PySimpleGUI库和pymysql库
  • 探索计算机互联网的奇妙世界:从基础到前沿的无尽之旅
  • 2024 年 Java 面试正确姿势(1000+ 面试题附答案解析)
  • 算法学习第一弹——C++基础
  • Hive简介 | 体系结构
  • 青训3_1110_01 构造特定数组的逆序拼接
  • 性能飙升!时间序列+预训练强强联合,轻松迈入顶刊门槛!
  • conan2 c/c++包管理菜鸟入门
  • 使用MethodChannel与原生程序通信
  • PyQt5超详细教程终篇
  • 【Leecode】Leecode刷题之路第46天之全排列
  • InnoDB存储引擎对MVCC的实现
  • 项目管理平台盘点:2024推荐的9款优质工具
  • NLP自然语言处理:深入探索Self-Attention——自注意力机制详解
  • C语言 | Leetcode C语言题解之第551题学生出勤记录I
  • http防抖和ws防抖
  • OpenCV基础05_GUI和PyMsql
  • CVPR力推!预训练+医学图像这么玩,审稿人都得为你让条路!
  • 【SQL实验】高级查询(三)含附加数据库操作