一、获取源码
1. libusb
wget https://udomain.dl.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.21/libusb-1.0.21.tar.bz2
2. compat
wget https://udomain.dl.sourceforge.net/project/libusb/libusb-compat-0.1/libusb-compat-0.1.5/libusb-compat-0.1.5.tar.bz2
二、编译
1. 编译libusb-1.0.21
./configure --build=i686-linux --host=arm-linux --prefix=$(pwd)/install CC=arm-linux-androideabi-gcc --disable-udev
make
make install
cp -r install/* /home/wxx/work/android/rk3288/rk3288-android-toolchain/arm-linux-androideabi-4.9/sysroot/usr
2. 编译libusb-compat-0.1.5
./configure --build=i686-linux --host=arm-linux --prefix=$(pwd)/install CC=arm-linux-androideabi-gcc
make
make install
cp -r install/* /home/wxx/work/android/rk3288/rk3288-android-toolchain/arm-linux-androideabi-4.9/sysroot/usr
三、编译
arm-linux-androideabi-g++ -pie -fPIE -fPIC -shared -Wl,-soname,libcyusb.so -o libcyusb.so.1 libcyusb.cpp -l usb-1.0