Description
USB gadget requires specific kernel modules that may not be enabled by default. Need to ensure they're built and loaded.
Required Kernel Modules
CONFIG_USB_CONFIGFS=m
CONFIG_USB_LIBCOMPOSITE=m
CONFIG_USB_F_NCM=m
CONFIG_USB_F_ECM=m
CONFIG_USB_F_RNDIS=m
CONFIG_USB_GADGET=y
CONFIG_USB_DWC2=m
CONFIG_USB_DWC2_DUAL_ROLE=y
Implementation Approaches
1. Kernel Config Fragment
Create meta-edgeos/recipes-kernel/linux/linux-raspberrypi/usb-gadget.cfg:
CONFIG_USB_CONFIGFS=m
CONFIG_USB_LIBCOMPOSITE=m
CONFIG_USB_F_NCM=m
CONFIG_USB_F_ECM=m
CONFIG_USB_F_RNDIS=m
CONFIG_USB_F_EEM=m
CONFIG_USB_F_SUBSET=m
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_VBUS_DRAW=500
CONFIG_USB_DWC2=m
CONFIG_USB_DWC2_DUAL_ROLE=y
2. Kernel Recipe bbappend
# linux-raspberrypi_%.bbappend
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://usb-gadget.cfg"
3. Update Package Group
# packagegroup-edgeos-kernel.bb
RDEPENDS:${PN} = " \
kernel-module-libcomposite \
kernel-module-usb-f-ncm \
kernel-module-usb-f-ecm \
kernel-module-usb-f-rndis \
kernel-module-dwc2 \
"
4. Module Loading Configuration
# /etc/modules-load.d/usb-gadget.conf
dwc2
libcomposite
Acceptance Criteria
Description
USB gadget requires specific kernel modules that may not be enabled by default. Need to ensure they're built and loaded.
Required Kernel Modules
Implementation Approaches
1. Kernel Config Fragment
Create
meta-edgeos/recipes-kernel/linux/linux-raspberrypi/usb-gadget.cfg:2. Kernel Recipe bbappend
3. Update Package Group
4. Module Loading Configuration
Acceptance Criteria