Hi,

On 16/01/2012 08:22, [email protected] wrote:
>   I wanted to port libusb-1.0.8 on Android 2.3.5. So I tried below links:
> http://android.serverbox.ch/wp-content/uploads/2010/01/android_industrial_automation.pdf
> 
> https://github.com/hirokuma/libusb_for_android
> 
> Now, the libsub.so and lsusb.o both gets created in respective folders
> inside out directory.
> On the board, I am booting via SDCard and not able to use lsusb, it returns
> 'command not found'
> or find lsusb anywhere on SDCard.

If you just took the source code from the github, then lsusb is not
built because there is no Android.mk file to build it.

>From the Android.mk present in the libusb/ folder, you can see that only
the libusb shared library is defined.

To build lsusb as well, you will need an Android.mk file in the example
folder with something like:

-----8<-------------------------------------
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := lsusb.c

LOCAL_C_INCLUDES += external/libusb/libusb

LOCAL_SHARED_LIBRARY := libusb

LOCAL_MODULE_TAGS:= optional
LOCAL_MODULE:= lsusb

include $(BUILD_EXECUTABLE)
---------------------------------------------

Don't forget to change the libusb headers folder to match your
configuration.

You will also need to change the Android.mk file in the root directory
of libusb so that it calls your new makefile.

Maxime

-- 
Maxime Ripard, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to