FunctionFS descriptors and strings support#8
Open
andrzejtp wants to merge 11 commits intolinux-usb-gadgets:masterfrom
Open
FunctionFS descriptors and strings support#8andrzejtp wants to merge 11 commits intolinux-usb-gadgets:masterfrom
andrzejtp wants to merge 11 commits intolinux-usb-gadgets:masterfrom
Conversation
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
This is the placeholder for code reading/writing FunctionFS descriptors and strings. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Each skeleton provides only a placeholder for the "create" operation. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Collaborator
|
HI Andrzej, after some review I've realized that we have two issues in this file format (or actually the same issue in two instances)
|
Member
|
@andrzejtp did you get a chance to revise the changes for @kopasiak's comments? |
Contributor
Author
|
Hi Paul,
Unfortunately not.
It is likely I will not have time until September.
Andrzej
W dniu 13.07.2021 o 05:37, Paul Wise pisze:
… @andrzejtp <https://github.com/andrzejtp> did you get a chance to revise the
changes for @kopasiak <https://github.com/kopasiak>'s comments?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALETVHII4KSQ5KBD6FI5VG3TXOYIZANCNFSM4HSJLROQ>.
|
Member
|
@andrzejtp here is a ping in case you have time for this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While not strictly related to composing a gadget with ConfigFS, creating the descriptors and strings is an important step of creating custom USB gadget functions on top of FunctionFS. As such, they are a perfect target for the Gadget Tool.
Following the idea of keeping the state in a place external to gt (configfs in case of gadgets' state), the state of descriptors and strings is kept in external binary files, whose filename is specified the usual way: either explicitly with --state= or using default values.
Descriptors (interface and endpoint) and strings (languages and strings proper) are created either on the command line, or by reading from declarative config files.
Example invocation to store the descriptors in my-descs.bin:
The equivalent can be achieved with this config file:
and this command line:
Strings are created or loaded in a similar fashion:
or with a config file:
and this command line:
One thing to note with strings is that two assumptions have been made: