Skip to content

Instantly share code, notes, and snippets.

@ABelliqueux
Created June 25, 2025 14:05
Show Gist options
  • Save ABelliqueux/c46304486ad6e49d722fceaeaaaccb1b to your computer and use it in GitHub Desktop.
Save ABelliqueux/c46304486ad6e49d722fceaeaaaccb1b to your computer and use it in GitHub Desktop.
WIP kernel config to get g_ether working on buildroot 2025.02
# USB
CONFIG_USB_SUPPORT=y
# OTG
CONFIG_USB_OTG=y
CONFIG_USB_DWCOTG=y
# USB dual-mode controller drivers
CONFIG_USB_DWC2=m
CONFIG_USB_DWC2_DUAL_ROLE=y
# Gadget mode
CONFIG_USB_GADGET
CONFIG_USB_LIBCOMPOSITE=m
CONFIG_USB_ZERO=m
CONFIG_USB_ETH=m
CONFIG_USB_ETH_RNDIS=y
@ABelliqueux
Copy link
Author

ABelliqueux commented Jun 25, 2025

Full kernel config is here : https://gist.github.com/ABelliqueux/41b9fa937cbddc0277f4f460997c646f

After boot :

modprobe gadgetfs
modprobe dwc2
modprobe libcomposite
modprobe u_ether
modprobe g_ether
# lsmod
Module                  Size  Used by
g_ether                12288  0
usb_f_rndis            20480  1 g_ether
u_ether                16384  2 g_ether,usb_f_rndis
libcomposite           49152  3 u_ether,g_ether,usb_f_rndis
dwc2                  126976  0
roles                  12288  1 dwc2

Getting :

UDC core: g_ether: couldn't find an available UDC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment