Alan and Rajaram, thanks for your help. I have not looked at Linux
kernel builds in this detail before. I have been trying to recompile
modules for the Linaro 3.5 kernel that we adopted last year. I can see
now there is no choice but to start building kernels and modules
together. I have also ordered a copy of Rajaram's book.
For the record, here is the answer to my original question:
The config file for the running kernel on my Gumstix is
/boot/config-3.5.0+. That file includes:
CONFIG_USB_GADGET_MUSB_HDRC=y
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_OMAP2PLUS=y
# CONFIG_USB_OMAP is not set
Dereferencing those macros through the Makefile in drivers/usb/musb, I
see omap2430.o along with musb-hdrc.o, which seems to have several
source files. In /sys/devices/platform of the running Gumstix, I see
the omap2430 and musb-hdrc under that. My chip's reference manual says
it includes the Mentor Graphics MUSB HDRC OTG IP block, so all those
acronyms make sense. Finally, the call to composite_setup() is in
musb_gadget_ep0.c, function forward_to_driver(), where a gadget driver's
"setup" callback is called.
I will have to compile a kernel to debug further, and the latest code
may fix my problem once I take that step. Thanks again for your help.
Larry
On 4/28/2014 11:22 AM, Alan Stern wrote:
On Sun, 27 Apr 2014, Larry Martin wrote:
Alan is right, the code I wanted is in gadget/omap_udc.c. How/where is
that code linked?
I put in some printks and do not get the output. My new printk strings
are not in g_printer.ko, but other strings from composite.c and
printer.c are there. Grep does not hit "omap-udc" in my kernel, so I
don't think it's compiled in. But my new printk strings are not in any
gadget folder .ko. I looked at other things too but hopefully that
makes my case.
Can someone who knows this code tell me how to get my changes to
omap-udc.c into an executable? A pointer to a document would be great.
This depends on your kernel configuration. See which drivers are
enabled in the "USB Peripheral Controller" section of your .config
file, and whether or not they are configured as modules.
It's possible that some of the modules you want to change get loaded
from an initramfs image during booting.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html