Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: gavinmc42 on October 30, 2016, 06:16:05 AM
-
Plugged a USB camera in (Sony PS Eyecam3) - dmesg shows the USB audio and USB camera VID/PID is present.
However lsmod only shows the driver module for the USB sound part, there is no /dev/video0.
Googling on Raspberry forums show the V4l2 module is part of the kernel and loads when a video camera is detected.
Just wondering if piCore 8 was compiled without the V4L2 module?
I know the pi camera uses v4l2, just wondering if the driver is in rpi-vc.tcz or maybe start_x.elf?
Ok maybe not.
-
v4l modules are not in the repo but in the full module pack on the server, see
armv6: http://tinycorelinux.net/8.x/armv6/releases/RPi/src/kernel/4.4.20-piCore+_modules.tar.xz
armv7: http://tinycorelinux.net/8.x/armv7/releases/RPi/src/kernel/4.4.20-piCore_v7+_modules.tar.xz
If there is a demand, I can extract them to a tcz but first try them.
-
Might be looking in the wrong folder but I did not see any video/V4L2 stuff in the module files.
Search on Pi forum
https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=160433&p=1040482&hilit=V4L2+driver#p1040482
Cannot seem to find that either but there is 705MB in the kernel source :'(
Looking here too
https://github.com/raspberrypi/linux/tree/rpi-4.4.y/drivers
Ok it is in the /media folder.
I have only built kernels with buildroot once, that's my entire kernel knowledge.
I know some options have to be enabled before compiling.
Maybe the /media/v4l2-core option was not enabled on the picore kernel?
-
These modules built with the current kernels:
# ls -l v4l2-core
total 431
-rw-r--r-- 1 root root 28128 Sep 7 22:20 tuner.ko
-rw-r--r-- 1 root root 12052 Sep 7 22:20 v4l2-common.ko
-rw-r--r-- 1 root root 26936 Sep 7 22:20 v4l2-dv-timings.ko
-rw-r--r-- 1 root root 30728 Sep 7 22:20 videobuf-core.ko
-rw-r--r-- 1 root root 13916 Sep 7 22:20 videobuf-dvb.ko
-rw-r--r-- 1 root root 11464 Sep 7 22:20 videobuf-vmalloc.ko
-rw-r--r-- 1 root root 35520 Sep 7 22:20 videobuf2-core.ko
-rw-r--r-- 1 root root 5760 Sep 7 22:20 videobuf2-memops.ko
-rw-r--r-- 1 root root 34908 Sep 7 22:20 videobuf2-v4l2.ko
-rw-r--r-- 1 root root 13264 Sep 7 22:20 videobuf2-vmalloc.ko
-rw-r--r-- 1 root root 222772 Sep 7 22:20 videodev.ko
-
Thanks Bela, found them.
Will need uvcvideo.ko too? and maybe media.ko?
-
Thanks Bela, found them.
Will need uvcvideo.ko too? and maybe media.ko?
Do not know. Check deps with modinfo and try with a camera, check dmesg, ...
-
Plugged webcam into Raspbian and checked what modules it used.
I confirmed these modules are present in the 4.4.20....modules.tar.xz
So how do I get the 5 needed driver .ko files into the kernel?
Google just confused me
-
Extract them, study kermel module tcz's in the repo for layout and create a .tcz as described in the Wiki.
-
I created a v4l-dvb-4.9.22-piCore-v7 extension and gave this a go with the RPi camera - I had to manually load the modules - but it didn't work with guvcview.
Maybe you'll have more luck with a usb webcam?
-
at least things work manually.
Edit config.txt: $ cat /mnt/mmcblk0p1/config.txt
...
[ALL]
# Enable camera
start_x=1
gpu_mem=128
Load kernel driver: $ tce-load -i libv4l2
$ sudo modprobe bcm2835-v4l2
$ dmesg | tail -10
...
[ 518.025413] media: Linux media interface: v0.10
[ 518.036981] Linux video capture interface: v2.00
[ 518.080558] bcm2835-v4l2: scene mode selected 0, was 0
[ 518.080934] bcm2835-v4l2: V4L2 device registered as video0 - stills mode > 1280x720
[ 518.085780] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 loaded
Take a photo: $ v4l2-ctl --overlay=1 [enable viewfinder]
$ v4l2-ctl --set-fmt-video=width=2592,height=1944,pixelformat=3
$ v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=photo.jpg
-
Load kernel driver: $ tce-load -i libv4l2
$ sudo modprobe bcm2835-v4l2
Sorry to resurrect a thread, but is there a ready-made ARMv6 version of libv4l2.tcz? I didn't see one listed in the repo...
If not, where would I get the source to make my own?
-
see http://tinycorelinux.net/9.x/armv7/tcz/src/libv4l2/
..but I believe the armv7 extension should work for armv6 - maybe you could give it a try?
-
Isn't that the other way around, older arm stuff will work on newer?
-
With the compiler flags used, I believe it should work for both armv6 and armv7.
-
Hi curaga
Isn't that the other way around, older arm stuff will work on newer?
Yes, but I think I remember reading that bmarkus wanted to keep extensions compatible between both ARM versions. I guess
kind of like the x86 extensions all try to maintain 486 compatibility. A couple of randomly chosen MD5s suggest that may be the case:
http://tinycorelinux.net/9.x/armv6/tcz/acl.tcz.md5.txt
6fef8807a93ab5191598b1d0dffb9f21 acl.tcz
http://tinycorelinux.net/9.x/armv7/tcz/acl.tcz.md5.txt
6fef8807a93ab5191598b1d0dffb9f21 acl.tcz
http://tinycorelinux.net/9.x/armv6/tcz/dnsmasq.tcz.md5.txt
818d1584188e8be233cf28584d89953c dnsmasq.tcz
http://tinycorelinux.net/9.x/armv7/tcz/dnsmasq.tcz.md5.txt
818d1584188e8be233cf28584d89953c dnsmasq.tcz