Hi Linus,

W dniu 2023-11-11 o 23:02, Linus Walleij pisze:
For devices using USB gadget serial we need to probe the modules
usb_f_acm and g_serial in order, then the available UDC (USB device
controller) interface will be hooked up to a serial port as
/dev/ttyGS0. (On the host side this appears as /dev/ttyACM0
when plugging in the USB cable.)

I don't quite understand why this wasn't done before for the
module explicitly called kmod-usb-serial.

Before this patch we have to enter a console and type

   modprobe g_serial

To get a serial console on /dev/ttyGS0, after this it is
automatic.

Since you might only have the serial console, it is a bit
catch 22 to have to use a serial console to activate the
serial console.

Signed-off-by: Linus Walleij <linus.wall...@linaro.org>
---
  package/kernel/linux/modules/usb.mk | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/usb.mk 
b/package/kernel/linux/modules/usb.mk
index 0a5f5a8993c9..f54dc4380737 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -207,7 +207,7 @@ define KernelPackage/usb-gadget-serial
        $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_obex.ko \
        $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_serial.ko \
        $(LINUX_DIR)/drivers/usb/gadget/legacy/g_serial.ko
-  AUTOLOAD:=$(call AutoLoad,52,usb_f_acm)
+  AUTOLOAD:=$(call AutoLoad,52,usb_f_acm g_serial)
    $(call AddDepends/usb)
  endef
I think I know the reason why it isn't the case. kmod-usb-gadget-cdc-composite which pulls both kmod-usb-gadget-serial and kmod-usb-gadget-eth packages, and including autoprobingf g_serial within this would clash with that. I think the gadget configuration itself (apart from implementation) could be packaged separately and included as device packages, pulling needed dependencies. And something like that just appeared on Github: https://github.com/openwrt/openwrt/pull/14005/

--
Pozdrawiam/Kind regards,
Lech


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to