New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Webcam driver compilation on B3

Got problems with your B2 or B3? Share and get helped!
stasheck
Posts: 126
Joined: 15 Jan 2014, 13:13

Webcam driver compilation on B3

Post by stasheck »

I need some help with my fight :-)

I have (very) old QuickCam Messenger USB camera, and I wanted to make it work.

On the outside, seems to work well:

Code: Select all

[1790608.834055] usb 1-1.2: new full speed USB device number 8 using orion-ehci
[1790608.946727] STV06xx: Probing for a stv06xx device
[1790608.951641] gspca: probing 046d:08f0
[1790608.955399] STV06xx: Configuring camera
[1790608.959384] STV06xx: st6422 sensor detected
[1790608.963751] STV06xx: Initializing camera
[1790609.228364] input: STV06xx as /devices/platform/orion-ehci.0/usb1/1-1/1-1.2/input/input2
[1790609.236872] gspca: video0 created
[1790609.240682] STV06xx: Probing for a stv06xx device

Code: Select all

root@b3:~# lsusb
Bus 001 Device 008: ID 046d:08f0 Logitech, Inc. QuickCam Messenger
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
...so I went and downloaded Palantir first (http://www.fastpath.it/products/palantir/download.html). No do:

Code: Select all

# ./palantir
Mar  1 12:07:05 [config] Default config file `/usr/local/share/palantir/palantir.conf' not found
Mar  1 12:07:05 [main] -- palantir 2.8pre3 starting --
Mar  1 12:07:05 [main] Definitions for 0 devices found
Mar  1 12:07:05 [main] No serial port specified
Mar  1 12:07:05 [main] No named pipe specified
Mar  1 12:07:05 [video] Trying V4L2 interface first
Mar  1 12:07:05 [video] Driver: STV06xx
Mar  1 12:07:05 [video] Card:   Camera
Mar  1 12:07:05 [video] Bus_info:       usb-orion-ehci.0-1.2
Mar  1 12:07:05 [video] Capabilities:   video_capture readwrite streaming
Mar  1 12:07:05 [video] Video input 0: type composite ("STV06xx")
Mar  1 12:07:05 [video] control: Brightness [1:0-31/1]
Mar  1 12:07:05 [video] control: Contrast [1:0-15/1]
Mar  1 12:07:05 [video] control: Exposure [1:0-1023/1]
Mar  1 12:07:05 [video] control: Gain [1:0-255/1]
Mar  1 12:07:05 [video] available pixformat: GRBG - GRBG
Mar  1 12:07:05 [video] trying BGR3...
Mar  1 12:07:05 [video] trying YU12...
Mar  1 12:07:05 [video] trying YUYV...
Mar  1 12:07:05 [video] trying UYVY...
Mar  1 12:07:05 [video] trying BA81...
Mar  1 12:07:05 [video] trying GBRG...
Mar  1 12:07:05 [video] trying GRBG...
Mar  1 12:07:05 [video] GRBG supported with capture size 162x120
Mar  1 12:07:05 [video] trying RGGB...
Mar  1 12:07:05 [video] trying S561...
Mar  1 12:07:05 [video] No supported palette available for requested size, reverting to V4L
Mar  1 12:07:05 [video] GCAP: Invalid argument
Mar  1 12:07:05 [video] ** Fatal error: Could not get V4L1 device capabilities (running a V4L2-only driver?)
As I understand, there is "no palette" (whatever would that mean), so it tries to use V4L instead of V4L2, but fails.

Hm, ok, let's try with motion:

Code: Select all

# motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3412993 LIBAVFORMAT_BUILD 3415808
[0] Thread 1 is from /etc/motion/motion.conf
[0] motion-httpd/3.2.12 running, accepting connections
[0] motion-httpd: waiting for data on port TCP 8080
[1] Thread 1 started
[1] cap.driver: "STV06xx"
[1] cap.card: "Camera"
[1] cap.bus_info: "usb-orion-ehci.0-1.2"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Config palette index 8 (YU12) doesn't work.
[1] Supported palettes:
[1] 0: GRBG (GRBG)
[1] Unable to find a compatible palette format.
[1] ioctl (VIDIOCGCAP): Invalid argument
[1] Could not fetch initial image from camera
[1] Motion continues using width and height from config file(s)
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8081
[1] Retrying until successful connection with camera
[1] cap.driver: "STV06xx"
[1] cap.card: "Camera"
[1] cap.bus_info: "usb-orion-ehci.0-1.2"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Config palette index 8 (YU12) doesn't work.
[1] Supported palettes:
[1] 0: GRBG (GRBG)
[1] Unable to find a compatible palette format.
[1] ioctl (VIDIOCGCAP): Invalid argument
There's certainly something wrong with the driver. A bit of googling indicated that some brave soul created Linux driver for this specific camera: http://home.mag.cx/messenger/

Downloaded source to compile it, and here my problem begins:

Code: Select all

# ./quickcam.sh
-=- Logitech QuickCam USB camera driver installer -=-
Hello! I am the (hopefully) easy-to-use, fully automated
qc-usb driver installation script.
At the moment, this is experimental, and if it doesn't work,
don't hesitate to quit this with Ctrl+C and install the
driver manually.

The driver is provided in source code form, so it has to be
compiled. This should happen automatically, but it does mean
that there are some steps required before installation.

You also need to know "root" user password to test and
install the driver.

Basically you need only to keep hitting Enter whenever you
see this prompt: --->. Sometimes you're asked root password.
Pay special attention to lines beginning with [!].
It means that some trouble has been detected.

To most important location is the path to your kernel source
or headers. This can be guessed, but you can specify it by
giving it as an argument to this script like this:
        ./quickcam.sh LINUX_DIR=/usr/src/linux

If you haven't done it yet, now it would be a good moment to
take a look at file README.

Next I'm going to check if you have some important programs installed
and if they and the kernel are of suitable version.
Press Ctrl+C to quit, Enter to continue --->

./quickcam.sh
/usr/bin/whoami
/bin/su
/bin/ls
/bin/cat
/usr/bin/gcc
/usr/bin/gcc
/usr/bin/make
/bin/grep
/bin/egrep
/usr/bin/awk
/bin/sed
/usr/bin/tail
/usr/bin/head
/usr/bin/install
/usr/bin/ld
/bin/uname
/usr/bin/tr
Warning: xawtv missing
Warning: xdpyinfo missing
/bin/dmesg
/usr/bin/wc
[!] Some important programs can not be found on default path.
Probably they aren't installed.
You should install them, for example, by using apt-get or rpm.
WARNING: If you press Enter, I'll try to continue anyway,
but this probably will fail. You SHOULD press Ctrl+C now.
Press Ctrl+C to quit, Enter to continue --->
OK, since I don't want to use the camera in X, I think I can safely skip xawtv and xdpyinfo, moving forward:

Code: Select all

/bin/readlink
gcc version: Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
gcc version 4.4.5 (Debian 4.4.5-8)
gcc version: Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
gcc version 4.4.5 (Debian 4.4.5-8)
Make version: GNU Make 3.81
Linker version: GNU ld (GNU Binutils for Debian) 2.20.1-system.20100303
Kernel compiler: carl@excito.com) (gcc version 4.4.5 (Debian 4.4.5-8)
[!] Kernel compiler and gcc seem to be different versions.
Instead, they should be the same. If you have many compilers
installed, you can specify the correct one with command (in bash)
        export CC=kgcc
before trying to install the driver. Replace kgcc with the command
required for compiling kernels (kgcc is often used in Red Hat systems).
WARNING: If you press Enter, I'll try to continue anyway,
but this probably will fail. You SHOULD press Ctrl+C now.
I'm actually not sure why the installed thinks kernel was built with different GCC than the one on the system - looks same to me. Let's continue:

Code: Select all

Looking for more necessary programs...
Found program /sbin/depmod
Found program /sbin/insmod
Found program /sbin/rmmod
Found program /sbin/modprobe
Found program /bin/mount
Found program /usr/sbin/lsusb
depmod version: module-init-tools 3.12
insmod version: module-init-tools version 3.12
rmmod version: module-init-tools version 3.12
modprobe version: module-init-tools version 3.12
Checking whether we're root... root
[!] Running script as root.
You shouldn't run this script as root. It should work,
but is unsafe. Please run this as an ordinary user.
When root access is really needed, you will be prompted
for the root password.
WARNING: If you press Enter, I'll try to continue anyway,
but this probably will fail. You SHOULD press Ctrl+C now.
Press Ctrl+C to quit, Enter to continue --->

Checking for driver source code...
Checking for write permission...

Previous round done. Now checking if you have kernel source installed.
Kernel source directory: /lib/modules/2.6.39.4-11/build

[!] Can not find kernel source or even headers.
Make sure that they are installed (install with e.g. rpm or apt-get
if necessary) and ensure that you have read rights to the files.
WARNING: If you press Enter, I'll try to continue anyway,
but this probably will fail. You SHOULD press Ctrl+C now.
Press Ctrl+C to quit, Enter to continue --->
This looks a bit bad - I've checked the script and it wants to find header file linux/videodev.h, which is absent from bubba-kernel source. Let's try to move forward anyways:

Code: Select all

Detected kernel version is 2.6.x.
[!] Kernel source is not configured properly.
[: 435: y: unexpected operator
You have only kernel headers but they are not configured
properly. It's pointless trying to continue, this won't work.
Either install properly configured kernel headers or full
source with kernel configuration file. In the latter case
I can configure the kernel source using the configuration
file automatically.
WARNING: If you press Enter, I'll try to continue anyway,
but this probably will fail. You SHOULD press Ctrl+C now.
Intermission: I tried to configure kernel on instincts alone (full disclosure: I barely ever compiled my own kernel), so I just copied the current kernel config in kernel source dir, run make oldconfig, then make prepare failed with the following:

Code: Select all

# make prepare
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: *** No rule to make target `arch/arm/tools/gen-mach-types', needed by `include/generated/mach-types.h'.  Stop.
make: *** [archprepare] Error 2
I've no idea how to fix that, so I left it at that. Back to driver install script:

Code: Select all

Couldn't find KERNEL_UTS version
And that's about it, the installed quits. Since you can also try to build the drive using make install, I tried that - output below:

Code: Select all

# make install
make -C "/lib/modules/2.6.39.4-11/build" SUBDIRS="/home/stan/downloads/qc-usb-messenger-1.8" modules V=1 USER_OPT="-DHAVE_UTSRELEASE_H="
make[1]: Entering directory `/usr/src/bubba3-kernel-headers'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
        echo;                                                           \
        echo "  ERROR: Kernel configuration is invalid.";               \
        echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
        echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
        echo;                                                           \
        /bin/false)
mkdir -p /home/stan/downloads/qc-usb-messenger-1.8/.tmp_versions ; rm -f /home/stan/downloads/qc-usb-messenger-1.8/.tmp_versions/*
make -f scripts/Makefile.build obj=/home/stan/downloads/qc-usb-messenger-1.8
  gcc -Wp,-MD,/home/stan/downloads/qc-usb-messenger-1.8/.qc-driver.o.d  -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/4.4.5/include -I/usr/src/bubba3-kernel-headers/arch/arm/include -Iinclude  -include include/generated/autoconf.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-kirkwood/include -Iarch/arm/plat-orion/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -marm -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=xscale -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DNOKERNEL -DHAVE_UTSRELEASE_H=  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(qc_driver)"  -D"KBUILD_MODNAME=KBUILD_STR(qcmessenger)" -c -o /home/stan/downloads/qc-usb-messenger-1.8/qc-driver.o /home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c
In file included from /home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:47:
/home/stan/downloads/qc-usb-messenger-1.8/quickcam.h:95:28: error: linux/autoconf.h: No such file or directory
/home/stan/downloads/qc-usb-messenger-1.8/quickcam.h:113:28: error: linux/videodev.h: No such file or directory
In file included from /home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:47:
/home/stan/downloads/qc-usb-messenger-1.8/quickcam.h:561: error: field ‘vpic’ has incomplete type
/home/stan/downloads/qc-usb-messenger-1.8/quickcam.h:563: error: field ‘vwin’ has incomplete type
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:52:74: error: operator '==' has no left operand
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:71:28: error: linux/smp_lock.h: No such file or directory
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:228: warning: type defaults to ‘int’ in declaration of ‘DECLARE_MUTEX’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:228: warning: parameter names (without types) in function declaration
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_lock’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:588: error: ‘quickcam_list_lock’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:588: error: (Each undeclared identifier is reported only once
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:588: error: for each function it appears in.)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_proc_read’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:960: error: ‘UTS_RELEASE’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:1057: error: ‘quickcam_list_lock’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_proc_button_read’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:1090: error: ‘quickcam_list_lock’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_proc_create’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:1127: error: ‘struct proc_dir_entry’ has no member named ‘owner’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:1140: error: ‘struct proc_dir_entry’ has no member named ‘owner’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_proc_init’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:1182: error: ‘struct proc_dir_entry’ has no member named ‘owner’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:1188: error: ‘struct proc_dir_entry’ has no member named ‘owner’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_frame_exit’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:1619: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:1630: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_frame_get’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:1659: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:1666: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_v4l_poll’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2625: error: ‘struct video_device’ has no member named ‘priv’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_v4l_init’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2652: error: ‘VIDEO_PALETTE_RGB24’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_v4l_open’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2677: error: ‘struct video_device’ has no member named ‘priv’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2688: error: ‘quickcam_list_lock’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2693: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2708: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2714: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2716: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_v4l_close’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2742: error: ‘struct video_device’ has no member named ‘priv’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2750: error: ‘quickcam_list_lock’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2752: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2767: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_v4l_read’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2791: error: ‘struct video_device’ has no member named ‘priv’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2804: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2826: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_v4l_mmap’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2848: error: ‘struct video_device’ has no member named ‘priv’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2855: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2862: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_v4l_ioctl’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2880: error: ‘struct video_device’ has no member named ‘priv’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2884: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2892: error: ‘VIDIOCGCAP’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2894: error: storage size of ‘b’ isn’t known
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2898: error: ‘struct video_device’ has no member named ‘type’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2894: warning: unused variable ‘b’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2914: error: ‘VIDIOCGCHAN’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2916: error: storage size of ‘v’ isn’t known
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2928: error: ‘VIDEO_TYPE_CAMERA’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2916: warning: unused variable ‘v’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2935: error: ‘VIDIOCSCHAN’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2956: error: ‘VIDIOCGPICT’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2964: error: ‘VIDIOCSPICT’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2966: error: storage size of ‘p’ isn’t known
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:2966: warning: unused variable ‘p’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3005: error: ‘VIDIOCSWIN’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3007: error: storage size of ‘vw’ isn’t known
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3007: warning: unused variable ‘vw’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3024: error: ‘VIDIOCGWIN’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3053: error: ‘VIDIOCGMBUF’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3055: error: storage size of ‘vm’ isn’t known
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3055: warning: unused variable ‘vm’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3076: error: ‘VIDIOCMCAPTURE’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3078: error: storage size of ‘vm’ isn’t known
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3078: warning: unused variable ‘vm’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3107: error: ‘VIDIOCSYNC’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3116: error: ‘VIDIOCGFBUF’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3118: error: storage size of ‘vb’ isn’t known
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3118: warning: unused variable ‘vb’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3126: error: ‘VIDIOCKEY’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3132: error: ‘VIDIOCCAPTURE’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3138: error: ‘VIDIOCSFBUF’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3144: error: ‘VIDIOCGTUNER’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3145: error: ‘VIDIOCSTUNER’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3151: error: ‘VIDIOCGFREQ’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3152: error: ‘VIDIOCSFREQ’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3158: error: ‘VIDIOCGAUDIO’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3159: error: ‘VIDIOCSAUDIO’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3455: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: At top level:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3479: error: unknown field ‘ioctl’ specified in initializer
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3479: warning: initialization from incompatible pointer type
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3487: error: unknown field ‘type’ specified in initializer
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3487: error: ‘VID_TYPE_CAPTURE’ undeclared here (not in a function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3494: warning: initialization from incompatible pointer type
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_usb_init’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3550: error: ‘quickcam_list_lock’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3556: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3559: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3564: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3591: error: implicit declaration of function ‘init_MUTEX_LOCKED’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3665: error: ‘struct input_dev’ has no member named ‘private’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3739: error: ‘struct video_device’ has no member named ‘priv’
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3772: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3784: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_usb_probe’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:3949: error: ‘UTS_RELEASE’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c: In function ‘qc_usb_disconnect’:
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:4060: error: ‘quickcam_list_lock’ undeclared (first use in this function)
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:4062: error: request for member ‘counter’ in something not a structure or union
/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.c:4075: error: request for member ‘counter’ in something not a structure or union
make[2]: *** [/home/stan/downloads/qc-usb-messenger-1.8/qc-driver.o] Error 1
make[1]: *** [_module_/home/stan/downloads/qc-usb-messenger-1.8] Error 2
make[1]: Leaving directory `/usr/src/bubba3-kernel-headers'
make: *** [qcmessenger.ko] Error 2
I know there is quite a number of hackers in here, so could you please explain what I'm doing wrong and how to fix that?
stasheck
Posts: 126
Joined: 15 Jan 2014, 13:13

Re: Webcam driver compilation on B3

Post by stasheck »

Guys, is it TL;DR? I mean: I think the problem is quite simple for someone who compiled more drivers&kernels that I did.

I think that, for one, Gordon would probably be able to help me, and I'd learn much in the process... But anyone else is welcome, too.

Please help me. At least point me to a direction.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Webcam driver compilation on B3

Post by Ubi »

Hi

There are no paid support people on this forum, so you need to hope somebody is interested in your problem, and has the time to dive into it. In this case it seems there isnt. Too bad. Don't expect people to drop everything and bow to your every need in their spare time.
stasheck
Posts: 126
Joined: 15 Jan 2014, 13:13

Re: Webcam driver compilation on B3

Post by stasheck »

Hi Ubi,
I don't think I deserve your ridicule. I didn't said anywhere that I _expect_ help, nor I want or need anyone to "bow" to my needs. It happened that I helped many people with problems that were not particularly interesting for me, but I had the knowledge and I shared it, so I think asking for help with a somewhat generic issue is not too far fetched.

I might have made a mistake of writing the first post with all the information I had, instead of "Guys, I can't compile the driver", which might've made it suffer from TL;DR syndrome; well, that may be 'too bad'.

If you have a look at my posts you will find that while I'm not in this community for long, I already tried to prepare a guide for others.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Webcam driver compilation on B3

Post by Ubi »

I'm not ridiculing anyone, but I do object that you specifically point out that a specific contributor on this forum should help you. You also state that the problem is 'quite simple' but apparently too difficult for you. This points towards that you do not want to put the sweat and elbow grease into solving your own problem but rather have others do it for you. These others were not born with this knowledge. They learned it by solving these problems themselves. If you really want to learn something, try and solve it yourself.
stasheck
Posts: 126
Joined: 15 Jan 2014, 13:13

Re: Webcam driver compilation on B3

Post by stasheck »

Doesn't it ever happen to you to encounter a problem that seems quite trivial for a person with specific knowledge, but might be a bit hard for you solve? Do you know how to perfectly hammer forge a knife? I don't, but I know people for who it would be very easy. I can start to learn, but without help it will take me, say, a year to learn; with help, I can reduce it to 1 month.

I wasn't asking for solution, I'm asking for advice. And yes, I named Gordon, because I saw many times that he's ultra-helpful and friendly, and always willing to share. And the only reason for naming him was "Hey, I know I made a long post, but I really ask you to have a look at it". I can agree that I could PM him to ask for help.

And of course, if you know that someone is most probably able to help you, but you don't want to ask him specifically for help, feel free to do so. I will continue to ask specific people for help if I suspect they are able to help me. Especially when I observe friendly atmosphere on a forum, and solution to my quite generic issue may help other people.

Gordon: if you feel it was inappropriate for me to ask for your assistance, please accept my apologies.
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Webcam driver compilation on B3

Post by Gordon »

Did not read before. Not because it was too long but simply because I didn't open the thread.

No help with the camera, but as far as the kernel source goes it is my guess that you did not apply the provided patches. One of which will be the one that holds the required information of what type of ARM processor is in the B3. Run the patches and make prepare should run without errors.

You should also note - and this was said before - that the kernel source is a package. To use the source to build third party drivers you will need to edit the makefile and enter the correct value for "extraversion" (which is ".4-11" if you're running the latest B3 kernel). The resulting module/driver will not load if you don't do this.

One of your errors is about not being able to find the source, which is expected at /lib/modules/2.6.39.4-11/build. You should create that symlink and point it to wherever you stored the kernel source (it is common that this points to /usr/src/linux which in turn points to /usr/src/linux-`uname -r`). It is correct that this symlink does not exist in the default B3 installation.

Not sure about the gcc version message. I suspect Carl compiled on a somewhat bigger machine, possibly running amd64, and using cross compiler. Using different architecture should not lead to this particular message though. It puzzles me but I don't think this will be an issue.

And I'm okay with people asking, but they shouldn't expect me to read everything on a daily base because I don't. In fact there are items that I never read at all.
stasheck
Posts: 126
Joined: 15 Jan 2014, 13:13

Re: Webcam driver compilation on B3

Post by stasheck »

Hi Gordon,
many thanks for you taking time to check on this issue, and giving me a direction.

So I thought I need just the kernel headers for the driver compilation, and so I installed 'bubba3-kernel-headers' package. What you're saying is that I need to d/l 2.6.39.4-11 kernel source, apply bubba-specific patches, and then retry? I'll do that then.

As for kernel source package, is there a source packages repository on b3.update.excito.org? All I have in /etc/apt/excito.list is:

Code: Select all

deb http://b3.update.excito.org elvin main
deb http://b3.update.excito.org upstream_squeeze main
or do I need to d/l tarball from kernel.org?

Last but not least: when you're talking about makefile, you refer to driver's makefile, right?
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Webcam driver compilation on B3

Post by Gordon »

Kernel source can be acquired by the following command

Code: Select all

apt-get source bubba-kernel
And that's a negative on that last question. I mean the makefile from the kernel source, which is the original Debian source for kernel 2.6.39.4 and thus lacks the "-11"
stasheck
Posts: 126
Joined: 15 Jan 2014, 13:13

Re: Webcam driver compilation on B3

Post by stasheck »

Oh-kay. Methinks I need another push.

I updated both /etc/apt/sources.list and /etc/apt/excito.list with deb-src stanzas:
root@b3:/etc/apt# cat /etc/apt/sources.list
# The debian squeeze repository containing unsupported packages that can be used.
deb http://ftp.se.debian.org/debian squeeze main
# The debian squeeze repository containing unsupported packages that can be used. source packages
deb-src http://ftp.se.debian.org/debian squeeze main
# The debian squeeze repository containing unsupported packages that can be used.
deb http://ftp.se.debian.org/debian squeeze contrib
# The debian squeeze repository containing unsupported packages that can be used. source packages
deb-src http://ftp.se.debian.org/debian squeeze contrib
# The debian squeeze repository containing unsupported packages that can be used.
deb http://ftp.se.debian.org/debian squeeze non-free
# The debian squeeze repository containing unsupported packages that can be used. source packages
deb-src http://ftp.se.debian.org/debian squeeze non-free
root@b3:/etc/apt# cat /etc/apt/excito.list
deb http://b3.update.excito.org elvin main
deb-src http://b3.update.excito.org elvin main
deb http://b3.update.excito.org upstream_squeeze main
deb-src http://b3.update.excito.org upstream_squeeze main
Then apt-get update, but no-go (btw. I assume that for B3 I should install bubba3-kernel, right?):

Code: Select all

root@b3:/etc/apt# apt-get source bubba3-kernel
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Picking 'linux' as source package instead of 'bubba3-kernel'
E: Unable to find a source package for linux
I tried some googling, but all I found is "add deb-src", which I did. Am I missing 'deb http://www.emdebian.org/debian/ squeeze main'?

Then I remembered there is a howto for Bubba kernel compilation: http://wiki.excito.org/wiki/index.php/B ... tom_kernel. It says to do it on a separate machine, but I don't need new kernel, just its source.

Unfortunately, newest binary package for B3 kernel is 2.6.39.4-11, but in the repository at http://b3.update.excito.org/pool/main/l/linux/ I see only -9 and -13 patches ('linux_2.6.39.4-13.debian.tar.gz' is set of patches, right? Based on it's sub-100 kB size...).

Actually, I can't recognize where in the guide above we download the kernel sources. It's obvious I'm missing something here.
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Webcam driver compilation on B3

Post by Gordon »

I don't really get the issue here :?

The answer is in the post right in front of the one where you mention your troubles. And I checked and that command will in fact apply the patches automatically when unpacking the source. So why insist on doing something else?
stasheck
Posts: 126
Joined: 15 Jan 2014, 13:13

Re: Webcam driver compilation on B3

Post by stasheck »

Apparently I'm having really stupid issue here :-)

When I do 'apt-get source bubba3-kernel', I get "Unable to find a source package for linux' error message. As I understand, that means that when apt-get tries to install 'bubba3-kernel' source, it first tries to install 'linux' source packet, but can't find it in any repo I have configured.

My problem is, I think I configured all the necessary sources. Maybe I should add that I'm doing all of that on B3 itself, is that a problem?
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Webcam driver compilation on B3

Post by Ubi »

reading is an art

Code: Select all

apt-get source bubba-kernel
vs

Code: Select all

apt-get source bubba3-kernel
spot the difference!
stasheck
Posts: 126
Joined: 15 Jan 2014, 13:13

Re: Webcam driver compilation on B3

Post by stasheck »

Spotted. First tried bubba-kernel, same result.
Gordon
Posts: 1462
Joined: 10 Aug 2011, 03:18

Re: Webcam driver compilation on B3

Post by Gordon »

Ahum...

Code: Select all

gordon@b3:~$ cat /etc/apt/sources.list.d/excito.list 
# Excito sources.list
#
# Generated by change_distribution -s elvin
#
# vim: ft=debsources
deb http://b3.update.excito.org/ elvin main
deb-src http://b3.update.excito.org/ elvin main
deb http://b3.update.excito.org/ upstream_squeeze main
deb-src http://b3.update.excito.org/ upstream_squeeze maingordon@b3:~$ apt-get source bubba-kernel
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Picking 'linux' as source package instead of 'bubba-kernel'
Need to get 96.1 MB of source archives.
Get:1 http://b3.update.excito.org/ elvin/main linux 1:2.6.39.4-13 (dsc) [1,122 B]
Get:2 http://b3.update.excito.org/ elvin/main linux 1:2.6.39.4-13 (tar) [96.0 MB]
Get:3 http://b3.update.excito.org/ elvin/main linux 1:2.6.39.4-13 (diff) [42.0 kB]                        
Fetched 96.1 MB in 22s (4,344 kB/s)                                                                       
gpgv: Signature made Fri 20 Apr 2012 04:33:34 PM CEST using DSA key ID 5EBB8061
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./linux_2.6.39.4-13.dsc
dpkg-source: info: extracting linux in linux-2.6.39.4
dpkg-source: info: unpacking linux_2.6.39.4.orig.tar.gz
dpkg-source: info: unpacking linux_2.6.39.4-13.debian.tar.gz
dpkg-source: info: applying 0001-Debian-adapted-version-handling.patch
dpkg-source: info: applying 0002-Enable-usage-of-.kernelvariables.patch
dpkg-source: info: applying 0003-Settings-for-marvell-88e1116.patch
dpkg-source: info: applying 0004-Marvell-reverse-led-fix.patch
dpkg-source: info: applying 0005-Excito-B3-config.patch
dpkg-source: info: applying 0006-Ath-regd-optional.patch
dpkg-source: info: applying 0007-vsc8601_and_clockskewfix.patch
dpkg-source: info: applying 0008-Excito-Bubba-2-config.patch
dpkg-source: info: applying 0009-Enable-kernel-options-to-make-iotop-work.patch
dpkg-source: info: applying 0010-Enable-missing-modules-to-make-Strongswan-work.patch
dpkg-source: info: applying 0011-Add-eCrypt-support.patch
dpkg-source: info: applying 0012-Add-ebtables-support.patch
dpkg-source: info: applying 0013-General-silentoldconfig-update-of-kernel-config.patch
dpkg-source: info: applying 0014-Adding-support-for-NFS4-kernel-server.patch
dpkg-source: info: applying 0015-Add-support-for-NFS41-kernel-client.patch
dpkg-source: info: applying 0016-Add-CONFIG_USB_HIDDEV.patch
gordon@b3:~$
Seems you have excito.list in the wrong directory.
Post Reply