Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Allwinner A10/A20 devices #21

Closed
greso opened this issue Dec 7, 2014 · 5 comments
Closed

Support for Allwinner A10/A20 devices #21

greso opened this issue Dec 7, 2014 · 5 comments

Comments

@greso
Copy link
Contributor

greso commented Dec 7, 2014

Hi, I have patched USBProxy to add support for Allwinner A10/A20 based devices like Olimex lime. It obviously breaks support for all other platforms but I was not able to figure out how to do it properly.

I tested it on a cubieboard with sunxi 3.4 kernel as there seems to be no support for gadgetfs in the mainline kernel yet.

There are two patches the first one adds a compiler flag to remove "stack smashing detected" errors I got when compiling with "gcc (Ubuntu/Linaro 4.8.2-19ubuntu1) 4.8.2". The second one adds support for the sunxi based gadgetfs driver.

Patch 1: greso@a6c87a6
Patch 2: greso@6563ecf

I hope this information is useful for you even if it will become obsolete when you fix issue #1 :-)

Cheers
Sören

@jaapcrezee
Copy link
Contributor

Hello Sören,

On 12/07/14 17:40, Sören Gregor wrote:

Hi, I have patched USBProxy to add support for Allwinner A10/A20 based devices like Olimex
lime. It obviously breaks support for all other platforms but I was not able to figure out
how to do it properly.

I tested it on a cubieboard with sunxi 3.4 kernel as there seems to be no support for
gadgetfs in the mainline kernel yet.

There are two patches the first one adds a compiler flag to remove "stack smashing
detected" errors I got when compiling with "gcc (Ubuntu/Linaro 4.8.2-19ubuntu1) 4.8.2".
The second one adds support for the sunxi based gadgetfs driver.

Patch 1: greso/USBProxy@a6c87a6
greso@a6c87a6

Are you unable to find and fix the underlying issue? Just stopping the stack protector
does not seem a real fix to me.

Patch 2: greso/USBProxy@6563ecf
greso@6563ecf

Can you make some code to detect which file is present and should be used? In that case
you do not brake other devices.

Maybe Dominic has other opinions... :)

Kind regards,

Jaap Crezee

@greso
Copy link
Contributor Author

greso commented Dec 8, 2014

Hi Jaap,

I spent some more time creating a patch that detects the gadget filename to use the right endpoints:
greso@eacf3d9

I also could figure out where the stack smashing happens. There are two places where it happens:
greso@f840f66
As you see I increased the char size to 22 but I think this still is not quiet right. The char contains a string that includes a PID and I believe it could get bigger than five digits.
Here is an example string: /USBProxy(15234)-81-EP

Cheers
Sören

@dominicgs
Copy link
Contributor

Sören,

This is great stuff, thank you. Are you using the Olimex Lime board? I have one but I haven't used USBProxy with it yet.

Do you want to send me pull requests for these changes? If you send them as separate requests then I can accept the first and we can discuss the second.

Thanks,
Dominic

@greso
Copy link
Contributor Author

greso commented Dec 9, 2014

Hi Dominic,

I created the two pull requests
#22
#23

Cheers
Sören

@greso greso closed this as completed Dec 9, 2014
@dominicgs
Copy link
Contributor

Both merged, thank you very much for taking the time to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants