What's new

Need help compiling v4l2loopback kernel module

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Kernel options are stored in config_base.6a within the kernel tree.
 
How to apply the patch for Linux kernel 2.6.36.4. Then compile the Asuswrt-Merlin firmware. The new kernel module, v4l2loopback.ko, will be compiled into the Asuswrt-Merlin firmware.

Assuming you've already got the projects:
Code:
cd
git clone https://github.com/umlaeute/v4l2loopback.git
git clone https://github.com/RMerl/asuswrt-merlin.git

Patch to fix up all three Asuswrt ARM kernels in one shot:
Code:
cd ~/asuswrt-merlin
patch -p2 -i ~/asuswrt-arm-v4l2loopback.patch

Create symbolic links in Asuswrt-Merlin to the source files in v4l2loopback project:
Code:
PACKAGEDIR="~/v4l2loopback"
MERLINDIR="~/asuswrt-merlin"
cd $MERLINDIR
for KERNELDIR in "src-rt-6.x.4708" "src-rt-7.14.114.x/src" "src-rt-7.x.main/src"; do
  ln -sf $PACKAGEDIR/v4l2loopback.c $MERLINDIR/release/$KERNELDIR/linux/linux-2.6.36/drivers/media/video/v4l2loopback.c
  ln -sf $PACKAGEDIR/v4l2loopback_formats.h $MERLINDIR/release/$KERNELDIR/linux/linux-2.6.36/drivers/media/video/v4l2loopback_formats.h
done
 

Attachments

  • asuswrt-arm-v4l2loopback.patch.txt
    14.5 KB · Views: 565
Last edited:
Thank you very much for detailed guide, I compiled successfully but didn't tried v4l2loopback functionality.
How about if I just want to compile without integrate in firmware?
make -C ~/asuswrt-merlin/release/src-rt-6.x.4708/linux/linux-2.6.36 modules_install

Sent from my HTC 10 using Tapatalk
 
I compiled successfully but didn't tried v4l2loopback functionality.
Use 7-Zip to open the .trx file and extract the new kernel modules. They are located here:
Code:
\lib\modules\2.6.36.4brcmarm\kernel\drivers\media

How about if I just want to compile without integrate in firmware?
Not sure how to compile only the kernel modules. I think you'd at least need to change your PATH variable to use the cross-compilation toolchain?
Code:
[ ! -h /opt/brcm ] && sudo ln -sf ~/asuswrt-merlin/tools/brcm /opt/brcm
[ ! -h /opt/brcm-arm ] && sudo ln -sf ~/asuswrt-merlin/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3 /opt/brcm-arm
export PATH=/opt/brcm-arm/bin:/opt/brcm-arm/arm-brcm-linux-uclibcgnueabi/bin:/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 
If Asus/Broadcom care to look into and patch the WiFi bug, extracting the new WiFi drivers from Asus trx image will be my shortcut to patch the firmware on my RT-AC56U. lol

But since you already have compile the firmware locally, you can save the hassle of extracting trx and then its squashfs image. Assume Fitz's relative path is correct, simply can get the kernel driver from your disk at:
Code:
router/arm-uclibc/target/lib/modules/2.6.36.4brcmarm/kernel/drivers/media

How about if I just want to compile without integrate in firmware?

Code:
make kernel

That will speed up your compile time.

If you mean independently build kernel modules, it's very difficult if possible. You need the firmware's source three to build kernel modules that'll work...in a given kernel. That's lot easier.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top