UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
6,950 Views
Registered: ‎08-17-2014

USB device can't Create deivce at /dev/ automatic

I have two uImage with linux 3.8 & 3.14. When I use the 3.8 kernel to run, /dev/video0 can be made when I connect a USB Camera. But when I use the 3.14, no device is create. I must run "mdev -s" to make the device file create.

I do many test to find the error. Someone said that to add"echo /sbin/mdev > proc/sys/kernel/hotplug". I think the error isn't realated to this, because it runs ok if I don't use it in the 3.8 version. I think it doesn't detect the hotplug uevent to realize mounting the device. It must be something wrong with the kernel setting, or something changed with the two different versions. Waiting for your help, thanks a lot!

PS: In the kernel configs, I set: CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y

0 Kudos
6 Replies
Scholar milosoftware
Scholar
6,943 Views
Registered: ‎10-26-2012

Re: USB device can't Create deivce at /dev/ automatic

It is likely related to "mdev.conf" (usually in /etc/).

 

There must be lines in there to match the device. It may also need to load the device driver and firmware.

 

A line like this is needed when your camera driver was compiled as module:

 

$MODALIAS=.*    0:0 660 @modprobe "$MODALIAS"

And you'll need a line to match the device node, something like this:

 

video[0-9]    0:0 660 >v4l/

When in doubt, I route the events to a shell script that appends some information to a log file in /tmp/ using a line like this:

 

video[0-9]    0:0 660  */etc/mdev/mdev-debug.sh

0 Kudos
Highlighted
6,940 Views
Registered: ‎08-17-2014

Re: USB device can't Create deivce at /dev/ automatic

mdev.conf is must be in somewhere in the ramdisk system. But I use the same ramdisk with diferent kernel, the result is diferent.  So I doubt the kernel setting. I don't understand your way to debug, Could you explain it detailly?

0 Kudos
Scholar milosoftware
Scholar
6,918 Views
Registered: ‎10-26-2012

Re: USB device can't Create deivce at /dev/ automatic

I never use ramdisk.

 

What exactly wasn't clear?

0 Kudos
6,897 Views
Registered: ‎08-17-2014

Re: USB device can't Create deivce at /dev/ automatic

 There is no "mdev.conf" in /etc/. I write a script to the  proc/sys/kernel/hotplug, but there's nothing to do when I connect a USB device. I think it's no hotplug event.

 

0 Kudos
Scholar milosoftware
Scholar
6,892 Views
Registered: ‎10-26-2012

Re: USB device can't Create deivce at /dev/ automatic

For hotplug to work, you need a hotplug manager like mdev or udev. For embedded systems, mdev is the obvious choice.

 

At some point in initialization, some script will write "/sbin/mdev" to the hotplug sysfs file. Then mdev will handle these events by creating nodes and calling scripts.

 

You problem isn't with the kernel, it's with your root filesystem and user space applications. You say you only changed the kernel but from your message I gather that you're actually referring to a complete BSP using that kernel version.

 

 

0 Kudos
6,847 Views
Registered: ‎08-17-2014

Re: USB device can't Create deivce at /dev/ automatic

So, what can I do for it?

0 Kudos