Jump to: navigation, search

Modify configfs to enumerate USB devices from device tree nodes on mount.

Student: Jmarek
Mentors: rcn-ee
GSoC: GSoC entry


This project is currently just a proposal.


About Me

IRC: jmarek
Github: jmarek117
School: Michigan Technological University
Country: United States
Primary language: English
Typical work hours: 8AM-5PM US Eastern
Previous GSoC participation: This GSoC project is an opportunity to have a more structured introduction into participating in upstream Linux Kernel development. I have experience working on the X-ES custom kernel branch they maintain to support their products but I would like to make more broad contributions to the community.

About your project

Project name: USB configFS in device tree


To speed up the boot process by configuring USB statically in the device tree instead of it being conventionally done through a script at boot time. Goal: USB configfs in device tree such that they can be configured statically in device tree ahead of boot and speed the boot process.


I do not have a lot of experience mapping out a project over the course of 3 months and that may be reflected in the project outline. I have found 5 main goals to achieve for this project to work and have simply spaced them out equally along the timeline.

2017-06-13: Implement logging during configfs mounting to fetch device tree info
2017-06-27: Enumerate devices based on device tree information
2017-07-11: Implement comprehensive logging for debugging
2017-07-25: Run time tests for my implementation to check for improvement
2017-08-08: Finalize documentation and pull request

Experience and approach

I am a fourth year computer science student with a co-op at Extreme Engineering Solutions (X-ES). X-ES produces ruggadized single board computers that run a branch of the Linux kernel that the Linux team at X-ES develops and maintains. As an embedded systems engineer co-op on the Linux team I gained experience working with development on the Linux kernel for embedded systems. Projects I worked on included writing device drivers to interface with a chipset on a SPI bus. This project gave me exposure to working with device trees and writing device drivers to interface with systems over bus communications.

Currently, configfs does not support enumerate gadgets from the device tree. To make this change I will have to modify so that when a configfs file system is mounted, it checks the kernel's representation of the device tree for usb-device nodes and creates the appropriate files and writes the configuration information into them.

The kernel Documentation mentions that USB devices usually are not statically defined in a device tree unless they are hardwired in, but that does not necessarily mean that a break in this convention is unwelcome. That being said, this approach is unorthodox and I have not found an example which could be used to justify this approach on the basis of precedent. ePAPR 1.1 documentation, which defines device trees, does not specifically forbid statically enumerating discoverable devices in a device tree, only that nodes describing probe-able devices may not be necessary, link to documentation here.


There are many resources online to help with Linux kernel development. Elixir provides a interface to kernel source code that is easy to navigate, forums exist for all aspects of the Linux kernel and its unlikely I will run into a problem dissimilar from problems other people have had in the past. In the event that the forums are of no use there is still the mailing lists.

Documentation for the device tree is available in both the kernel source as well as through ePAPR. Examples can be found online would may help guide me should I loose my way. Configfs itself is documented well enough both on a technical level and from a usage perspective.


If successfully completed, what will its impact be on the community? Include quotes from community members who can be found on and


Why do you want to work on this project?

I want to be a contributor to the Linux kernel and this project would give me a structured introduction to the process. This project also allows me to build on my experience from working with X-ES on embedded Linux.