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

Awusb driver for FEL mode #8

Closed
wants to merge 5 commits into from
Closed

Awusb driver for FEL mode #8

wants to merge 5 commits into from

Conversation

oliv3r
Copy link
Member

@oliv3r oliv3r commented Oct 16, 2012

This is the GPL licensed (according to the sources) driver pulled from the LiveSuit.run for linux (64bit only). Code has been cleaned by checking it with checkpatch and fixed so it works with recent kernels.

This driver is intended to be used on the host desktop! With an sunxi based client connected via the USB port in FEL-mode.

@hno
Copy link
Member

hno commented Oct 16, 2012

tis 2012-10-16 klockan 07:21 -0700 skrev Oliver Schinagl:

This is the GPL licensed (according to the sources) driver pulled from
the LiveSuit.run for linux (64bit only). Code has been cleaned by
checking it with checkpatch and fixed so it works with recent kernels.

Fine, but...

a) Why at all a driver for a rare operation like FEL mode? libusb does
the job just fine.

b) If a driver, why is it doing recvmgs/sendmgs operations via ioctls?

c) ioctl numbers and structs SHOULD be in a header. Hard for
applications to make use of the driver otherwise.

d) What is the purpose of usb_param and it's related ioctls? From what I
can tell it's values are never used.

e) What is the purpose of aw_command.value? From what I can tell it's
never used?

Regards
Henrik

@amery
Copy link
Member

amery commented Oct 16, 2012

maintaining this driver would be for the sake of supporting livesuit for linux... maybe we should turn sunxi-boards into a BSP glue package and get this there... don't know :<

@oliv3r
Copy link
Member Author

oliv3r commented Oct 17, 2012

hno,

a) it's not my driver, as said i's pulled from the LiveSuit zip, right here at github: https://github.com/matson-hall/allwinner-pack-tools/blob/cubieboard/tools/Livesuit-linux.zip

That zip contains a dkpm package, which actually has the source in it, the source file has only a GPL license stamped on it.

So while I'm sure libusb does the job fine, I don't think LiveSuit for linux can use it right now. To be able to use LiveSuit for linux, I belive this IS a requirement.

b) I have no idea :) I only cleaned it up to make checkpatch happy and make sure it compiles with the err() macro removed. You'd have to ask 'cesc', allwiner or hipboi if anybody.

c) If that is a suggestion for an actual code improvement, we can work on that after the initial version has been included in sunxi-tools?

d) I take its left over from internal development? If it can be cleaned up, and LiveSuit remains working, we should clean it.

e) see d)

As said above and as amery points out, LiveSuit/FEL flash is something that, as you say, hardly ever done, but very nice to have to support it neverthless. The last thing you'd want, is for this code to get lost or unmaintained and unusable after a while, making usage of LiveSuit for linux near impossible. Even when it is only needed by 2 useres in 3 years time.

@hno
Copy link
Member

hno commented Oct 17, 2012

ons 2012-10-17 klockan 00:32 -0700 skrev Oliver Schinagl:

a) it's not my driver, as said i's pulled from the LiveSuit zip, right
here at github:
https://github.com/matson-hall/allwinner-pack-tools/blob/cubieboard/tools/Livesuit-linux.zip

That zip contains a dkpm package, which actually has the source in it,
the source file has only a GPL license stamped on it.

I understood that.

As said above and as amery points out, LiveSuit/FEL flash is something
that, as you say, hardly ever done, but very nice to have to support
it neverthless. The last thing you'd want, is for this code to get
lost or unmaintained and unusable after a while, making usage of
LiveSuit for linux near impossible. Even when it is only needed by 2
useres in 3 years time.

While I agree on this, I don't agree on this belonging in sunx-tools.
This driver is a dead end and cannot be used by anything else than
livesuit, not even needed, very poorly done and likely to change with
next release of livesuit for linux if there is any.

Regards
Henrik

@oliv3r
Copy link
Member Author

oliv3r commented Oct 22, 2012

Closing as it's being moved over to linux-sunxi/allwinner-tools#1

@oliv3r oliv3r closed this Oct 22, 2012
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

Successfully merging this pull request may close these issues.

None yet

3 participants