Thibault Bernard
Thibault Bernard

Reputation: 21

v4l2loopback on Yocto

I'm begginer on Yocto and I try to add v4l2loopback to my image

I download current source on github (https://github.com/umlaeute/v4l2loopback) and i try to compile with with recipe

SUMMARY = "V4L2Loopback"
DESCRIPTION = "v4l2loopback module"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"


# Use local tarball
SRC_URI = "file://v4l2loopback-master.tar.gz"

# Make sure our source directory (for the build) matches the directory structure in the tarball
S = "${WORKDIR}/v4l2loopback-master"

inherit module

KERNEL_MODULE_AUTOLOAD = "v4l2loopback"

bitbake give me :

| NOTE: make -j 4 KERNEL_SRC=/media/yocto-irts/distro/build/tmp/work-shared/genericx86-64/kernel-source DEPMOD=echo MODLIB=/media/yocto-irts/distro/build/tmp/work/genericx86_64-poky-linux/v4l2loopbackd/1.0-r0/image/lib/modules/4.18.22-yocto-standard CC=x86_64-poky-linux-gcc  -fuse-ld=bfd -fdebug-prefix-map=/media/yocto-irts/distro/build/tmp/work/genericx86_64-poky-linux/v4l2loopbackd/1.0-r0=/usr/src/debug/v4l2loopbackd/1.0-r0 -fdebug-prefix-map=/media/yocto-irts/distro/build/tmp/work/genericx86_64-poky-linux/v4l2loopbackd/1.0-r0/recipe-sysroot= -fdebug-prefix-map=/media/yocto-irts/distro/build/tmp/work/genericx86_64-poky-linux/v4l2loopbackd/1.0-r0/recipe-sysroot-native=  -fdebug-prefix-map=/media/yocto-irts/distro/build/tmp/work-shared/genericx86-64/kernel-source=/usr/src/kernel LD=x86_64-poky-linux-ld.bfd  O=/media/yocto-irts/distro/build/tmp/work-shared/genericx86-64/kernel-build-artifacts modules_install
| make: *** No rule to make target 'modules_install'.  Stop.
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.

I think i have to patch Makefile but i don't know how

Please help me

Thanks

Upvotes: 2

Views: 1728

Answers (2)

deribaucourt
deribaucourt

Reputation: 648

I've written an updated recipe for v0.12.7 of v4l2loopback. Since this is the first link that comes from Google I wanted to post it here if anyone happens to need it. However the module didn't seem to be compatible on my kernel form an SOC vendor.

DESCRIPTION = "A kernel module to create V4L2 loopback devices"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

SRC_URI = "git://github.com/umlaeute/v4l2loopback.git;protocol=https;branch=main"

SRCREV = "1ecf810f0d687b647caa3050ae30cf51b5902afd"

S = "${WORKDIR}/git"

inherit module

MODULES_INSTALL_TARGET = "install-all"
EXTRA_OEMAKE += "KERNEL_DIR=${STAGING_KERNEL_DIR}"
EXTRA_OEMAKE += "PREFIX=${D}${prefix}"

DEPENDS += "help2man-native"

PACKAGES += "${PN}-utils"
FILES:${PN}-utils = "${bindir}/v4l2loopback-ctl"

RDEPENDS:${PN}-utils += " \
    gstreamer1.0 \
    gstreamer1.0-plugins-base \
    gstreamer1.0-plugins-good \
    sudo \
    v4l-utils \
    "

Upvotes: 0

Darin Barnes
Darin Barnes

Reputation: 1

The Makefile for v4l2loopback doesn't have a modules_install target. However the install target will do what was intended.

You can substitute the target used for the module install step by adding this after inherit module in the recipe:

MODULES_INSTALL_TARGET = "install"

Upvotes: 0

Related Questions