Re: 11.1: linux/config.h und asm/semaphore.h nicht auffindbar

Ekkard Gerlach <[email protected]> Tue, 29 Jun 2010 19:46:46 +0200
Newsgroups gmane.linux.suse.programming
Organization private
Message-ID <[email protected]>
Hallo David,

* David Haller schrieb:

[...]
> Bei 2.6 ist semaphore.h in linux/ und config.h gibt's nimmer (bzw. nur
> noch bei einzelnen Treibern "intern" für diese). Glaube autoconf.h hat
> die Funktion bekommen.

Unter Suse 9.2 (Kernel 2.6.8) lief die Webcam. Komisch.

> 
> Wo gibt's den Treiber denn? Dann guck ich mal rein.

http://www.ovcam.org/ ->  http://www.ovcam.org/ov511/

Dort unterschiedliche Treiberpakete. Ganz unten angeblich auch eines 
für 2.6.-er Kernel, bei einem make verlangen die aber alle eine config.h. 

Beim Einstecken der TerraCam USB (nicht TerraCam Pro USB!): 
usb 2-3: new full speed USB device using ohci_hcd and address 10
usb 2-3: configuration #1 chosen from 1 choice
ov511: USB OV518+ video device found
ov511: Device revision 0
ov511: Compression required with OV518...enabling
ov511: Sensor is an OV7620AE
ov511: Device at usb-0000:00:0b.0-3 registered to minor 0
usb 2-3: New USB device found, idVendor=05a9, idProduct=a518
usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-3: Product: USB Camera
usb 2-3: Manufacturer: OmniVision Technologies, Inc.
ov511: No decompressor available

Bisher war es mit einem "Hack" möglich, dass ein Modul "ovcamchip" erzeugt 
wurde, das diesen "decompressor" bedient hat. Zur Info: diese Webcam 
komprimiert den Datenstrom mit einem Chip und daher bedarf es dieses 
Modules. 

So hatte ich unter Suse 9.2 (2.6.8') kompiliert (rex3 war 100% kernel 2.6.8, später 2.6.12): 
============================================================================================
gerlach@rex3:~/install/ov511-2.27> make
    Building OVCam drivers for 2.6 kernel.
    PLEASE IGNORE THE "Overriding SUBDIRS" WARNING
make -C /lib/modules/2.6.8-24.16-default/build SUBDIRS=/home/gerlach/install/ov511-2.27 modules
make[1]: Entering directory `/usr/src/linux-2.6.8-24.16-obj/i386/default'
[...]
make -C ../../../linux-2.6.8-24.16 O=../linux-2.6.8-24.16-obj/i386/default modules
  CC [M]  /home/gerlach/install/ov511-2.27/ov511_core.o
/home/gerlach/install/ov511-2.27/ov511_core.c:1674: error: `I2C_ADAP_CLASS_CAM_DIGITAL' undeclared here (not in a function)
/home/gerlach/install/ov511-2.27/ov511_core.c:1674: error: initializer element is not constant
/home/gerlach/install/ov511-2.27/ov511_core.c:1674: error: (near initialization for `i2c_adap_template.class')
make[4]: *** [/home/gerlach/install/ov511-2.27/ov511_core.o] Fehler 1
make[3]: *** [_module_/home/gerlach/install/ov511-2.27] Fehler 2
make[2]: *** [modules] Fehler 2
make[1]: *** [modules] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.8-24.16-obj/i386/default'

Der Hack:
=========
--> This is a quick fix, simply changing I2C_ADAP_CLASS_CAM_DIGITAL to
I2C_CLASS_CAM_DIGITAL in ovfx2.c and ov511_core.c will let the drivers
compile.

n=ovfx2.c;cat $n | sed 's/I2C_ADAP_CLASS_CAM_DIGITAL/I2C_CLASS_CAM_DIGITAL/' > /tmp/~fgfg;mv /tmp/~fgfg $n
n=ov511_core.c;cat $n| sed 's/I2C_ADAP_CLASS_CAM_DIGITAL/I2C_CLASS_CAM_DIGITAL/' > /tmp/~fgfg;mv /tmp/~fgfg $n

gerlach@rex3:~/install/ov511-2.27> make
    Building OVCam drivers for 2.6 kernel.
    PLEASE IGNORE THE "Overriding SUBDIRS" WARNING
make -C /lib/modules/2.6.8-24.16-default/build SUBDIRS=/home/gerlach/install/ov511-2.27 modules
make[1]: Entering directory `/usr/src/linux-2.6.8-24.16-obj/i386/default'
make -C ../../../linux-2.6.8-24.16 O=../linux-2.6.8-24.16-obj/i386/default modules
  CC [M]  /home/gerlach/install/ov511-2.27/ov511_core.o
  CC [M]  /home/gerlach/install/ov511-2.27/ov511_decomp.o
  CC [M]  /home/gerlach/install/ov511-2.27/ov518_decomp.o
  CC [M]  /home/gerlach/install/ov511-2.27/ovcamchip_core.o
  CC [M]  /home/gerlach/install/ov511-2.27/ov6x20.o
  CC [M]  /home/gerlach/install/ov511-2.27/ov6x30.o
  CC [M]  /home/gerlach/install/ov511-2.27/ov7x10.o
  CC [M]  /home/gerlach/install/ov511-2.27/ov7x20.o
  CC [M]  /home/gerlach/install/ov511-2.27/ov76be.o
  LD [M]  /home/gerlach/install/ov511-2.27/ovcamchip.o
  LD [M]  /home/gerlach/install/ov511-2.27/ov511.o
  CC [M]  /home/gerlach/install/ov511-2.27/ovfx2.o
  CC [M]  /home/gerlach/install/ov511-2.27/saa7111-new.o
  CC [M]  /home/gerlach/install/ov511-2.27/tuner.o
  CC [M]  /home/gerlach/install/ov511-2.27/tda7313.o
  Building modules, stage 2.
  MODPOST
  CC      /home/gerlach/install/ov511-2.27/ov511.mod.o
  LD [M]  /home/gerlach/install/ov511-2.27/ov511.ko
  CC      /home/gerlach/install/ov511-2.27/ovcamchip.mod.o
  LD [M]  /home/gerlach/install/ov511-2.27/ovcamchip.ko
  CC      /home/gerlach/install/ov511-2.27/ovfx2.mod.o
  LD [M]  /home/gerlach/install/ov511-2.27/ovfx2.ko
  CC      /home/gerlach/install/ov511-2.27/saa7111-new.mod.o
  LD [M]  /home/gerlach/install/ov511-2.27/saa7111-new.ko
  CC      /home/gerlach/install/ov511-2.27/tda7313.mod.o
  LD [M]  /home/gerlach/install/ov511-2.27/tda7313.ko
  CC      /home/gerlach/install/ov511-2.27/tuner.mod.o
  LD [M]  /home/gerlach/install/ov511-2.27/tuner.ko
make[1]: Leaving directory `/usr/src/linux-2.6.8-24.16-obj/i386/default'


dann noch ein modprobe ovcamchip und schon gehts mit effectv, xawtv 

===============================

soweit meine Notizen. Ich vermute bei Suse 9.2 war noch übergangsweise 
was dabei, dass ein config.h gefunden wurde. Ich könnte meine alte 
Suse 9.2 mal hochfahren und nachsehen, bringt das was?

Ich habe hier 3 Stück von diesen Webcam's. Gerne schenke ich Dir eine.
Du schaffst das sicherlich in Kürze. 

Gruss
Ekkard

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]