BeagleBoard/GSoC/2021 Proposal/usb configfs in device tree

< BeagleBoard‎ | GSoC
Revision as of 11:44, 28 March 2021 by Satacker (talk | contribs)
Jump to: navigation, search

Proposal for Device Tree Improvement


  • Pre-application phase


  • Completed "Hello Wolrd" of cross compilation mentioned in the requirements list.
  • Sent a PR to the mentioned upstream #145

About You

About Your Project

  • Project name: USB configfs in device tree


  • ConfigFS which along with libcomposite allows to set up custom gadget. This can be achieved using simple, command line file system operation like mkdir, rmdir, ln -s, read and write. It is possible to configure usb gadget using only command line but each time after reboot user needs to recreate all gadgets once again. This means that after each reboot user needs to use commands. This is definitely not acceptable for those who used legacy gadgets and write only modprobe g_ether.
  • Also scripts can be edited and are obviously less secure.
  • Secondly it's really hard to modify such a script because many calls has hard-coded path where for example echo should be done. There is a lot of simple, but low level operations which can cause a lot of confusion for beginner.
  • This leads us to our solution of libusbgx which is a more recent version of libusbg which is no longer maintained.
  • It provides Light weight configuration files which describes composition of functions into gadget. They can be simply loaded using usbg_import_*() and exported using usbg_export_*(). This makes them easy to use equivalent of modprobe gadget_module.
  • Goal : USB configfs in device tree such that they can be configured statically in device tree ahead of boot and speed the boot process by providing configfs and using libusbgx gadget schemes
  • An example from libusbgx docs acm-ecm device

Implementation Details

  • Configure uboot with static Device trees instead of compiling it every time.
  • To compile configfs as a module with support for USB gadget creation
  • Provide libusbgx gadget schemes or configuration files
  • Add udev rules for modules
  • Implement tests for module configuration
  • Benchmark performance difference
  • Add support for gadget tools


Date Status Details
13/04/2021 to 17/05/2021 Application Review Period Right After submitting the application I will go through rigorous set of reference materials udemy course which has practical implementation with device tree. Resource 1 Resource 2 Resource 3 Resource 4
17/05/2021 to 07/06/2021 Community Bonding
  • Complete College exams , vivas, practicals and stuff
  • Make sure that stuff for project is available
  • Coding Begins
14/06/2021 Milestone #1
  • Introductory Video
  • Build and test the already present device tree files
  • Update as per mentioned kernel version and bindings as necessary
21/06/2021 Milestone #2
  • Build and Test A prototype of Device Tree
  • Configure kernel for configfs module
  • Build and test the kernel with minimal configfs implementation
28/06/2021 Milestone #3
  • Integrate libusbgx for providing configuration files
  • Configure USB Nodes in /config/devicetree using libusbgx
  • Test libusbgx and implement unit tests for functions
05/07/2021 - 10/07/2021 Milestone #4
  • Eliminate the boot scripts for usb-gadget configuration
  • Review the configurations for errors
  • Documentation for everything till now
17/07/2021 Milestone #5
  • Verify the usb functions
  • Rewrite with the changes required and verify with mentor
24/07/2021 Milestone #6
  • Integrate with libusbg gadget schemes
  • Build and test functionality on all Beagle Devices
  • Implement examples for cdc-acm-ecm
31/07/2021 - 03/07/2021 Milestone #7
  • Documentation of everything till now
  • Brief overview and discussion with mentor
  • Bring in required changes
10/08/2021 Milestone #8
  • Compile with other latest kernels
  • Test the kernel modules and Verify the functionality
  • Implement unit tests for the same
17/08/2021 Milestone #9
  • Add additional configurations for overlays
  • Document If anything remaining
  • If finished early solve the kernel bugs
24/08/2021 Milestone #10
  • Students submit final work product and final mentor evaluation
  • Completion of youtube video
31/08/2021 Milestone #11 Completion of GSoC