Installing Kelnel Object (v4l2loopback)

To mount .ko file using modprobe, one must have linux kernel headers:

/usr/src/linux-headers-x.x.xx+

ready.

Wrong Way to Install

Do not try to install, linux-headers-generic. It will gives the wrong kernel version.

Right Way to Install

> sudo apt install raspberrypi-kernel-headers

Do use

> uname -a
and
> sudo apt-cache policy []

to check the version of the kernel.

To find the corresponding kernel version of each raspberrypi-kernel-headers package, we can cross check with the github Makefile details, for example it is 4.4.38 in the link:

https://github.com/raspberrypi/linux/blob/raspberrypi-kernel_1.20161215-1/Makefile

DKMS Process

After headers are installed, they should be reflected as below:

screenshot-at-2017-02-27-18-50-43

Afterwards, install the kernel module (v4l2loopback) by simply:

> sudo apt-get install v4l2loopback-dkms

If successful, the following should be shown:

screenshot-at-2017-02-27-18-48-04

Finally, modprobe as usual and it should work now.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s