package/v4l2loopback: fix v4l2loopback-ctl compile/install

Since upstream commit [1] the original v4l2loopback-ctl bash script was
replaced by a C version, so add a proper compile step (and remove bash
runtime dependency) to fix '[help] v4l2loopback package build fails for
raspberrypi5' [2].

The issue can be reproduced with the commands:

    cat <<EOF >.config
    BR2_aarch64=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_LINUX_KERNEL=y
    BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
    BR2_PACKAGE_V4L2LOOPBACK=y
    BR2_PACKAGE_V4L2LOOPBACK_UTILS=y
    EOF
    make olddefconfig
    make v4l2loopback

Note: upstream commit [1] was introduced in version v0.13.0.
Buildroot bumped v4l2loopback to v0.13.2 in [3].

Fixes:

  /usr/bin/install: cannot stat
  '.../build/v4l2loopback-0.13.2/utils/v4l2loopback-ctl':
  No such file or directory

[1] 33922fa4e9
[2] https://lists.busybox.net/pipermail/buildroot/2025-March/775911.html
[3] 02540771bc

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[Julien:
 - add commands to reproduce the issue
 - add reference to buildroot commit introducing the issue
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 5d85d23e16)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Peter Seiderer
2025-03-27 17:49:13 +01:00
committed by Arnout Vandecappelle
parent 1211e4125e
commit cd29193cc1
2 changed files with 4 additions and 4 deletions

View File

@@ -14,10 +14,6 @@ if BR2_PACKAGE_V4L2LOOPBACK
config BR2_PACKAGE_V4L2LOOPBACK_UTILS
bool "utils"
depends on BR2_USE_MMU # bash
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
select BR2_PACKAGE_BASH # runtime dependency
select BR2_PACKAGE_SUDO # runtime dependency
help
Install applications to interact with v4l2-loopback devices
("virtual video devices"). Currently there is only a single

View File

@@ -11,6 +11,10 @@ V4L2LOOPBACK_LICENSE_FILES = COPYING
V4L2LOOPBACK_CPE_ID_PREFIX = cpe:2.3:o
ifeq ($(BR2_PACKAGE_V4L2LOOPBACK_UTILS),y)
define V4L2LOOPBACK_BUILD_CMDS
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) utils
endef
define V4L2LOOPBACK_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/utils/v4l2loopback-ctl $(TARGET_DIR)/usr/bin/v4l2loopback-ctl
endef