* [Buildroot] [PATCH 1/1] v4l2loopback: new package
@ 2017-06-19 20:51 Alexandre Esse
2017-06-20 16:00 ` Yann E. MORIN
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Esse @ 2017-06-19 20:51 UTC (permalink / raw)
To: buildroot
This package provides a kernel module and utilities in order to use
v4l2loopback virtual devices.
This module allows you to create "virtual video devices" normal (v4l2)
applications will read these devices as if they were ordinary video
devices, but the video will not be read from e.g. a capture card but
instead it is generated by another application.
Signed-off-by: Alexandre Esse <alexandre.esse.dev@gmail.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/v4l2loopback/Config.in | 23 +++++++++++++++++++++++
package/v4l2loopback/v4l2loopback.hash | 2 ++
package/v4l2loopback/v4l2loopback.mk | 19 +++++++++++++++++++
5 files changed, 46 insertions(+)
create mode 100644 package/v4l2loopback/Config.in
create mode 100644 package/v4l2loopback/v4l2loopback.hash
create mode 100644 package/v4l2loopback/v4l2loopback.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index afc4596..c9f3559 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -66,6 +66,7 @@ F: package/tz/
N: Alexandre Esse <alexandre.esse.dev@gmail.com>
F: package/kvazaar/
+F: package/v4l2loopback/
N: Alistair Francis <alistair.francis@xilinx.com>
F: package/xen/
diff --git a/package/Config.in b/package/Config.in
index 9df0b42..db6c197 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -49,6 +49,7 @@ menu "Audio and video applications"
source "package/udpxy/Config.in"
source "package/upmpdcli/Config.in"
source "package/v4l2grab/Config.in"
+ source "package/v4l2loopback/Config.in"
source "package/vlc/Config.in"
source "package/vorbis-tools/Config.in"
source "package/wavpack/Config.in"
diff --git a/package/v4l2loopback/Config.in b/package/v4l2loopback/Config.in
new file mode 100644
index 0000000..157bd20
--- /dev/null
+++ b/package/v4l2loopback/Config.in
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_V4L2LOOPBACK
+ bool "v4l2loopback"
+ help
+ This module allows you to create "virtual video devices".
+ Normal (v4l2) applications will read these devices as if they
+ were ordinary video devices, but the video will not be read
+ from e.g. a capture card but instead it is generated by
+ another application.
+
+if BR2_PACKAGE_V4L2LOOPBACK
+
+config BR2_PACKAGE_V4L2LOOPBACK_UTILS
+ bool "v4l2loopback-utils"
+ select BR2_PACKAGE_BASH #runtine dependency
+ select BR2_PACKAGE_SUDO #runtime dependency
+ help
+ This package contains applications to interact with
+ v4l2-loopback devices ("virtual video devices").
+ Currently there is only a single command line utility:
+ v4l2loopback-ctl: tool to set framerate, format and timeout
+ image.
+
+endif
diff --git a/package/v4l2loopback/v4l2loopback.hash b/package/v4l2loopback/v4l2loopback.hash
new file mode 100644
index 0000000..2b69fd7
--- /dev/null
+++ b/package/v4l2loopback/v4l2loopback.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 9bb1e8d544019bead20813877415ae974fbc22f87c69772984a4abac433f36dd v4l2loopback-v0.10.0.tar.gz
diff --git a/package/v4l2loopback/v4l2loopback.mk b/package/v4l2loopback/v4l2loopback.mk
new file mode 100644
index 0000000..2dec9c4
--- /dev/null
+++ b/package/v4l2loopback/v4l2loopback.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# v4l2loopback
+#
+################################################################################
+
+V4L2LOOPBACK_VERSION = v0.10.0
+V4L2LOOPBACK_SITE = $(call github,umlaeute,v4l2loopback,$(V4L2LOOPBACK_VERSION))
+V4L2LOOPBACK_LICENSE = GPL-2.0
+V4L2LOOPBACK_LICENSE_FILES = COPYING
+
+ifeq ($(BR2_PACKAGE_V4L2LOOPBACK_UTILS),y)
+define V4L2LOOPBACK_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/utils/v4l2loopback-ctl $(TARGET_DIR)/usr/bin/v4l2loopback-ctl
+endef
+endif
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Buildroot] [PATCH 1/1] v4l2loopback: new package
2017-06-19 20:51 [Buildroot] [PATCH 1/1] v4l2loopback: new package Alexandre Esse
@ 2017-06-20 16:00 ` Yann E. MORIN
0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2017-06-20 16:00 UTC (permalink / raw)
To: buildroot
Alexandre, All,
On 2017-06-19 22:51 +0200, Alexandre Esse spake thusly:
> This package provides a kernel module and utilities in order to use
> v4l2loopback virtual devices.
> This module allows you to create "virtual video devices" normal (v4l2)
> applications will read these devices as if they were ordinary video
> devices, but the video will not be read from e.g. a capture card but
> instead it is generated by another application.
Thank you for this contribution, it is very much interesting! :-)
See some comments below...
> Signed-off-by: Alexandre Esse <alexandre.esse.dev@gmail.com>
> ---
> DEVELOPERS | 1 +
> package/Config.in | 1 +
> package/v4l2loopback/Config.in | 23 +++++++++++++++++++++++
> package/v4l2loopback/v4l2loopback.hash | 2 ++
> package/v4l2loopback/v4l2loopback.mk | 19 +++++++++++++++++++
> 5 files changed, 46 insertions(+)
> create mode 100644 package/v4l2loopback/Config.in
> create mode 100644 package/v4l2loopback/v4l2loopback.hash
> create mode 100644 package/v4l2loopback/v4l2loopback.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index afc4596..c9f3559 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -66,6 +66,7 @@ F: package/tz/
>
> N: Alexandre Esse <alexandre.esse.dev@gmail.com>
> F: package/kvazaar/
> +F: package/v4l2loopback/
>
> N: Alistair Francis <alistair.francis@xilinx.com>
> F: package/xen/
> diff --git a/package/Config.in b/package/Config.in
> index 9df0b42..db6c197 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -49,6 +49,7 @@ menu "Audio and video applications"
> source "package/udpxy/Config.in"
> source "package/upmpdcli/Config.in"
> source "package/v4l2grab/Config.in"
> + source "package/v4l2loopback/Config.in"
> source "package/vlc/Config.in"
> source "package/vorbis-tools/Config.in"
> source "package/wavpack/Config.in"
> diff --git a/package/v4l2loopback/Config.in b/package/v4l2loopback/Config.in
> new file mode 100644
> index 0000000..157bd20
> --- /dev/null
> +++ b/package/v4l2loopback/Config.in
> @@ -0,0 +1,23 @@
> +config BR2_PACKAGE_V4L2LOOPBACK
> + bool "v4l2loopback"
> + help
> + This module allows you to create "virtual video devices".
> + Normal (v4l2) applications will read these devices as if they
> + were ordinary video devices, but the video will not be read
> + from e.g. a capture card but instead it is generated by
> + another application.
So if I understand correctly, this is a kernel module, so you need to
depend on a kernel being built:
depends on BR2_LINUX_KERNEL
> +if BR2_PACKAGE_V4L2LOOPBACK
> +
> +config BR2_PACKAGE_V4L2LOOPBACK_UTILS
> + bool "v4l2loopback-utils"
> + select BR2_PACKAGE_BASH #runtine dependency
> + select BR2_PACKAGE_SUDO #runtime dependency
Spurious two-space after tab.
Besides, you can not select bash like that, because bash has
dependencies, so you need to propagate those dependencies:
depends on BR2_USE_MMU # bash
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
select BR2_PACKAGE_BASH
See e.g. package/tovid/Config.in.
So, because it has requirements, you need to add a comment stating why
it may not be available:
config BR2_PACKAGE_V4L2LOOPBACK
bool "v4l2loopback"
depends on BR2_LINUX_KERNEL
help
blablabla
if BR2_PACKAGE_V4L2LOOPBACK
config BR2_PACKAGE_V4L2LOOPBACK_UTILS
bool "v4l2loopback-utils"
depends on BR2_USE_MMU # bash
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
select BR2_PACKAGE_BASH
endif
comment "v4l2loopback needs a Linux kernel to be built"
depends on !BR2_LINUX_KERNEL
> + help
> + This package contains applications to interact with
> + v4l2-loopback devices ("virtual video devices").
> + Currently there is only a single command line utility:
> + v4l2loopback-ctl: tool to set framerate, format and timeout
> + image.
> +
> +endif
> diff --git a/package/v4l2loopback/v4l2loopback.hash b/package/v4l2loopback/v4l2loopback.hash
> new file mode 100644
> index 0000000..2b69fd7
> --- /dev/null
> +++ b/package/v4l2loopback/v4l2loopback.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256 9bb1e8d544019bead20813877415ae974fbc22f87c69772984a4abac433f36dd v4l2loopback-v0.10.0.tar.gz
> diff --git a/package/v4l2loopback/v4l2loopback.mk b/package/v4l2loopback/v4l2loopback.mk
> new file mode 100644
> index 0000000..2dec9c4
> --- /dev/null
> +++ b/package/v4l2loopback/v4l2loopback.mk
> @@ -0,0 +1,19 @@
> +################################################################################
> +#
> +# v4l2loopback
> +#
> +################################################################################
> +
> +V4L2LOOPBACK_VERSION = v0.10.0
> +V4L2LOOPBACK_SITE = $(call github,umlaeute,v4l2loopback,$(V4L2LOOPBACK_VERSION))
> +V4L2LOOPBACK_LICENSE = GPL-2.0
It is "version 2 of the License, or (at your option) any later version",
so: GPL-2.0+
Regards,
Yann E. MORIN.
> +V4L2LOOPBACK_LICENSE_FILES = COPYING
> +
> +ifeq ($(BR2_PACKAGE_V4L2LOOPBACK_UTILS),y)
> +define V4L2LOOPBACK_INSTALL_TARGET_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/utils/v4l2loopback-ctl $(TARGET_DIR)/usr/bin/v4l2loopback-ctl
> +endef
> +endif
> +
> +$(eval $(kernel-module))
> +$(eval $(generic-package))
> --
> 2.7.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] v4l2loopback: new package
@ 2017-06-16 19:09 Alexandre Esse
2017-06-17 13:45 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Esse @ 2017-06-16 19:09 UTC (permalink / raw)
To: buildroot
This package provides a kernel module and utilities in order to use v4l2loopback virtual devices.
This module allows you to create "virtual video devices" normal (v4l2) applications will read these devices as if they were ordinary video devices, but the video will not be read from e.g. a capture card but instead it is generated by another application.
Signed-off-by: Alexandre Esse <alexandre.esse.dev@gmail.com>
---
DEVELOPERS | 3 +++
package/Config.in | 1 +
package/v4l2loopback/Config.in | 23 +++++++++++++++++++++++
package/v4l2loopback/v4l2loopback.hash | 3 +++
package/v4l2loopback/v4l2loopback.mk | 21 +++++++++++++++++++++
5 files changed, 51 insertions(+)
create mode 100644 package/v4l2loopback/Config.in
create mode 100644 package/v4l2loopback/v4l2loopback.hash
create mode 100644 package/v4l2loopback/v4l2loopback.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 6ade852..6f752cb 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -64,6 +64,9 @@ F: package/liblog4c-localtime/
N: Alexandre Belloni <alexandre.belloni@free-electrons.com>
F: package/tz/
+N: Alexandre Esse <alexandre.esse.dev@gmail.com>
+F: package/v4l2loopback/
+
N: Alistair Francis <alistair.francis@xilinx.com>
F: package/xen/
diff --git a/package/Config.in b/package/Config.in
index c997e2a..95604ed 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -49,6 +49,7 @@ menu "Audio and video applications"
source "package/udpxy/Config.in"
source "package/upmpdcli/Config.in"
source "package/v4l2grab/Config.in"
+ source "package/v4l2loopback/Config.in"
source "package/vlc/Config.in"
source "package/vorbis-tools/Config.in"
source "package/wavpack/Config.in"
diff --git a/package/v4l2loopback/Config.in b/package/v4l2loopback/Config.in
new file mode 100644
index 0000000..82ed0ed
--- /dev/null
+++ b/package/v4l2loopback/Config.in
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_V4L2LOOPBACK
+ bool "v4l2loopback"
+ help
+ This module allows you to create "virtual video devices".
+ Normal (v4l2) applications will read these devices as if they
+ were ordinary video devices, but the video will not be read from
+ e.g. a capture card but instead it is generated by another
+ application.
+
+if BR2_PACKAGE_V4L2LOOPBACK
+
+config BR2_PACKAGE_V4L2LOOPBACK_UTILS
+ bool "v4l2loopback-utils"
+ select BR2_PACKAGE_BASH
+ select BR2_PACKAGE_SUDO
+ help
+ This package contains applications to interact with
+ v4l2-loopback devices ("virtual video devices").
+ Currently there is only a single command line utility:
+ v4l2loopback-ctl: tool to set framerate, format and
+ timeout image
+
+endif
diff --git a/package/v4l2loopback/v4l2loopback.hash b/package/v4l2loopback/v4l2loopback.hash
new file mode 100644
index 0000000..2678ca7
--- /dev/null
+++ b/package/v4l2loopback/v4l2loopback.hash
@@ -0,0 +1,3 @@
+sha256 9bb1e8d544019bead20813877415ae974fbc22f87c69772984a4abac433f36dd v4l2loopback-v0.10.0.tar.gz
+sha256 c8942b5cfb8d337ec0ef4668608facbf9c5aa28fb1cae38674194f6d698733b3 v4l2loopback-v0.9.1.tar.gz
+sha256 8b4ad8b61d2333eca6f88d9e3060a27bcd45021469e8464082bdcbba5336211f v4l2loopback-v0.9.0.tar.gz
diff --git a/package/v4l2loopback/v4l2loopback.mk b/package/v4l2loopback/v4l2loopback.mk
new file mode 100644
index 0000000..4fd7411
--- /dev/null
+++ b/package/v4l2loopback/v4l2loopback.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# v4l2loopback
+#
+################################################################################
+
+V4L2LOOPBACK_VERSION = v0.10.0
+V4L2LOOPBACK_SITE = $(call github,umlaeute,v4l2loopback,$(V4L2LOOPBACK_VERSION))
+V4L2LOOPBACK_LICENSE = GPLv2
+V4L2LOOPBACK_LICENSE_FILES = COPYING
+
+ifeq ($(BR2_PACKAGE_V4L2LOOPBACK_UTILS),y)
+
+define V4L2LOOPBACK_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/utils/* $(TARGET_DIR)/usr/bin
+endef
+
+endif
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Buildroot] [PATCH 1/1] v4l2loopback: new package
2017-06-16 19:09 Alexandre Esse
@ 2017-06-17 13:45 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-06-17 13:45 UTC (permalink / raw)
To: buildroot
Hello,
Thanks for this contribution! The general idea of the patch is good,
but there are a number of minor nits here and there that should be
fixed. See below for the detailed comments.
On Fri, 16 Jun 2017 21:09:50 +0200, Alexandre Esse wrote:
> This package provides a kernel module and utilities in order to use v4l2loopback virtual devices.
> This module allows you to create "virtual video devices" normal (v4l2) applications will read these devices as if they were ordinary video devices, but the video will not be read from e.g. a capture card but instead it is generated by another application.
Good to include such an explanation in the commit log. However, it
should be wrapped at 72 characters.
> diff --git a/package/Config.in b/package/Config.in
> index c997e2a..95604ed 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -49,6 +49,7 @@ menu "Audio and video applications"
> source "package/udpxy/Config.in"
> source "package/upmpdcli/Config.in"
> source "package/v4l2grab/Config.in"
> + source "package/v4l2loopback/Config.in"
> source "package/vlc/Config.in"
> source "package/vorbis-tools/Config.in"
> source "package/wavpack/Config.in"
> diff --git a/package/v4l2loopback/Config.in b/package/v4l2loopback/Config.in
> new file mode 100644
> index 0000000..82ed0ed
> --- /dev/null
> +++ b/package/v4l2loopback/Config.in
> @@ -0,0 +1,23 @@
> +config BR2_PACKAGE_V4L2LOOPBACK
> + bool "v4l2loopback"
> + help
> + This module allows you to create "virtual video devices".
> + Normal (v4l2) applications will read these devices as if they
> + were ordinary video devices, but the video will not be read from
> + e.g. a capture card but instead it is generated by another
> + application.
Indentation for the help text is one tab + two spaces.
Have you run ./support/scripts/check-package on your package ? It would
have detected this issue.
> +if BR2_PACKAGE_V4L2LOOPBACK
> +
> +config BR2_PACKAGE_V4L2LOOPBACK_UTILS
> + bool "v4l2loopback-utils"
> + select BR2_PACKAGE_BASH
> + select BR2_PACKAGE_SUDO
Indentation is wrong here: should be one tab, not spaces.
Also, are these runtime dependencies? If so, you should indicate them
as such:
select BR2_PACKAGE_BASH # runtime
select BR2_PACKAGE_SUDO # runtime
so that we don't wonder why the .mk file does not reference them in the
<pkg>_DEPENDENCIES variable.
It's a bit of a pitty that the v4l2loopback-ctl script requires bash
and sudo, but OK, it's really the case, so no choice here.
> + help
> + This package contains applications to interact with
> + v4l2-loopback devices ("virtual video devices").
> + Currently there is only a single command line utility:
> + v4l2loopback-ctl: tool to set framerate, format and
> + timeout image
Indentation should be one tab + two spaces.
> diff --git a/package/v4l2loopback/v4l2loopback.hash b/package/v4l2loopback/v4l2loopback.hash
> new file mode 100644
> index 0000000..2678ca7
> --- /dev/null
> +++ b/package/v4l2loopback/v4l2loopback.hash
> @@ -0,0 +1,3 @@
> +sha256 9bb1e8d544019bead20813877415ae974fbc22f87c69772984a4abac433f36dd v4l2loopback-v0.10.0.tar.gz
> +sha256 c8942b5cfb8d337ec0ef4668608facbf9c5aa28fb1cae38674194f6d698733b3 v4l2loopback-v0.9.1.tar.gz
> +sha256 8b4ad8b61d2333eca6f88d9e3060a27bcd45021469e8464082bdcbba5336211f v4l2loopback-v0.9.0.tar.gz
Why define so many hashes? Just define the one of the version currently
used in Buildroot. Also please add a comment that indicate where the
hash is coming from.
> +V4L2LOOPBACK_VERSION = v0.10.0
> +V4L2LOOPBACK_SITE = $(call github,umlaeute,v4l2loopback,$(V4L2LOOPBACK_VERSION))
> +V4L2LOOPBACK_LICENSE = GPLv2
Please use GPL-2.0 instead.
> +V4L2LOOPBACK_LICENSE_FILES = COPYING
> +
> +ifeq ($(BR2_PACKAGE_V4L2LOOPBACK_UTILS),y)
> +
Remove this blank line.
> +define V4L2LOOPBACK_INSTALL_TARGET_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/utils/* $(TARGET_DIR)/usr/bin
Specify the full path:
$(INSTALL) -D -m 0755 $(@D)/utils/v4l2loopback-ctl $(TARGET_DIR)/usr/bin/v4l2loopback-ctl
> +endef
> +
Remove this blank line.
> +endif
> +
> +$(eval $(kernel-module))
> +$(eval $(generic-package))
Could you fix the above issues, and submit an updated version of the
patch?
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-20 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-19 20:51 [Buildroot] [PATCH 1/1] v4l2loopback: new package Alexandre Esse
2017-06-20 16:00 ` Yann E. MORIN
-- strict thread matches above, loose matches on Subject: below --
2017-06-16 19:09 Alexandre Esse
2017-06-17 13:45 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox