Compiling v4l2loopback on ubuntu trusty container running in coreos Red Dog

946 views
Skip to first unread message

ashok reddy

unread,
Sep 12, 2015, 3:23:48 AM9/12/15
to CoreOS Dev
Hi 

   I followed this procedure to compile and build kernel module v4l2loopback.ko  


$ cat /etc/lsb-release 
DISTRIB_ID=CoreOS
DISTRIB_RELEASE=723.3.0
DISTRIB_CODENAME="Red Dog"
DISTRIB_DESCRIPTION="CoreOS 723.3.0"

$ uname -r
4.0.5


#Pull n Start a container


docker pull ubuntu:trusty

docker run --rm --privileged  -it -v /dev:/dev  ubuntu:trusty

echo "deb http://cz.archive.ubuntu.com/ubuntu utopic main" >> /etc/apt/sources.list

apt-get update

apt-get install -y module-assistant wget unzip

m-a prepare

m-a update

 mkdir -p /usr/src/kernels

cd /usr/src/kernels


tar -xvzf linux-4.0.5.tar.gz

ln -s linux-4.0.5 linux

apt-get install libncurses5-dev libncursesw5-dev

make menuconfig -------------------------> Select Multimedia v4l 

make modules

make modules_install

# Make sure under /lib/modules/4.0.5/  build ---> /usr/src/kernels/linux


# Download v4l2loopback

unzip master.zip

cd v4l2loopback-master/

make

make install 

# modprobe -v v4l2loopback
insmod /lib/modules/4.0.5/kernel/drivers/media/media.ko 
insmod /lib/modules/4.0.5/extra/v4l2loopback.ko 

# lsmod | grep v4l
v4l2loopback           36864  0 
videodev              147456  1 v4l2loopback

When I check - 

 /dev/video0   -  Is not created. 

# modinfo v4l2loopback
filename:       /lib/modules/4.0.5/extra/v4l2loopback.ko
license:        GPL
author:         Vasily Levin, IOhannes m zmoelnig <zmoe...@iem.at>,Stefan Diewald,Anton Novikovet al.
description:    V4L2 loopback video device
depends:        videodev
vermagic:       4.0.5 SMP mod_unload 
parm:           debug:debugging level (higher values == more verbose) (int)
parm:           max_buffers:how many buffers should be allocated (int)
parm:           max_openers:how many users can open loopback device (int)
parm:           devices:how many devices should be created (int)
parm:           video_nr:video device numbers (-1=auto, 0=/dev/video0, etc.) (array of int)
parm:           card_label:card labels for every device (array of charp)
parm:           exclusive_caps:whether to announce OUTPUT/CAPTURE capabilities exclusively or not (array of bool)
parm:           max_width:maximum frame width (int)
parm:           max_height:maximum frame height (int)

Please advise if someone have come across or What is the process to compile  kernel modules for CoreOS and How / when to load them?

Thanks
Ashok




Brandon Philips

unread,
Sep 14, 2015, 11:27:18 AM9/14/15
to coreo...@googlegroups.com, Michael Marineau
Hello Ashok-

At this time we don't have a solid way to build external kernel modules. This is something we would like to do in the future and something Michael Marineau (cc'd) has been looking into.

That said what is your use case for video4linux on CoreOS?

Brandon

Ashok_Gmail

unread,
Sep 14, 2015, 11:51:56 AM9/14/15
to coreo...@googlegroups.com, Brandon Philips, Michael Marineau
Hi Brandon,

We needed v4l2loopback - which will create "virtual video devices"  -  https://github.com/umlaeute/v4l2loopback

Thanks,
Ashok
Reply all
Reply to author
Forward
0 new messages