-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
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
- All required modules built as part of kernel
- Modules auto-load at boot
- libcomposite loads before gadget setup
- Works without manual modprobe
- Module dependencies handled correctly
- Configuration works for both RPi 4 and RPi 5
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested