gkaindl / ambi-tv

a flexible ambilight clone for embedded linux
296 stars 85 forks source link

v4l2-grab: failed to start #6

Closed cox181 closed 10 years ago

cox181 commented 10 years ago

So I have followed these directions

You need to download the sources for your running kernel, as well as its module symbol file. I've recently added a script in the 'misc' folder in this repo which should install the sources for the running kernel on Raspbian (I did not write this script, I found it as a gist and added it to the repo to preserve it, since it works well for me). Then, change into the the misc/usbtv folder and run 'make'. next, make sure the 'videobuf2_core' and 'videobuf2_vmalloc' modules are loaded, then insert the usbtv module with 'sudo insmod usbtv'.

But after running the makefile inside the usbtv folder, I do not see the modules videobuf2_core and the other module. And so when I go to use the command sudo insmod usbtv, it says directory cannot be found.

The main error I'm getting is this one when I try to execute the program.

v4l2-grab: failed to stat ' /dev/video0' : 2 (so such file or directory)

I'm assuming I still have something wrong with the drivers. Any help would be great.

Thanks

cox181 commented 10 years ago

I'm guessing it has something to do with the module symbol file for the kernel? How do I go about getting those?

gkaindl commented 10 years ago

alright, if make doesn't give you an error, it means it built and linked (thus also showing that symbol file is valid) the module successfully.

the videobuf modules are part of your kernel distribution, not of usbtv, so just insert them with modprobe.

sudo modprobe videobuf2_core sudo modprobe videobuf2_vmalloc

usbtv is not in your kernel tree, so you insert it by running

sudo insmod usbtv.ko

in the usbtv directory where you built the module.

PS: please don't keep opening issues about this on Github: This is for tracking bugs and problems with the software per se, not a general forum for questions unrelated to ambi-tv, but more concerned with basic Linux usage.

gkaindl commented 10 years ago

hmm, looks like you've deleted the comment for which I received an email notification, but anyway, it's not bothering me as long as you don't open new issues for it.

"invalid module format" is usually the error message you get if you build a module for a different kernel (e.g. with different kernel headers and/or symbol file) than for the kernel you want to insert it into. make sure that the kernel headers/sources that you are using the build the module match the version of the kernel you are running.