keiser1080 Posted April 28, 2016 Posted April 28, 2016 Hi, Could you please add the usbtv driver ? i have an Easycap with UTV007 chip the driver are not present in kernel 3.4.110-sun8i, and are available from 3.13-rc5 I have try to compile using the standart way, and using dkms with no success. I have also try to install the backported version wget http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.18.1/backports-3.18.1-1.tar.xz tar xvfJ backports-3.18.1-1.tar.xz cd backports-3.18.1-1 make menuconfig make ARCH=arm -j4 make install rmmod videobuf2-core rmmod videobuf2-vmalloc rmmod videobuf2_memops modprobe videobuf2_memops modprobe videobuf2-core modprobe videobuf2-vmalloc modprobe usbtv root@orangepipc:~# modprobe usbtv modprobe: ERROR: could not insert 'usbtv': Invalid argument root@orangepipc:~# lsmod Module Size Used by videobuf2_vmalloc 2348 0 videobuf2_memops 1815 1 videobuf2_vmalloc gpio_sunxi 8253 0 8189es 896688 0 root@orangepipc:~# dmesg ... [ 801.412977] videobuf2_core: Unknown symbol v4l2_get_timestamp (err 0) [ 801.413126] videobuf2_core: disagrees about version of symbol video_devdata [ 801.413154] videobuf2_core: Unknown symbol video_devdata (err -22) [ 801.413205] videobuf2_core: disagrees about version of symbol v4l2_event_pending [ 801.413233] videobuf2_core: Unknown symbol v4l2_event_pending (err -22) [ 803.883505] videobuf2_core: Unknown symbol v4l2_get_timestamp (err 0) [ 803.883653] videobuf2_core: disagrees about version of symbol video_devdata [ 803.883681] videobuf2_core: Unknown symbol video_devdata (err -22) [ 803.883733] videobuf2_core: disagrees about version of symbol v4l2_event_pending [ 803.883760] videobuf2_core: Unknown symbol v4l2_event_pending (err -22)
beee Posted May 11, 2016 Posted May 11, 2016 Hi, here is working version: https://goo.gl/Q8H6Gl upgrade to last kernel (original old v4l2 is as module): dpkg -i * reboot backported new v4l2 and usbtv from updates.tar.gz extract to /lib/modules/3.4.112-sun8i depmod -a modprobe usbtv demo: Work only NTSC. PAL does not work. I do not know why. Only green screen. Ready for Ambilight ;-) 1
beee Posted May 11, 2016 Posted May 11, 2016 Quick guide: on PC: https://github.com/igorpecovnik/lib Edit compile.sh and set KERNEL_ONLY="yes"KERNEL_CONFIGURE="yes" ./compile.sh select your board, default kernel. in kernel configuration: device drivers -> multimedia support -> video for linux change (space) from "*" to "M", save and exit copy kernel 3 debs (u-boot no need) from output dir to orange pi and upgrade (dpkg -i *) on Orange PI: (start is the same) wget http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.18.1/backports-3.18.1-1.tar.xztar xvfJ backports-3.18.1-1.tar.xzcd backports-3.18.1-1make menuconfig select only usbtv (dependence automatically selected also v4l2) and now little hack: in file compat/backport-3.10.c remove get_random_int function (line 35-44) make ARCH=arm -j4make install depmod -a modprobe usbtv vuala ! 1
keiser1080 Posted May 11, 2016 Author Posted May 11, 2016 thanks i will check this process later I do nealy the same before the last armbian upgrade. where did you find the hack " remove get_random_int function (line 35-44)" ???
beee Posted May 11, 2016 Posted May 11, 2016 Nowhere. After the first successful compilation, v4l2 functions collided with those who were hard part of a kernel (dmesg messages). This made me to compile my own kernel with v4l2 as a module. Then the module compat did not go insert, because of that, that this function already found itself in the kernel (dmesq). So I search where it is and simply delete it. Maybe it was in reverse order (hack <-> v4l2 as a module). Immemorial, it was late at night (or early morning?) :-D
pmartin Posted November 13, 2016 Posted November 13, 2016 How did you recompile the kernel? I am used to Debian, but here uname -a states kernel version "3.4.112", package linux-image-sun8i claims to be version "5.23" and installing linux-source leads to linux-source-3.16. I am somewhat lost with these seemingly inconsistent versions and some help will be greatly appreciated. Thanks.
pmartin Posted November 14, 2016 Posted November 14, 2016 To answer my own questions.. I build kernel 3.4.113 on an Ubuntu guest, following Igor's documentation. But that was actually not really necessary.. I found a backported usbtv driver at: https://github.com/mwelchuk/usbtv it is installed on its own (not part of a V4L2 backport) using dkms. It does not require rebuilding the kernel and there is no symbol or V4L2 version conflict. It works as "well" on NanoPi Neo as on PC: grabbing only a few frames per second with motion (or zoneminder) seems to cause some weird images with half the content old. I wonder if that could be because it tries to start capture in the middle of a frame? Now I do have another problem with uvcvideo (another "EasyCap" device that was reported as using an USBTV007, but is a different chipset). The device is recognized, but generates error when opening /dev/video0 -- that same device works on PC Debian Linux 4.7.8. (Sorry for changing topic, but if anyone has tips, I welcome any.) Thanks.
Igor Posted November 14, 2016 Posted November 14, 2016 Now I do have another problem with uvcvideo (another "EasyCap" device that was reported as using an USBTV007, but is a different chipset). The device is recognized, but generates error when opening /dev/video0 -- that same device works on PC Debian Linux 4.7.8. (Sorry for changing topic, but if anyone has tips, I welcome any.) Alternatively you can try our DEV kernel (4.9.0) for H3 boards. It's still experimental so problems are expected. Nevertheless, you might get further than with this old kernel.
pmartin Posted November 15, 2016 Posted November 15, 2016 Igor, In the (very unlikely) case that the DEV kernel happens to not boot, how do I reinstate the 3.4.113 kernel? (BTW, I tried to see if the uvcvideo module from 4.8 would compile, but V4L2 data structures have changed since then, so it is quite a bit beyond my level as a short term solution.) Thank you for the help.
Recommended Posts