OpenWrt Forum Archive

Topic: Adding support for USB-serial

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I want to compile a firmware with support for the usbserial kernel module, and compile a kmod-usb-serial ipkg.
I've downloaded the buildroot tarball and compiled OpenWRT once successfully.  I've had a close look at all the various makefiles, control files and Config.in files.

To do what I want to do I think I need to add appropriate entries for usbserial and associated modules to these files:
openwrt/target/linux/linux-2.4/Makefile
openwrt/target/linux/Config.in

And I need to create:
openwrt/target/linux/control/kmod-usb-serial.control

The way I understand it, the makefile will reference the module source code files contained in the /openwrt/dl/linux-2.4.30.tar.bz2 tarball that was downloaded the first time I compiled OpenWRT.

Basically I want to know - am I on the right track?  I haven't tried compiling it yet, I will do so shortly.  I'm just after some feedback - and am wondering if there's anything I missed.

If I get it right I will submit a patch

danversj wrote:

To do what I want to do I think I need to add appropriate entries for usbserial and associated modules to these files:
openwrt/target/linux/linux-2.4/Makefile
openwrt/target/linux/Config.in

And I need to create:
openwrt/target/linux/control/kmod-usb-serial.control

All right, you may also have to edit the kernel config in :
openwrt/target/linux/linux-2.4/config/

and enable the modules you want if they are not already.

danversj wrote:

If I get it right I will submit a patch

Yeah, patches are always welcome !

Thanks for your contribution

Thanks Nico
I have now edited and created all the relevant files to create the usb-serial kmod packages.
I did a make and it came up with an error saying it could not find usbserial.o.   This is because usbserial.c wasn't unpacked from the linux-2.4.30 tarball the last time I compiled because it wasn't needed.  Is there a way to tell the main makefile to unpack the .c (and any other) files that are now needed?

In the end I just deleted the build_mipsel directory.  I suppose I could have unpacked the files that were needed into the right place, but I thought I'd start again anyway.

Also, what's the preferred format of patches?  I compiled the whiterussian-rc2 tarball once then copied the whole openwrt directory tree (calling it openwrt-mod).  I am making my changes in openwrt-mod.  Should I just go into the openwrt-mod directory and do a diff against the unchanged openwrt directory?  Where should I do the diff?  And what options should I pass to diff?

As I said in my previous post, you should edit the kernel config files found in ./target/linux/linux-2.4/config/

Here's a patch below for you to apply in your openwrt-mod directory with the following command :

# patch -p1 < openwrt-kconfig-usb_serial.patch

This patch will only enable the generic USB serial converter

diff -ruN openwrt/target/linux/linux-2.4/config/brcm openwrt-mod/target/linux/linux-2.4/config/brcm
--- openwrt/target/linux/linux-2.4/config/brcm    2005-08-17 10:49:38.000000000 +0200
+++ openwrt-mod/target/linux/linux-2.4/config/brcm    2005-08-18 14:54:23.000000000 +0200
@@ -1168,7 +1168,28 @@
 #
 # USB Serial Converter support
 #
-# CONFIG_USB_SERIAL is not set
+CONFIG_USB_SERIAL=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_BELKIN is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+# CONFIG_USB_SERIAL_FTDI_SIO is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_MCT_U232 is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
+# CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OMNINET is not set
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_TIGL is not set

I can also download it, if you prefer.


You can create your patch with the following command in the parent directory of your openwrt and openwrt-mod directories:

# diff -ruN openwrt/ openwrt-mod/ > a_self_exlpanatory_name_here.patch

Hope you'll find your way through

Thanks again Nico - I should have a nice patch for you shortly.  I've compiled it successfully once with the usbserial kmod package.  Now I want to add the other drivers - and I've hit the same minor snag again when I do a 'make'.
Here's the error:

rm -rf /usr/src/whiterussian_rc2/openwrt-mod/build_mipsel/linux-2.4-brcm/linux-modules/ipkg/usb-serial-belkin
mkdir -p /usr/src/whiterussian_rc2/openwrt-mod/build_mipsel/linux-2.4-brcm/linux-modules/ipkg/usb-serial-belkin/lib/modules/2.4.30
/usr/src/whiterussian_rc2/openwrt-mod/scripts/make-ipkg-dir.sh /usr/src/whiterussian_rc2/openwrt-mod/build_mipsel/linux-2.4-brcm/linux-modules/ipkg/usb-serial-belkin ../control/kmod-usb-serial-belkin.control 2.4.30-brcm-2 mipsel
echo "Depends: kernel (2.4.30-brcm-2), kmod-usb-serial-belkin" >> /usr/src/whiterussian_rc2/openwrt-mod/build_mipsel/linux-2.4-brcm/linux-modules/ipkg/usb-serial-belkin/CONTROL/control
cp  /usr/src/whiterussian_rc2/openwrt-mod/build_mipsel/linux-2.4-brcm/modules/lib/modules/2.4.30/kernel/drivers/usb/belkin_sa.o  /usr/src/whiterussian_rc2/openwrt-mod/build_mipsel/linux-2.4-brcm/linux-modules/ipkg/usb-serial-belkin/lib/modules/2.4.30
cp: cannot stat `/usr/src/whiterussian_rc2/openwrt-mod/build_mipsel/linux-2.4-brcm/modules/lib/modules/2.4.30/kernel/drivers/usb/belkin_sa.o': No such file or directory
make[3]: *** [/usr/src/whiterussian_rc2/openwrt-mod/bin/packages/kmod-usb-serial-belkin_2.4.30-brcm-2_mipsel.ipk] Error 1

The thing is, belkin_sa.o is there, but it is in

build_mipsel/linux-2.4-brcm/modules/lib/modules/2.4.30/kernel/drivers/usb/serial/belkin_sa.o

and the makefile is looking for it in

build_mipsel/linux-2.4-brcm/modules/lib/modules/2.4.30/kernel/drivers/usb/belkin_sa.o

The same thing happened to me when I did the 'make' to include kmod-usb-serial - it was looking in the wrong place - but when I deleted the whole build_mipsel directory tree it started from scratch and everything worked - but obviously this is an inelegant fix and takes more time because everything has to be recompiled.

Update: OK typo on my part - I was referencing the wrong place in target/linux/linux-2.4/Makefile <sheepish grin>.  She's compiling again now.

(Last edited by danversj on 19 Aug 2005, 00:32)

OK, here's my patch:

diff -ruN openwrt/target/linux/Config.in openwrt-mod/target/linux/Config.in
--- openwrt/target/linux/Config.in      2005-07-08 00:06:43.000000000 +1000
+++ openwrt-mod/target/linux/Config.in  2005-08-20 08:43:39.000000000 +1000
@@ -144,6 +144,98 @@
        default m
        depends BR2_PACKAGE_KMOD_USB_CONTROLLER

+config BR2_PACKAGE_KMOD_USB_SERIAL
+       tristate "Support for USB-to-serial converters"
+       default m
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_BELKIN
+       tristate "Support for Belkin USB-to-serial converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_CYBERJACK
+       tristate "Support for cyberJack USB Chipcard Reader"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+           Driver for REINER SCT cyberJack pinpad/e-com
+           USB Chipcard Reader
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_DIGI_ACCELPORT
+       tristate "Support for Digi Accelport USB-to-Serial converter"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_EDGEPORT_TI
+       tristate "Support for Edgeport USB-to-multi-serial converter"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_EDGEPORT
+       tristate "Support for Edgeport USB-to-multi-serial converter"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_IPAQ
+       tristate "Support for Compaq iPaq"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_IR
+       tristate "Support for USB-to-IR dongles"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_KEYSPAN_PDA
+       tristate "Support for Keyspan PDA USB-to-Serial converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+           Driver for Keyspan / Xircom / Entregra USB-to-Serial converters
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_KLSI
+       tristate "Support for KLSI USB-to-Serial converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+           Driver for KLSI KL5KUSB105 chip RS232 converter
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_KOBIL_SCT
+       tristate "Support for KOBIL USB Smart Card Terminal"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_MCT_U232
+       tristate "Support for Magic Control Tecnology USB-to-Serial converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_OMNINET
+       tristate "Support for USB ZyXEL omni.net LCD PLUS ISDN Modem/TA"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_PL2303
+       tristate "Support for Prolific PL2303 USB-to-Serial converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_WHITEHEAT
+       tristate "Support for WhiteHEAT multi serial port converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+           Driver for USB ConnectTech WhiteHEAT
+           multi serial port converters
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_XIRCOM
+       tristate "Support for Xircom USB-to-Serial converter"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+           Driver for the Xircom USB-to-Serial converter
+           Based on the Keyspan PDA driver
+
 config BR2_PACKAGE_KMOD_IDE
        tristate "IDE support"
        default m
diff -ruN openwrt/target/linux/control/kmod-usb-serial-belkin.control openwrt-mod/target/linux/control/kmod-usb-serial-belkin.control
--- openwrt/target/linux/control/kmod-usb-serial-belkin.control 1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-belkin.control     2005-08-19 17:40:45.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-belkin
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for Belkin USB-to-Serial converter support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-cyberjack.control openwrt-mod/target/linux/control/kmod-usb-serial-cyberjack.control
--- openwrt/target/linux/control/kmod-usb-serial-cyberjack.control      1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-cyberjack.control  2005-08-19 17:52:22.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-cyberjack
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for REINER SCT cyberJack pinpad/e-com USB Chipcard Reader Driver
diff -ruN openwrt/target/linux/control/kmod-usb-serial-digi-accelport openwrt-mod/target/linux/control/kmod-usb-serial-digi-accelport
--- openwrt/target/linux/control/kmod-usb-serial-digi-accelport 1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-digi-accelport     2005-08-19 17:44:44.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-digi-accelport
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for Digi Accelport USB-to-Serial converter support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-edgeport-ti.control openwrt-mod/target/linux/control/kmod-usb-serial-edgeport-ti.control
--- openwrt/target/linux/control/kmod-usb-serial-edgeport-ti.control    1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-edgeport-ti.control        2005-08-19 18:14:04.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-edgeport-ti
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for Edgeport USB-to-multi-serial converter support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-edgeport.control openwrt-mod/target/linux/control/kmod-usb-serial-edgeport.control
--- openwrt/target/linux/control/kmod-usb-serial-edgeport.control       1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-edgeport.control   2005-08-19 18:12:55.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-edgeport
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for Edgeport USB-to-multi-serial converter support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-ipaq.control openwrt-mod/target/linux/control/kmod-usb-serial-ipaq.control
--- openwrt/target/linux/control/kmod-usb-serial-ipaq.control   1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-ipaq.control       2005-08-19 17:44:31.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-ipaq
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for Compaq iPaq support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-ir.control openwrt-mod/target/linux/control/kmod-usb-serial-ir.control
--- openwrt/target/linux/control/kmod-usb-serial-ir.control     1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-ir.control 2005-08-19 17:44:24.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-ir
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel modules for USB-to-IR dongle support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-keyspan-pda.control openwrt-mod/target/linux/control/kmod-usb-serial-keyspan-pda.control
--- openwrt/target/linux/control/kmod-usb-serial-keyspan-pda.control    1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-keyspan-pda.control        2005-08-19 17:46:24.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-keyspan-pda
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for Keyspan / Xircom / Entregra USB-to-Serial converter support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-klsi.control openwrt-mod/target/linux/control/kmod-usb-serial-klsi.control
--- openwrt/target/linux/control/kmod-usb-serial-klsi.control   1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-klsi.control       2005-08-19 18:40:04.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-klsi
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for KLSI KL5KUSB105 chip RS232 converter support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-kobil-sct.control openwrt-mod/target/linux/control/kmod-usb-serial-kobil-sct.control
--- openwrt/target/linux/control/kmod-usb-serial-kobil-sct.control      1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-kobil-sct.control  2005-08-19 18:41:07.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-kobil-sct
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel modules for KOBIL USB Smart Card Terminal support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-mct-u232.control openwrt-mod/target/linux/control/kmod-usb-serial-mct-u232.control
--- openwrt/target/linux/control/kmod-usb-serial-mct-u232.control       1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-mct-u232.control   2005-08-19 17:47:59.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-mct-u232
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for Magic Control Tecnology USB-to-Serial converter support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-omninet.control openwrt-mod/target/linux/control/kmod-usb-serial-omninet.control
--- openwrt/target/linux/control/kmod-usb-serial-omninet.control        1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-omninet.control    2005-08-19 17:56:39.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-omninet
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for USB ZyXEL omni.net LCD PLUS ISDN Modem/TA driver
diff -ruN openwrt/target/linux/control/kmod-usb-serial-pl2303.control openwrt-mod/target/linux/control/kmod-usb-serial-pl2303.control
--- openwrt/target/linux/control/kmod-usb-serial-pl2303.control 1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-pl2303.control     2005-08-19 17:50:19.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-pl2303
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for Prolific PL2303 USB-to-Serial converter support
diff -ruN openwrt/target/linux/control/kmod-usb-serial-whiteheat.control openwrt-mod/target/linux/control/kmod-usb-serial-whiteheat.control
--- openwrt/target/linux/control/kmod-usb-serial-whiteheat.control      1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-whiteheat.control  2005-08-19 18:04:09.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-whiteheat
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for USB ConnectTech WhiteHEAT multi serial port adaptor
diff -ruN openwrt/target/linux/control/kmod-usb-serial-xircom.control openwrt-mod/target/linux/control/kmod-usb-serial-xircom.control
--- openwrt/target/linux/control/kmod-usb-serial-xircom.control 1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial-xircom.control     2005-08-19 17:53:59.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial-xircom
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel module for Xircom USB-to-Serial converter support - based on Keyspan PDA driver
diff -ruN openwrt/target/linux/control/kmod-usb-serial.control openwrt-mod/target/linux/control/kmod-usb-serial.control
--- openwrt/target/linux/control/kmod-usb-serial.control        1970-01-01 10:00:00.000000000 +1000
+++ openwrt-mod/target/linux/control/kmod-usb-serial.control    2005-08-19 17:37:28.000000000 +1000
@@ -0,0 +1,6 @@
+Package: kmod-usb-serial
+Priority: optional
+Section: sys
+Maintainer: Dan Flett <conhoolio@hotmail.com>
+Source: buildroot internal
+Description: Kernel modules for USB-to-Serial converter support
diff -ruN openwrt/target/linux/linux-2.4/Makefile openwrt-mod/target/linux/linux-2.4/Makefile
--- openwrt/target/linux/linux-2.4/Makefile     2005-07-16 23:29:03.000000000 +1000
+++ openwrt-mod/target/linux/linux-2.4/Makefile 2005-08-20 09:30:30.000000000 +1000
@@ -106,6 +106,54 @@
 $(eval $(call KMOD_template,USB_PRINTER,usb-printer,\
        $(MODULES_DIR)/kernel/drivers/usb/printer.o \
 ,CONFIG_USB_PRINTER,kmod-usb-core,60,printer))
+$(eval $(call KMOD_template,USB_SERIAL,usb-serial,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.o \
+,CONFIG_USB_SERIAL,kmod-usb-serial,70,usbserial))
+$(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.o \
+,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial-belkin,71,belkin_sa))
+$(eval $(call KMOD_template,USB_SERIAL_WHITEHEAT,usb-serial-whiteheat,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/whiteheat.o \
+,CONFIG_USB_SERIAL_WHITEHEAT,kmod-usb-serial-whiteheat,71,whiteheat))
+$(eval $(call KMOD_template,USB_SERIAL_DIGI_ACCELEPORT,usb-serial-digi-accelport,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/digi_accelport.o \
+,CONFIG_USB_SERIAL_DIGI_ACCELPORT,kmod-usb-serial-digi-accelport,71,digi_accelport))
+$(eval $(call KMOD_template,USB_SERIAL_IPAQ,usb-serial-ipaq,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/ipaq.o \
+,CONFIG_USB_SERIAL_IPAQ,kmod-usb-serial-ipaq,71,ipaq))
+$(eval $(call KMOD_template,USB_SERIAL_IR,usb-serial-ir,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/ir-usb.o \
+,CONFIG_USB_SERIAL_IR,kmod-usb-serial-ir,71,ir-usb))
+$(eval $(call KMOD_template,USB_SERIAL_EDGEPORT,usb-serial-edgeport,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/io_edgeport.o \
+,CONFIG_USB_SERIAL_EDGEPORT,kmod-usb-serial-edgeport,71,io_edgeport))
+$(eval $(call KMOD_template,USB_SERIAL_EDGEPORT_TI,usb-serial-edgeport-ti,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/io_ti.o \
+,CONFIG_USB_SERIAL_EDGEPORT_TI,kmod-usb-serial-edgeport-ti,71,io_ti))
+$(eval $(call KMOD_template,USB_SERIAL_KEYSPAN_PDA,usb-serial-keyspan-pda,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/keyspan_pda.o \
+,CONFIG_USB_SERIAL_KEYSPAN_PDA,kmod-usb-serial-keyspan-pda,71,keyspan-pda))
+$(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.o \
+,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial-mct-U232,71,mct_u232))
+$(eval $(call KMOD_template,USB_SERIAL_KLSI,usb-serial-klsi,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/kl5kusb105.o \
+,CONFIG_USB_SERIAL_KLSI,kmod-usb-serial-klsi,71,kl5kusb105.o))
+$(eval $(call KMOD_template,USB_SERIAL_KOBIL_SCT,usb-serial-kobil-sct,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/kobil_sct.o \
+,CONFIG_USB_SERIAL_KOBIL_SCT,kmod-usb-serial-kobil-sct,71,kobil_sct))
+$(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.o \
+,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial-pl2303,71,pl2303))
+$(eval $(call KMOD_template,USB_SERIAL_CYBERJACK,usb-serial-cyberjack,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/cyberjack.o \
+,CONFIG_USB_SERIAL_CYBERJACK,kmod-usb-serial-cyberjack,71,cyberjack))
+$(eval $(call KMOD_template,USB_SERIAL_XIRCOM,usb-serial-xircom,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/keyspan_pda.o \
+,CONFIG_USB_SERIAL_XIRCOM,kmod-usb-serial-xircom,71,keyspan_pda))
+$(eval $(call KMOD_template,USB_SERIAL_OMNINET,usb-serial-omninet,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/omninet.o \
+,CONFIG_USB_SERIAL_OMNINET,kmod-usb-serial-omninet,71,omninet))
 $(eval $(call KMOD_template,IDE,ide,\
        $(MODULES_DIR)/kernel/drivers/ide/*.o \
        $(MODULES_DIR)/kernel/drivers/ide/*/*.o \
diff -ruN openwrt/target/linux/linux-2.4/config/brcm openwrt-mod/target/linux/linux-2.4/config/brcm
--- openwrt/target/linux/linux-2.4/config/brcm  2005-07-09 03:18:52.000000000 +1000
+++ openwrt-mod/target/linux/linux-2.4/config/brcm      2005-08-19 18:34:10.000000000 +1000
@@ -1131,7 +1131,43 @@
 #
 # USB Serial Converter support
 #
-# CONFIG_USB_SERIAL is not set
+CONFIG_USB_SERIAL=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_EMPEG is not set
+# CONFIG_USB_SERIAL_FTDI_SIO is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+#
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+#
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_TIGL is not set

It adds menuconfig items, kernel options, control files and compiles the kmod packages for most of the usb-serial adaptors supported by Linux.

I did the diff against the target/ directories under my unmodified openwrt directory and my modified openwrt-mod directory from the WhiteRussian_RC2 tarball.

I've tested it with with a PL2303-style usb-serial converter and it works.  The adaptors appear as /dev/usb/tts/0, /dev/usb/tts/1, etc.  I can read and write to/from them using a null-modem cable attached to my PC.  Setserial doesn't work with it, and I can't get a shell by specifying "usb/tts/0::askfirst:/bin/ash --login" in /etc/inittab, but that's a whole other story.  We've only just begun...

I've put the usb-serial kmod packages online.  I'm not sure how useful they will be to people who haven't compiled their firmware with the correct kernel options, but I thought I'd put them up anyway.

My stupid web host doesn't allow virtual directory listing, and I can't be bothered listing every single module, so here are the main ones:

kmod-usb-serial_2.4.30-brcm-2_mipsel.ipk
kmod-usb-serial-pl2303_2.4.30-brcm-2_mipsel.ipk

The others are listed here:
http://users.bigpond.net.au/flett/ipkg/Packages

Thanks for doing the work.
I started doing the same a few days ago.
However, I have a converter with a FTDI chip, which you didn't include.
I added this one and rearranged some options (usb-serial first, usb-multi-serial next, everything else at the ende)

attached is a patch against today's cvs

? control/kmod-usb-serial-belkin.control
? control/kmod-usb-serial-cyberjack.control
? control/kmod-usb-serial-digi-accelport
? control/kmod-usb-serial-edgeport-ti.control
? control/kmod-usb-serial-edgeport.control
? control/kmod-usb-serial-ftdi.control
? control/kmod-usb-serial-ipaq.control
? control/kmod-usb-serial-ir.control
? control/kmod-usb-serial-keyspan-pda.control
? control/kmod-usb-serial-klsi.control
? control/kmod-usb-serial-kobil-sct.control
? control/kmod-usb-serial-mct-u232.control
? control/kmod-usb-serial-omninet.control
? control/kmod-usb-serial-pl2303.control
? control/kmod-usb-serial-whiteheat.control
? control/kmod-usb-serial-xircom.control
? control/kmod-usb-serial.control
Index: Config.in
===================================================================
RCS file: /openwrt/openwrt/target/linux/Config.in,v
retrieving revision 1.10
diff -u -r1.10 Config.in
--- Config.in    14 Aug 2005 03:01:53 -0000    1.10
+++ Config.in    22 Aug 2005 09:55:00 -0000
@@ -206,6 +206,105 @@
     default m
     depends BR2_PACKAGE_KMOD_USB_CONTROLLER
 
+config BR2_PACKAGE_KMOD_USB_SERIAL
+       tristate "Support for USB-to-serial converters"
+       default m
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_BELKIN
+       tristate "Support for Belkin USB-to-serial converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_FTDI
+       tristate "Support for FTDI USB-to-serial converterr"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+       Driver for FTDI USB-to-serial converters
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_DIGI_ACCELPORT
+       tristate "Support for Digi Accelport USB-to-Serial converter"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_PL2303
+       tristate "Support for Prolific PL2303 USB-to-Serial converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_XIRCOM
+       tristate "Support for Xircom USB-to-Serial converter"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+           Driver for the Xircom USB-to-Serial converter
+           Based on the Keyspan PDA driver
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_KLSI
+       tristate "Support for KLSI USB-to-Serial converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+           Driver for KLSI KL5KUSB105 chip RS232 converter
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_MCT_U232
+       tristate "Support for Magic Control Technology USB-to-Serial converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_KEYSPAN_PDA
+       tristate "Support for Keyspan PDA USB-to-Serial converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+           Driver for Keyspan / Xircom / Entregra USB-to-Serial converters
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_WHITEHEAT
+       tristate "Support for WhiteHEAT multi serial port converters"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+           Driver for USB ConnectTech WhiteHEAT
+           multi serial port converters
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_EDGEPORT_TI
+       tristate "Support for Edgeport USB-to-multi-serial converter"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_EDGEPORT
+       tristate "Support for Edgeport USB-to-multi-serial converter"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_IR
+       tristate "Support for USB-to-IR dongles"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_OMNINET
+       tristate "Support for USB ZyXEL omni.net LCD PLUS ISDN Modem/TA"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_IPAQ
+       tristate "Support for Compaq iPaq"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_KOBIL_SCT
+       tristate "Support for KOBIL USB Smart Card Terminal"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+
+config BR2_PACKAGE_KMOD_USB_SERIAL_CYBERJACK
+       tristate "Support for cyberJack USB Chipcard Reader"
+       default m
+       depends BR2_PACKAGE_KMOD_USB_SERIAL
+       help
+           Driver for REINER SCT cyberJack pinpad/e-com
+           USB Chipcard Reader
+
 config BR2_PACKAGE_KMOD_IDE
     tristate "IDE support"
     default m
Index: linux-2.4/Makefile
===================================================================
RCS file: /openwrt/openwrt/target/linux/linux-2.4/Makefile,v
retrieving revision 1.36
diff -u -r1.36 Makefile
--- linux-2.4/Makefile    17 Aug 2005 19:47:34 -0000    1.36
+++ linux-2.4/Makefile    22 Aug 2005 09:55:01 -0000
@@ -118,6 +118,57 @@
 $(eval $(call KMOD_template,USB_PRINTER,usb-printer,\
     $(MODULES_DIR)/kernel/drivers/usb/printer.o \
 ,CONFIG_USB_PRINTER,kmod-usb-core,60,printer))
+$(eval $(call KMOD_template,USB_SERIAL,usb-serial,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/usbserial.o \
+,CONFIG_USB_SERIAL,kmod-usb-serial,70,usbserial))
+$(eval $(call KMOD_template,USB_SERIAL_BELKIN,usb-serial-belkin,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/belkin_sa.o \
+,CONFIG_USB_SERIAL_BELKIN,kmod-usb-serial-belkin,71,belkin_sa))
+$(eval $(call KMOD_template,USB_SERIAL_WHITEHEAT,usb-serial-whiteheat,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/whiteheat.o \
+,CONFIG_USB_SERIAL_WHITEHEAT,kmod-usb-serial-whiteheat,71,whiteheat))
+$(eval $(call KMOD_template,USB_SERIAL_DIGI_ACCELEPORT,usb-serial-digi-accelport,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/digi_accelport.o \
+,CONFIG_USB_SERIAL_DIGI_ACCELPORT,kmod-usb-serial-digi-accelport,71,digi_accelport))
+$(eval $(call KMOD_template,USB_SERIAL_IPAQ,usb-serial-ipaq,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/ipaq.o \
+,CONFIG_USB_SERIAL_IPAQ,kmod-usb-serial-ipaq,71,ipaq))
+$(eval $(call KMOD_template,USB_SERIAL_IR,usb-serial-ir,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/ir-usb.o \
+,CONFIG_USB_SERIAL_IR,kmod-usb-serial-ir,71,ir-usb))
+$(eval $(call KMOD_template,USB_SERIAL_FTDI,usb-serial-ftdi,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/ftdi_sio.o \
+,CONFIG_USB_SERIAL_IR,kmod-usb-serial-ftdi,71,ftdi_usb))
+$(eval $(call KMOD_template,USB_SERIAL_EDGEPORT,usb-serial-edgeport,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/io_edgeport.o \
+,CONFIG_USB_SERIAL_EDGEPORT,kmod-usb-serial-edgeport,71,io_edgeport))
+$(eval $(call KMOD_template,USB_SERIAL_EDGEPORT_TI,usb-serial-edgeport-ti,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/io_ti.o \
+,CONFIG_USB_SERIAL_EDGEPORT_TI,kmod-usb-serial-edgeport-ti,71,io_ti))
+$(eval $(call KMOD_template,USB_SERIAL_KEYSPAN_PDA,usb-serial-keyspan-pda,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/keyspan_pda.o \
+,CONFIG_USB_SERIAL_KEYSPAN_PDA,kmod-usb-serial-keyspan-pda,71,keyspan-pda))
+$(eval $(call KMOD_template,USB_SERIAL_MCT_U232,usb-serial-mct-u232,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/mct_u232.o \
+,CONFIG_USB_SERIAL_MCT_U232,kmod-usb-serial-mct-U232,71,mct_u232))
+$(eval $(call KMOD_template,USB_SERIAL_KLSI,usb-serial-klsi,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/kl5kusb105.o \
+,CONFIG_USB_SERIAL_KLSI,kmod-usb-serial-klsi,71,kl5kusb105.o))
+$(eval $(call KMOD_template,USB_SERIAL_KOBIL_SCT,usb-serial-kobil-sct,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/kobil_sct.o \
+,CONFIG_USB_SERIAL_KOBIL_SCT,kmod-usb-serial-kobil-sct,71,kobil_sct))
+$(eval $(call KMOD_template,USB_SERIAL_PL2303,usb-serial-pl2303,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/pl2303.o \
+,CONFIG_USB_SERIAL_PL2303,kmod-usb-serial-pl2303,71,pl2303))
+$(eval $(call KMOD_template,USB_SERIAL_CYBERJACK,usb-serial-cyberjack,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/cyberjack.o \
+,CONFIG_USB_SERIAL_CYBERJACK,kmod-usb-serial-cyberjack,71,cyberjack))
+$(eval $(call KMOD_template,USB_SERIAL_XIRCOM,usb-serial-xircom,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/keyspan_pda.o \
+,CONFIG_USB_SERIAL_XIRCOM,kmod-usb-serial-xircom,71,keyspan_pda))
+$(eval $(call KMOD_template,USB_SERIAL_OMNINET,usb-serial-omninet,\
+       $(MODULES_DIR)/kernel/drivers/usb/serial/omninet.o \
+,CONFIG_USB_SERIAL_OMNINET,kmod-usb-serial-omninet,71,omninet))
 $(eval $(call KMOD_template,IDE,ide,\
     $(MODULES_DIR)/kernel/drivers/ide/*.o \
     $(MODULES_DIR)/kernel/drivers/ide/*/*.o \
Index: linux-2.4/config/brcm
===================================================================
RCS file: /openwrt/openwrt/target/linux/linux-2.4/config/brcm,v
retrieving revision 1.12
diff -u -r1.12 brcm
--- linux-2.4/config/brcm    20 Aug 2005 20:33:58 -0000    1.12
+++ linux-2.4/config/brcm    22 Aug 2005 09:55:03 -0000
@@ -1171,7 +1171,43 @@
 #
 # USB Serial Converter support
 #
-# CONFIG_USB_SERIAL is not set
+CONFIG_USB_SERIAL=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_EMPEG is not set
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_VISOR is not set
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+#
+# CONFIG_USB_SERIAL_KEYSPAN is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+#
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_TIGL is not set

The discussion might have continued from here.