# problems with USB support

## DaraMeX

Hi all

I have a very strange problem...

I'm trying to install my Creative Webcam Plus using the ov511 driver. But I'm having problems, and it seems to be due to usb support on my system. I have confirmed the following options are set in my .config:

```

CONFIG_USB=y

CONFIG_USB_DEVICEFS=y

CONFIG_USB_OV511=m

```

and fstab has the following line:

```

usbdevfs       /proc/bus/usb usbdevfs defaults    0       0

```

Somebody on #gentoo suggested I try this test:

pure root # mount -t usbfs usbstuff /mnt/point

...but I got this output:

mount: fs type usbfs not supported by kernel

anyone have any ideas? any assistance would be much appreciated :)

Thanks

----------

## NeddySeagoon

DaraMeX,

You need one of the root hub drivers too.

```
dmesg | grep hcd
```

 may show if you have OHCI or UHCI root hubs. You need (only) the correct driver for your root hubs. 

```
grep HCD .config
```

 run in the root of the kernel source tree will show you what is configured.

----------

## DaraMeX

dmesg | grep hcd had no output at all.

I have recompiled my kernel so that I now get a response:

pure linux # grep HCD .config

CONFIG_USB_EHCI_HCD=y

...altho according to the menu it appears this is exparimental? Will it make any difference?

But that does'nt seem to have gotten me any further...?

It seems that I downloaded the wrong driber from http://alpha.dyndns.org/ov511/download/2.xx/distros/ coz I get this output:

pure ov511-2.26 # modprobe ov511

/lib/modules/2.4.22-gentoo-r7/kernel/drivers/usb/ov511.o: kernel-module version mismatch

        /lib/modules/2.4.22-gentoo-r7/kernel/drivers/usb/ov511.o was compiled for kernel version 2.4.21

        while this kernel is version 2.4.22-gentoo-r7.

/lib/modules/2.4.22-gentoo-r7/kernel/drivers/usb/ov511.o: insmod /lib/modules/2.4.22-gentoo-r7/kernel/drivers/usb/ov511.o failed

/lib/modules/2.4.22-gentoo-r7/kernel/drivers/usb/ov511.o: insmod ov511 failed

How do I remove this driver? I've since downloaded what I think is the correct one ;)

Thanks

----------

## NeddySeagoon

DaraMeX,

Close but no cigar. the EHCI driver is for USB 2.0 devices. You need either OHCI or UHCI depending on your motherboard. They are for USB 1.1 devices, like your camera but support different motherboard hardware.

While you are in the kernel, configure the ov511 module too. Then the wrong one will just disappear when you rebuild your kerenl.

----------

## DaraMeX

Thanks for your help so far :)

I did compile those in too:

pure linux # grep HCI .config

CONFIG_USB_EHCI_HCD=y

CONFIG_USB_UHCI=y

CONFIG_USB_OHCI=y

I removed the OV511, ran make dep and then compiled OV511 support back in again, but still get this output:

pure ov511-2.26 # modprobe ov511 

/lib/modules/2.4.22-gentoo-r7/kernel/drivers/usb/ov511.o: kernel-module version mismatch 

/lib/modules/2.4.22-gentoo-r7/kernel/drivers/usb/ov511.o was compiled for kernel version 2.4.21 

while this kernel is version 2.4.22-gentoo-r7. 

/lib/modules/2.4.22-gentoo-r7/kernel/drivers/usb/ov511.o: insmod /lib/modules/2.4.22-gentoo-r7/kernel/drivers/usb/ov511.o failed 

/lib/modules/2.4.22-gentoo-r7/kernel/drivers/usb/ov511.o: insmod ov511 failed

How can I remove it properly?

I also still get this:

pure linux # mount -t usbfs usbstuff /mnt/point

mount: fs type usbfs not supported by kernel

Thanks ;)

----------

## NeddySeagoon

DaraMeX,

You are likely to have trouble with both USB 1.1 drivers compiled in the kernel. Do the dmesg | greps again, or run usbview and only keep the right one.

If you actually rebuilt and reinstalled your kernel you should not get the module problem you are having. Either you are building a kernel you are not running or you are missing the make modules_install step.

Do a make clean at the start of the kernel build to clean out all the rubbish.

----------

## DaraMeX

I'm trying everything...the make modules_install and everything you have suggested. USB drivers must be working because I have a usb mouse which is working ok. 

I've tried drivers 2.25, 2.26 and 2.27 from http://alpha.dyndns.org/ov511/ and all say they conflict with my kernel, which is  2.4.22-gentoo-r7. I get the same errors when trying tro modprobe ovcamchip. 

Also, you said I might not be building a kernel that I'm running. I don't think thats the case, but how can I confirm this?

Any other assistance you can give to help me get this going would be greeatly appreciated. Oh btw, I have built v4l into the kernel but have no /dev/v4l/video0 :/

Thanks!

----------

## NeddySeagoon

DaraMeX,

I've had a quick look around the web site you quote but I don't see any binary drivers. They would be called ov511.o for a 2.4 kernel. 2.27 is a source tarball.

Do 

```
uname -a
```

It will tell you the version and build date of the running kernel. Since you have been building your kernel yesterday, thats what it should be dated. Have you been remembering to mount /boot before you copy the kernel image?

Look in /boot while its not mounted. It should be empty. You can tell if /boot is really mounted because it will contain a directory called lost+found. That will be missing from the /boot mount point.

Don't worry about your missing /dev/v4l/video0. It should appear when you have a working video device.

----------

## DaraMeX

I think you've hit the nail on the head! I tried uname -a and it showed 13 April!

I did /mount /boot and then lost+found popped into /boot as you quite rightly said it would. I've then gone back to the Gentoo handbook and followed the instructions... these were the results:

make dep && make bzImage modules modules_install

[worked]

# cp arch/i386/boot/bzImage /boot/kernel-2.4.25-gentoo

cp: cannot stat `arch/i386/boot/bzImage': No such file or directory

# cp System.map /boot/System.map-2.4.25-gentoo

cp: cannot stat `System.map': No such file or directory

# cp .config /boot/config-2.4.25-gentoo

[worked]

But when doing uname -a it still shows 13 April :/ What am I doing wrong? :)

...i thought maybe I was just in the wrong dir to run the command, but when trying locate System.map it does'nt find anything. are those files on the live cd?

Thanks!

----------

## NeddySeagoon

DaraMeX,

uname -a shows you inforamtion about the running kernel.

 *Quote:*   

> # cp arch/i386/boot/bzImage /boot/kernel-2.4.25-gentoo
> 
> cp: cannot stat `arch/i386/boot/bzImage': No such file or directory

 shows that the kernel binary was not found, so it didn't get copied.

Do 

```
ls -l /usr/src
```

you should find a symbolic link called linux and a number of kernel source trees. Do not use /usr/src/linux to find your way around. Do cd /usr/src/<kernel> (tab completion is a wonderful thing).

Check your kernel configuration then do the following as seperate commands.

```
make clean

make dep

make bzImage

make modules

make modules_install 
```

now you can watch every step.

Mount /boot and do the bzImage copy. Add a new block to grub.conf file to point to your new kernel unless you really wanted to replace your old one.

If you have been adding new kernels  /boot without updating grub.conf, you will always be booting the kerenel it knows about, regardless of the content of /boot.

----------

## DaraMeX

Thanks for your help. Sorry to take so much of your time with this stupidity...

I did everything you suggested, but it cant find bzImage in /usr/src/linux-2.4.22-gentoo-r7/arch/i386/boot/ for some reason :/ So I'm doing sumthing wrong sumwhere.

When doing a 'make bzImage' I get this:

<snip>

make[4]: Entering directory `/usr/src/linux-2.4.22-gentoo-r7/drivers/usb'

make[4]: *** No rule to make target `ov511.c', needed by `/usr/src/linux-2.4.22-gentoo-r7/include/linux/modules/ov511.ver'.  Stop.

make[4]: Leaving directory `/usr/src/linux-2.4.22-gentoo-r7/drivers/usb'

make[3]: *** [_sfdep_usb] Error 2

make[3]: Leaving directory `/usr/src/linux-2.4.22-gentoo-r7/drivers'

make[2]: *** [fastdep] Error 2

make[2]: Leaving directory `/usr/src/linux-2.4.22-gentoo-r7/drivers'

make[1]: *** [_sfdep_drivers] Error 2

make[1]: Leaving directory `/usr/src/linux-2.4.22-gentoo-r7'

make: *** [dep-files] Error 2

So I'm still getting this:

pure linux-2.4.22-gentoo-r7 # uname -a

Linux pure 2.4.22-gentoo-r7 #1 SMP Tue Apr 13 21:17:31 GMT 2004 i686 AMD Athlon(tm) Processor AuthenticAMD GNU/Linux

Any ideas? :/ 

Thanks again[/code]

----------

## NeddySeagoon

DaraMeX,

You are not finding the bzImage file because of the error in the compile. It looks like your kernel source has got messed up because the message says the the kernel make process has failed.

Have messed up applying patches to the kernel? 

Save your .config file, because you can reuse that and emerge the kernel sources again. When you have a clean kernel source tree, do the build with the included ov511 driver and see how that goes.

To reuse you .config file, copy it into the top of the tree (where it normally lives) then run 

```
make oldconfig
```

this will tidy up anu loose ends in case you don't get exactly the same kernel version. It will only pause for you to answer any new config questions.

----------

## crusti

Not to derail the topic, but I noticed that at the beginning of this thread you indicate your fstab contains the line:

usbdevfs       /proc/bus/usb usbdevfs defaults    0 0

But at this link in the gentoo installation documentation it says:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8

If you need usbfs, add the following line to /etc/fstab:

none        /proc/bus/usb   usbfs         defaults      0 0

Just thought I'd throw that in there...I'm a newbie to gentoo, so I don't want to mislead.

All disclaimers claimed ;>

cheers

crusti

----------

## NeddySeagoon

crusti,

A webcam that depends on a kernel module should work with or without usbfs. Its a nice to have so that you get /proc/bus/usb/devices to see whats what.

The new usb scanner interface depends on  proc/bus/usb/devices, so its essential for that.

----------

