linux如何交叉编译i2c-tools?
1. 获取源码
wget https://mirrors.edge.kernel.org/pub/software/utils/i2c-tools/i2c-tools-4.1.tar.xz
2. 解压源码
tar xvf i2c-tools-4.1.tar.gz
cd i2c-tools-4.1
3. 指定交叉编译器
export CC=aarch64-linux-gnu-gcc
export STRIP=aarch64-linux-gnu-strip
export AR=aarch64-linux-gnu-ar
4. 编译
make -j4
5. 扩展
5.1 如何使用静态库?
加入USE_STATIC_LIB=1参数,如下:
make -j4 USE_STATIC_LIB=1