Socket-activated FunctionFS binary descriptors
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 16.7k
- Forks
- 4.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 140
Description
USB gadgets can be implemented as userspace daemons running on top of FunctionFS. Systemd has socket-activation of such daemons built in. The very first thing that must be done by systemd is writing USB descriptors and strings to the ep0 file. The said descriptors and strings are referenced by USBFunctionDescriptors and USBFunctionStrings of the service unit associated with the socket unit in question. Both the descriptors and strings must be in binary form.
It is difficult to create the needed binary blobs on the one hand, and to inspect what is inside such blobs on the other. The latter can only be done manually with a hex viewer and USB standard.
There is a gt tool: https://github.com/kopasiak/gt and an outstanding pull request: https://github.com/kopasiak/gt/pull/8. The PR adds support to gt for creating the binary blobs with command line invocations of gt or based on a declarative config file.
The question to systemd maintainers is whether you would like similar functionality in systemd itself, so that systemd can build those binary blobs on its own based on a textual description? The standalone gt tool mentioned above seems a better place for such functionality, because it could also do the reverse: given a blob produce a textual description - the latter does not seem the right fit for systemd and seems better handled by a standalone tool. But anyway, what is your opinion?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the issue proposal and the referenced gt project and pull request #8. Determine whether descriptor construction belongs in systemd or remains external; completion would require a maintainer decision and defined implementation scope, since no systemd file, entry point, or test is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100