USB Gadget ConfigFS in VOXL
I am trying to get the VOXL dev board to act as a HID device.
I am trying to use the USB gadget feature of ConfigFS.
As far as I can tell it doesn't look like the yocto build has this compiled in the Kernel.
I was just wondering if I have missed something or I should look into the VOXL Open Source Kernel Build
Hi @Thomas-MacNamara ,
You're likely correct (not enabled). Let me double check our flags, and also what limitations you'd hit with the open source kernel build if any (where you could modify what you needed).
Thanks mate that would be greatly appreciated!
Sorry for the lag, I'm new to the USB gadget, but here's some flags found on VOXL from our standard kernel, from
adb shell zcat /proc/config.gz
# CONFIG_USB_DWC3_GADGET is not set CONFIG_USB_GADGET=y # CONFIG_USB_GADGET_DEBUG is not set CONFIG_USB_GADGET_DEBUG_FILES=y CONFIG_USB_GADGET_DEBUG_FS=y CONFIG_USB_GADGET_VBUS_DRAW=500 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=4 # CONFIG_USB_GADGET_XILINX is not set # CONFIG_USB_GADGETFS is not set # CONFIG_USB_MIDI_GADGET is not set
I'm guessing the actually functionality isn't there though?
@modaltb I will have a look now.
Just confirmed with a colleague that you should get the same functionality level as our 'normal' kernel.
Sorry for the lag here, it took a while to get everything building (and we had a COVID lockdown as well (Australia (Queensland (It worked, no local covid) ) ) )
I have been poking around in the build scripts but to be honest this is massively out of my wheelhouse, I'm primarily a VR and Robotics developer not a Linux wizard.
I just can't quite work out where i would need to add the flags to have GADGETFS and the HID GADGET stuff compiled into the image.
I have tryied a few time but to be honist the whole build pipeline is systems built upon systems and the main documentation for Linux is just "use
makeand WHABAM you get Linux"
I know this usecase is WAY outside the norm but i figured I would at least ask
Yes, the build environment is quite complex. The environment is Yocto and there is a concept of "layers" that are combined to make the full build. We have our own layer in the build where we add all of these kinds of kernel flags. The layer is the project https://gitlab.com/voxl-public/system-image-build/meta-voxl. In there you will find examples in https://gitlab.com/voxl-public/system-image-build/meta-voxl/-/blob/master/recipes-kernel/linux-quic/linux-quic_git.bbappend. That file includes a bunch of cfg files from the files sub-directory that include the actual flags. You can just add your flags to any of those cfg files or create your own.
After no small amount of playing around and Googling I think I have hit the wall.
If I set them as = y then the build won't boot when deployed through fastboot if I set them as =m then they just stay as unset
# CONFIG_USB_CONFIGFS is not set # CONFIG_USB_GADGETFS is not set
I did check to see if the WIFI was running on the failed boots just incase the change was breaking ADB but it seems the build just does not like those flags.
It is so frustrating to know the hardware is there and the implementation is possible (Rasberry-pi HID is pritty dang easy).
Especially seeing as the underwater stuff is working.
The non USB solution is just to go via ethernet but that is just a lot of things being bolted on to the poor thing.
Thanks for the help though.