mdev usbdev device (/dev/bus/usb/) not working in Alpine 2.5.0
In Alpine Linux 2.4.x series, usb devices were created under /dev/bus/usb.
Multiple problems:
-
In 2.5.0, /dev/bus/usb is not created. It appears the mdev rules for usbdev no longer work, and the existing /lib/mdev/usbdev script is never run. It appears that for the 3.6 kernel usb devices are MDEV=#-#… For example, here’s what a catch-all (.*) mdev script says its environment is:
>DEVNAME=bus/usb/001/003 ACTION=remove HOME=/ SEQNUM=733 BUSNUM=001 MAJOR=189 MDEV=1-2 DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb1/1-2 SUBSYSTEM=usb PATH=/sbin:/bin:/usr/sbin:/usr/bin MINOR=2 DRIVER=usb TYPE=0/0/0 DEVNUM=003 PRODUCT=4d8/2/1 PWD=/dev DEVTYPE=usb_device
-
The existing /lib/mdev/usbdev script would be broken anyway, since it starts out lookng for usbdev, which will never match
>USB_PATH=$(echo $MDEV | sed -e 's/usbdev([0-9]).[0-9]/usb\1/')
Workaround:
curl —insecure https://raw.github.com/slashbeast/mdev-like-a-boss/master/helpers/catch-all >/lib/mdev/catch-all
chmod +x /lib/mdev/catch-all
Apply this patch:
--- mdev.conf.orig
+++ mdev.conf
@@ -85,8 +85,8 @@
dvb.* root:video 0660 */lib/mdev/dvbdev
# load drivers for usb devices
-usbdev[0-9].[0-9] root:root 0660 */lib/mdev/usbdev
-usbdev[0-9].[0-9]_.* root:root 0660
+# usbdev[0-9].[0-9] root:root 0660 */lib/mdev/usbdev
+# usbdev[0-9].[0-9]_.* root:root 0660
# net devices
tun[0-9]* root:root 0600 =net/
@@ -108,3 +108,6 @@
# fallback for any!device -> any/device
(.*)!(.*) root:root 0660 =%1/%2
+
+# anything else
+.* root:root 660 */lib/mdev/catch-all
(from redmine: issue id 1481, created on 2012-11-25, closed on 2012-12-26)
- Changesets:
- Revision 98a4d550 by Natanael Copa on 2012-12-05T12:02:51Z:
main/busybox-initscripts: try fix usb devices
ref #1481
- Revision b7d2c075 by Natanael Copa on 2012-12-21T16:24:01Z:
main/busybox-initscripts: try fix usb devices
ref #1481
(cherry picked from commit 98a4d550920704cf79e621714053157926dd3f52)
- Revision bd8b2176 by Natanael Copa on 2012-12-21T16:24:22Z:
main/busybox-initscripts: fix typo
(cherry picked from commit fe84c99e3fe1734640aee76a1f66c41f7a0caac8)
fixes #1481