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

USB stick emulation: troubles for setup prior to use the feature #6

Open
GLefebvre19 opened this issue Nov 14, 2018 · 1 comment
Open

Comments

@GLefebvre19
Copy link

I am trying to emulate a USB stick as described in section 3.4 of the documentation.

My first concern is the USB OTG support. It seems that this protocol is mostly used on embedded devices such as cellphones/tablets. Does anyone know if it can work on a server board (PC)?

My second concern was with setting CONFIG_USB_GADGETFS=m in the kernel config.
I tried to set Mass Storage Gadget as a module using menuconfig:

Device Drivers ---> USB support ---> USB Gadget Support ---> Mass Storage Gadget

but I am not sure it is the same as CONFIG_USB_GADGETFS...
Then, I followed the official CentOS documentation (here and here) to build the kernel but the build failed with errors like:

drivers/usb/gadget/configfs.c:712:2: error: initializer element is not constant
&gadget_strings_serialnumber.attr

For the record, I used: Linux CentOS75 3.10.0-862.6.3.el7.x86_64

I am new with building kernels, not to mention custom kernels, so dont hesitate to correct me if I did something wrong.

I know that these issues are not precisely labgrid related, but these steps are necessary in order to use labgrid features. I think there should be more details in the documentation, or at least point to some doc/examples.

It would also be great to specify the OS, kernel version, special hardware (if any), etc. that were used when the USB stick emulation feature was developped so that we can reproduce if needed.

Note: an e-mail was sent to @Emantor regarding the USB OTG support.

I will follow up on any useful info I get.

@GLefebvre19 GLefebvre19 changed the title USB stick emulation: examples and documentation USB stick emulation: troubles for setup prior to use the feature Nov 14, 2018
@Emantor
Copy link
Member

Emantor commented Nov 15, 2018

I am trying to emulate a USB stick as described in section 3.4 of the documentation.

My first concern is the USB OTG support. It seems that this protocol is mostly used on embedded devices such as cellphones/tablets. Does anyone know if it can work on a server board (PC)?

USB OTG requires hardware support on the board you want to use.
This feature was originally used with an Embest Riotboard.

My second concern was with setting CONFIG_USB_GADGETFS=m in the kernel config.
I tried to set Mass Storage Gadget as a module using menuconfig:

Device Drivers ---> USB support ---> USB Gadget Support ---> Mass Storage Gadget

You can check the configuration variable name by pressing '?' while your cursor is on the item.

but I am not sure it is the same as CONFIG_USB_GADGETFS...
Then, I followed the official CentOS documentation (here and here) to build the kernel but the build failed with errors like:

drivers/usb/gadget/configfs.c:712:2: error: initializer element is not constant
&gadget_strings_serialnumber.attr

For the record, I used: Linux CentOS75 3.10.0-862.6.3.el7.x86_64

Unfortunately I can't help you with the compilation errors.
USB OTG might neither be tested nor supported in the downstream CentOS kernel.
Given the hardware requirements I doubt your server board supports OTG, but I might be wrong.

I am new with building kernels, not to mention custom kernels, so dont hesitate to correct me if I did something wrong.

I know that these issues are not precisely labgrid related, but these steps are necessary in order to use labgrid features. I think there should be more details in the documentation, or at least point to some doc/examples.

It would also be great to specify the OS, kernel version, special hardware (if any), etc. that were used when the USB stick emulation feature was developed so that we can reproduce if needed.

I agree that the labgrid documentation and the USBstick emulation in particular assumes the reader to have an embedded Linux background.

As mentioned above, the hardware was a Riotboard, together with a Distrokit Board Support Package build by the PTXDist build system.
However an equivalent configuration should also be achievable by using Yocto or buildroot.

I'll leave this issue open until the usbstick emulation documentation is fixed.

@Emantor Emantor transferred this issue from labgrid-project/labgrid Jul 5, 2019
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

2 participants