1

I did upgrade linux kernel from 2.6 to 3.10 version In init nn 2.6 I did mount usbfs mount -t usbfs usbfs /proc/bus/usb -onodev,nosuid,noexec

To enable usbfs I did CONFIG_USB_DEVICEFS=y and CONFIG_USB_DEVICE_CLASS=y in kernel's config but they are obsolete in 3.10 kernels

So how yo emulate usbfs on 3.10 kernel? I found the folowing topic https://bugs.launchpad.net/ubuntu/+source/linux/+bug/488274

Where is adviced to make

mount --bind /dev/bus /proc/bus
ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices

but mount --bind /dev/bus /proc/bus says me

mount: special device /dev/bus does not exist

There is no /dev/bus at all

Does anybody have thoughts which can help me?

Torrius
  • 737
  • 3
  • 12
  • 20

2 Answers2

3

I had the same problem. The cause of this issue is that libusb looks in /dev/bus/usb, but recent kernels move this into sysfs under /sys/bus/usb.

What I did was ln -s /sys/bus /dev/bus to create a symlink from dev to sys so that libusb could find the usb subsystem.

Alternately, you can use a bind mount. The problem with your command is that the target mount point needs to exist before the bind mount can succeed. In this case mkdir /dev/bus.

ANjaNA
  • 1,404
  • 2
  • 16
  • 29
Guest
  • 31
  • 2
2

I had to get my C program working with my usb-attached LCD on a SuperMicro box running CentOS 7. With usbfs deprecated, the /proc/bus/usb libraries moved. In /etc/rc.local:

#
/usr/bin/mount --bind /dev/bus /proc/bus
/usr/bin/ln -s /sys/bus /dev/bus
/usr/bin/ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices

I also had to update my grub2 kernel boot parameters in /etc/default/grub (and then run grub2-mkconfig) to get my ole "eth0" naming standards back so that I can edit the network configs via the lcd panel:

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"