ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: Can't get USB Webcam to work in tskernel-2.4.26-ts11

To:
Subject: Re: [ts-7000] Re: Can't get USB Webcam to work in tskernel-2.4.26-ts11
From: David Hawkins <>
Date: Sun, 17 Jun 2007 20:12:00 -0700
> Thanks for the info. I'm back and working on this problem again. I've
> tried creating /dev/video and /dev/video0 using mknod with major=81
> and minor=0, having obtained these after googling a bit

The driver will tell you, if you know where to look ;)

cat /proc/devices

For example, on one of my x86 compact PCI systems ...

 ~]$ cat /proc/devices
Character devices:
   1 mem
   4 /dev/vc/0
   4 tty
   4 ttyS
   5 /dev/tty
   5 /dev/console
   5 /dev/ptmx
   7 vcs
  10 misc
  13 input
  29 fb
  36 netlink
128 ptm
136 pts
162 raw
180 usb
254 cobra

Block devices:
   1 ramdisk
   9 md
253 device-mapper
254 mdp
 ~]$

My custom COBRA driver is telling me its using major 254.
The minor numbers are driver specific, so it shouldn't matter.

Try modinfo on the driver, eg.

 kernel]$ modinfo cobra.ko
filename:       cobra.ko
description:    COBRA device driver module
author:         D. W. Hawkins 
license:        GPL
parm:           cobra_major:Request a specific major number
parm:           cobra_use_highmem:Allocate pages using GPF_HIGHUSER
vermagic:       2.6.9-42.0.3.EL.carma.1.3 686 REGPARM 4KSTACKS gcc-3.4
depends:
alias:          pci:v000010B5d00009054sv*sd*bc*sc*i*
 kernel]$

Yeah, ok, so I didn't put anything useful in there about
major/minor numbers, but maybe your video driver writer did :)

I suspect the fact that you can't open /dev/video has to do
with the fact that the major number is wrong. The kernel
doesn't care what you call the device node, its the major/minor
that it uses to find the driver.

You also have the source, so look for register_chrdev.
Eg. in a driver that uses dynamic major assignment in 2.4, you'd
see something like ...
        
        /* Register ourselves as a char device so that the file
         * operations can be tested.
         */
        major = register_chrdev(0, name, &fake_fops);
        if (major < 0) {
                MSG(" * major assignment failed with error
                 %d\n", major);
                return major;
        }

I think cat /proc/devices will help you enough though.

Dave





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU