Summary of LIBUSB Transplantation
Summarize the process and issues of porting libusb to embedded platforms in this phase:
LIBUSB offers a set of tools that are relatively capable of shielding different Linux versions, reducing the drive-porting of different platforms, providing 1.0 versions and 0.1 versions (the old way), and developers not recommending using 0.1. This use of the 1.0 version developed.
1. Include Files and downloads:
The 1.0 version has LIBUSB and Liusb-compat two modules, which are used to extend support for 0.1.
Programs can be downloaded at the following link:
http://sourceforge.net/projects/libusb/files/
I'm using libusb-1.0.19 and liusb-compat-0.1.5.
2. Cross-compilation:
Compile libusb-1.0.19 First
After decompression, perform mkdir install in libusb-1.0.19:
Note Config when you want to add –disable-udev, otherwise run-time and compile compat will have problems.
./configure--build=i686-linux--host=arm-linux--prefix= pwd/install cc=arm-linux-gcc
--disable-udev Make make
Install
Recompile Liusb-compat-0.1.5,compat relies on LIBUSB compilation results, config needs to indicate LIBUSB install directory
After decompression, perform mkdir install in liusb-compat-0.1.5:
./configure–build=i686-linux–host=arm-linux–prefix= pwd/install cc=arm-linux-gcc PKG_CONFIG_PATH=$ (LIB_USB_ INSTALL)/lib/pkgconfig
Make
Make install
"'
It is OK to put the corresponding so file in the/usr/lib directory of the file system.