Video4Linux Loopback Device on Linux4Tegera - linux

I am interfacing Bumblebee2 camera with Nvidia Tegra TK1 board. I have installed firewire1394 driver along with coriander 2.0.2 to get the camera output and it is working fine. But I am not able to load the video for Linux module. I have installed the following two packages as well using synaptic
v4l2loopback-utils
qv4l2
I have following version of Linux kernel on Nvida Tegra TK1 board.
uname -a
Linux tegra-ubuntu 3.10.40-grinch-21.3.4 #1 SMP PREEMPT Fri May 1 10:41:09 UTC 2015 armv7l armv7l armv7l GNU/Linux
I downloaded the stable version of Video4Linux Loopback Device from here
I follow the steps mentioned in the readme file and when I tried to make it, I got the following errors.
make -C /lib/modules/3.10.40-grinch-21.3.4/build SUBDIRS=/home/ubuntu/vloopback modules
make: *** /lib/modules/3.10.40-grinch-21.3.4/build: No such file or directory. Stop.
make: *** [all] Error 2
I would appreciate if someone can help me to install video for Linux loopback device.

Current running kernel Linux tegra-ubuntu 3.10.40-grinch-21.3.4 does not have v4l2loopback support. I used module assistant to compile v4l2loopback module.
sudo aptitude install v4l2loopback-source module-assistant
sudo module-assistant auto-install v4l2loopback-source
Don't forget to mention the current running kernel headers. Then build and make v4l2loopback from here

Related

insmod: ERROR could not insert module: Operation not permitted in WSL2 Ubuntu

I followed the instructions in this video to compile the Linux kernel for WSL with video drivers. The kernel is running and I do have access to /dev/video0 which was the whole point.
I can also confirm that the correct kernel is running with uname -a, which gives the following output:
Linux DESKTOP-V575QHO 5.15.74.2-microsoft-standard-WSL2+ #1 SMP Wed Dec 7 14:57:03 CET 2022 x86_64 x86_64 x86_64 GNU/Linux
I now installed dkms and used it to compile the akvcam module (a virtual camera driver). Both make and make dkms_install exited successfully.
However, when I'm actually trying to install the module using insmod /lib/modules/$(uname -r)/updates/dkms/akvcam.ko I get the following error:
insmod: ERROR: could not insert module /lib/modules/5.15.74.2-microsoft-standard-WSL2+/updates/dkms/akvcam.ko: Operation not permitted
I've seen here that this might be related to Secure Boot, but I don't really understand how this would translate to WSL2 and how this problem could be solved here.
Any help is greatly appreciated!

Compiling kernel driver in Linux raspberrypi 5.15.28-v7+

I need to compile a kernel driver for my raspberry pi4 with Linux raspberrypi 5.15.28-v7+ kernel. I've downloaded and installed rpi-update and raspberry-kernel-headers package, but make said: *** /lib/modules/5.15.28-v7+/build: No such file or directory.
I don't see /usr/src/linux-headers-5.15.28-v7+ directory.
How can I download headers for this kernel?
thx,
Zamek

Kernel version not correct on ubuntu

I have this situation:
Ubuntu 16.04;
When I called uname -a result is Linux pi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux.
The problem is when I want to compile new drivers, the system gives me the error:
make[1]: *** /lib/modules/4.1.19-v7+/build: No such file or directory. Stop.
But when I looked at /lib/modules/, I find only version 4.4.38-v7+.
Maybe someone knows what it can be?
Thanks.
You need to have kernel-headers installed for the kernel version that you are trying to compile for.
sudo apt-get install linux-headers-$(uname -r)
You have kernel headers for 4.4.38-v7+, but not for your booted kernel of 4.1.19-v7+ (uname -r)
If you don't want to install 4.1.19-v7+ kernel-headers, reboot the system and boot into 4.4.38-v7+, and then try make, and it would compile the module for that particular kernel.

Error when loading cross compiled kernel module

I have cross compiled a simple helloworld kernel module, the host is a x86 machine and the target an ARM board. When I do modprobe to install the module in the target i get this message:
FATAL: Could not load /lib/modules/3.14.0-xilinx-13567-g906a2c9-dirty/modules.dep: No such file or directory
I have make sure that the module is compiled with the same version as the target.
uname -a : 3.14.0-xilinx-13567-g906a2c9-dirty
modinfo: vermagic: 3.14.0-xilinx-13567-g906a2c9-dirty SMP preempt mod_unload modversions ARMv7 p2v8
What can be the problem? What does that error means?
Apparently, you are missing the file specifying module dependencies (generated at build time and installed with make module_install).
The simplest solution is, if your mdule does not have external dependencies, insert it with insmod rather than with modprobe.
Try to run:
depmod -a
on the ARM board.
it should solve your problem.
I would suggest the following steps.
Do insmod $module-name
Check the dmesg commands output. If you see the following message
version magic '3.14.0-xilinx-13567-g906a2c9-dirty xxxxxxxx' should be
'3.14.0-xilinx-13567-g906a2c9-dirty xxxxxxxxxx'
then the problem is because of the changes made to the kernel.
Commit the changes to the git repository and re-build the kernel.
Create a new kernel image and then boot the target with the updated kernel.

Wireless Setup on Arch Linux

I am a new Archer, and when I compile wireless driver on my computer, I come across a problem:
make: *** /lib/modules/3.1.4-1-ARCH/build: No such file or directory. Stop.
My wireless firmware is Broadcom BCM4313, and I have installed linux-headers-3.1.5-1 in my computer. I do not know how to solve this problem.
Here is some information about my system:
$ uname -a
Linux myhost 3.1.4-1-ARCH #1 SMP PREEMPT Tue Nov 29 09:08:04 UTC 2011 i686 AMD Phenom(tm) II N930 Quad-Core Processor AuthenticAMD GNU/Linux
$ ls /lib/modules/3.1.4-1-ARCH
extramodules modules.dep modules.order
kernel modules.dep.bin modules.pcimap
modules.alias modules.devname modules.seriomap
modules.alias.bin modules.ieee1394map modules.softdep
modules.builtin modules.inputmap modules.symbols
modules.builtin.bin modules.isapnpmap modules.symbols.bin
modules.ccwmap modules.ofmap modules.usbmap
I recommend you use broadcom-wl package. It works for me with broadcom 4312 (I know you have 4313, but i'm taking a wild guess it should work for you too). The module name will be wl. It's the closed source driver because the open source driver sometimes takes up to 100% of my CPU for some reason.
Installing packages from AUR: https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages

Resources