Riky_Xerez escribió:axl79 escribió:Voy a probar mejor primero con la Diamond que tengo algo olvidada... por lo visto también hay un port de Ubuntu 9.04, me imagino que irá bastante lenta.. pero seguro que funciona... ya os iré contando los avances...
pero según dices, los cambios a hacer son mínimos y sencillos?
Si, sólo hay que identificar el driver USB que usa la maquina, y obtener algunos datos del código fuente de los mismos... os pego las instrucciones del autor que ha dejado en su blog.
PD: El fichero que hay que cambiar, sólo tiene 100 líneas.
Q: How can I port it to a new device.
A: Well, first, you need to figure out what controller your device uses, in the case of the N900, it’s ‘musb’..
Then go to the driver code for that controller (probably in drivers/usb/gadget) and look for ‘SET_ADDRESS’. In the case of musb, it was in drivers/usb/musb/musb_gadget_ep0.c. In there it was setting the address to the USB device, so just copy that code into the psfreedom_machine.c to allow setting the address, and add a similar function to be able to retreive the address.
Then add a function to return 0 or 1 depending on whether the controller supports HIGH, FULL or LOW speed mode (go to usb_gadget_register_driver for your controller, and in the first lines, it should validate the speed argument, it will tell you which ones are acceptable), set LOW speed mode to return TRUE only if FULL speed isn’t available .
Finally, add a function to return the endpoint names.. it will usually be something like ‘epXin’ and ‘epXout’ (where X is the endpoint number), or “epXin-bulk”, etc.. look at how the driver initializes its endpoints or grep for “->name” in the file to find where it sets it…
That should be enough!
Ok this is it for now with the FAQ. Next time, I’ll tell you all about my experience, what problems I encountered and how I fixed them, maybe it will help others!