Hello all,

My question is, is it possible to build the linux kernel for an android 
device without the usb gadget driver built-in? My motivation and what I 
have tried thus far is listed below.

I am attempting to emulate the behavior of connecting and disconnecting an 
android phone from a given host. I have looked through many methods to try 
to emulate this behavior, and the solution I am working on now is:
1. build a kernel WITHOUT support for usb gadget
2. build a kernel module that supports usb gadget
3. put together an application to insmod/rmmod the resulting kernel module

I have done all three parts, and now I am seeing kernel panics. In 
particular there are two actions that result in kernel panics
1. Plug android device WITHOUT usb gadget support into a host (the 
enumeration must be causing the panic)
2. insmod and rmmod the kernel module, then insmod it again (kernel module 
name is android.ko and the resulting kernel log messages that happen just 
before panic are below)
    [  257.163085] sysfs: cannot create duplicate filename 
'/devices/platform/omap/musb-omap2430/musb-hdrc/gadget/lun0'
    [  257.163177] Modules linked in: android(+) [last unloaded: android]

I am working with the Samsung Galaxy Nexus. I have verified the kernel 
building process and the module building process by making a stock kernel 
and a simple kernel module. So the issue IS particularly with the usb 
gadget driver module and/or the kernel without built-in android gadget usb.

Best,
Ryan Leonard

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to