meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:kernel:usb:gadget:libusbx [2026/01/10 19:39] – created niziaklinux:kernel:usb:gadget:libusbx [2026/01/10 19:55] (current) niziak
Line 1: Line 1:
 ====== libusbx ====== ====== libusbx ======
 +
 +Yocto's [[https://git.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/libusbgx|libusbgx]] provide start/stop scripts to create gadgets from schema upon system start:
 +
 +usbgx.service
 +  * /usr/bin/gadget-start
 +  * /usr/bin/gadget-stop
 +
 +gadget-start sh script:
 +  * sources config from ''/etc/default/usbgx''
 +  * iterates ''IMPORT_SCHEMAS'' and imports schemas (from path ''/etc/usbgx/${name}.schema'')
 +  * executes scripts from ''/etc/usbgx.d'' directory
 +  * iterates ''ENABLED_SCHEMAS'' and bind UDC to gadgets:
 +    * if ''UDC_FOR_SCHEMA_${schema}'' is defined, then this value is used for UDC bing
 +    * if not, first UDC listed by ''ls /sys/class/udc/'' is used
  
 ===== examples ===== ===== examples =====