View Single Post
Old 10-27-2009, 01:27 PM   #15
scotsman
Enthusiast
scotsman doesn't litterscotsman doesn't litter
 
Posts: 32
Karma: 106
Join Date: Mar 2009
Device: irex DR1000S
USB Host Mode Modules: How to Compile?

Hi there,

sorry, it took me forever to get back on that issue.

The software side of enabling USB host seems to boil down to kernel modules. Now the DR100 ships with ehci-hcd.ko, which is a host mode driver. However, insmod ehci-hcd crashes the device.

The device emulator comes without the driver, so I could not test it there now (also, what would it do without the physical interface?).
However, the complete irex source code (linux-er...) contains a whole lot of different usb drivers (/trunk/drivers/usb/host/), and the documentation (/trunk/Documentation/usb/) explains that among these are dedicated freescale drivers for activating only one of the ports in host mode (which, if Kent is right, is what we need if the mini usb is really physically blocked from operating as host (e.g. if the power pins are not connected to the cpu, but to some battery circuit instead)), as well as instructions which modules to use if ehci-hcd does not work.

The thing to do now, then, would be to get these modules compiled for arm architecture. However, I have no real idea of how to go about it (write my own makefile, or compile the whole kernel and say "yes" to the relevant options? - if have not managed to get the kernel compile for arm isntead of x86).
Once we have the modules compiled, I could easily make a set of desktop shortcuts and shell scripts to test them on the actual device.

So we would either have to wait for me to find out that probably trivial detail, or some more able programmer who knows how to do the compiling. Any volunteers?

Correction: the relevant file is /trunk/drivers/usb/host/KConfig, where you can see all the options that presuambly are there for Kernel compilation. It includes options for enabling host mode for *both* usb ports even.

So I assume that the way to go is to compile the kernel and thereby play around with the different options. The question, however, is whether modifying the options just affects the modules (which we can then just insert), or changes something else so that we would have to reflash the kernel (which I would like to avoid).

Last edited by scotsman; 10-27-2009 at 01:46 PM. Reason: correction
scotsman is offline   Reply With Quote