一 环境:
主机:windows 7 64bit
运行平台:imx6ul
交叉编译工具:arm-poky-Linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 –sysroot=/opt/poky/1.8/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi
二 交叉编译
1.编译libusb-1.0.21.tar.gz
1.1下载源码
https://github.com/libusb/libusb/releases
autogen.sh
1.2.2 配置(注:创建一个安装目录, 失能udev)
./configure --host=arm-poky-linux-gnueabi --target=arm-poky-linux-gnueabi --prefix=/home/vec/usb/11/libusb-1.0.21/dir --disable-udev
1.2.3 编译
make
1.2.4 安装
make install
1.2.5将编译得到的文件(/home/vec/usb/11/libusb-1.0.21/dir下)的文件分别放入交叉编译工具对应目录下.
sudo cp -rf lib/* /opt/poky/1.8/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi/usr/lib/ sudo cp -rf include/* /opt/poky/1.8/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi/usr/include/ sudo cp -rf bin/* /opt/poky/1.8/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi/usr/bin/
其余步骤如上。
其余步骤如上。
三 移到arm板中运行

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/228725.html原文链接:https://javaforall.net
