[DEV] PSFreedom Port
As some of you probably know, the ps3 has recently been hacked, allowing us to run unsigned code. The source code for the exploit leaked and a dev called KaKaRoTo managed to get it to run from a Nokia N900. The other day, KaKaRoTo released his source code and someone already ported it to the Palm Pre. This quick port was possible because the N900 and Palm Pre both share the same USB controller(mUSB) which happens to be the controller used by the Droid/Milestone.
This has already been posted in the droid section, but I figured I would post this in here. Maybe some of you guys can get this working on our Samsung Galaxy Spica i5700!
thanks nicholasbgr for writing this up.
-------------------
Well, first, you need to figure out what controller your device uses, in the case of the N900, it’s ‘musb’.. (Luckily we have he same controller!)
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!
-------------------
This doesn't look too hard to do either. We shouldn't need to do too many alterations to get it working on the milestone.
Here is what we apparently need to do to port it from the nokia.
And here's a link to the source code over at github:
PSFreedom
http://www.klutsh.com/
Thanks and good luck to anyone who gives this a try!