Including LibUSB Library in the Yocto Image

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Including LibUSB Library in the Yocto Image

4,171 Views
bharatkumarbach
Contributor III

I have included "libusb1" and "libusb-compat" in the image by doing IMAGE_INSTALL_append. After booting I see the libraries installed under "/lib".

The application has to include the libusb header file which I expect to be in the user space "/usr/include" and libraries in "/usr/lib" but they are not. Am I skipping any steps? Any alternate methods are appreciated.

Goal: To be able to use libusb API in the application and compile with the library

Yocto Image: core-image-base

Thanks

Bharat

Labels (1)
0 Kudos
4 Replies

3,335 Views
turker
Contributor IV

Have you installed development package of libusb? It should be named libusb-1.0.0-dev or something similar to that.

0 Kudos

3,335 Views
bharatkumarbach
Contributor III

Thanks for replying. There is no package named "libusb-1.0.0-dev" to be included in the yocto image atleast in the meta-openembedded layer.

Thanks

0 Kudos

3,335 Views
igorpadykov
NXP Employee
NXP Employee

Hi Bharat

 libusb  is used by "imx_usb_loader"utility developed by third parties, one

can look at its usage on

GitHub - boundarydevices/imx_usb_loader: USB & UART loader for i.MX5/6/7/8 series 

https://community.nxp.com/thread/441563 

Imx usb loader - Variscite Wiki 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

3,335 Views
bharatkumarbach
Contributor III

Thanks for the reply. I got around the issue by downloading and including the libusb.h into my project and linking against the library(libusb-1.0.so.0.1.0) in /lib besides those in /usr/lib.

I have a problem to try the method you suggested. I want it to be installed with the image and don't have access to the internet to perform 

sudo apt-get install libusb-1.0-0-dev -y

Thanks

Bharat

0 Kudos