Skip to contentSkip to conversation

v4l-utils build on noMMU platform

PATCH Superseded Hugues Fruchet 2 participants 17 messages Jun 7, 2017 – Jun 12, 2017

lore
Share & tools
lore
#0 lore raw

cover v4l-utils build on noMMU platform

In order to pass V4L2 compliancy tests on STM32 devices -which are MMU less-, compliancy utilities -at least v4l2-compliance and cec-compliance- have to be built. Unfortunately the support of shared libraries (dlopen()) and fork() is a must have in v4l-utils (libv4l buildroot package).
This have been fixed by:
- revisiting --disable-libv4l to --disable-dyn-libv4l; first naming suggests that libv4l will not be built which is not the case
(only the dynamic support of libv4l is disabled in this case)
- for the sake of coherency, configure.ac variables USE_V4L2_CTL & USE_V4L2_COMPLIANCE have been changed to USE_V4L2_CTL_LIBV4L & USE_V4L2_COMPLIANCE_LIBV4L for the same reason.
- adding an option --disable-libv4l to really not build libv4l
- libraries which require dlopen() and libv4lconvert which
require fork(). For the sake of simplicity, the entire lib/ folder is not built with this option.
- The contrib/ folder is also not built in that case because of its dependency on libv4l/libv4lconvert libraries.
- The utility rds-ctl is also not built for the same reason.
- configure.ac is also fixed to not trig error on dlopen() missing, further test on "enable_shared" will automatically disable the build of libv4l and items which have libv4l has dependency.
- fix configure.ac to allow build of v4l-utils utilities with uclinux.
All those patches have been accepted upstream and are merged in master branch, see git://linuxtv.org/v4l-utils.git
d57bb8af0c71d82b702e35a7362aa077189dd593 configure.ac: add USE_LIBV4L to summary

Changes are needed in buildroot Config.in in order to remove MMU related dependencies and let throw build even if no MMU and no shared libraries support.

In order to build the V4L2 compliancy tools, below options have to be selected in buildroot menuconfig or platform configuration file:
+#v4l utilities
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+BR2_PACKAGE_LIBV4L=y
+BR2_PACKAGE_LIBV4L_UTILS=y

---

Hugues Fruchet (2):
package/libv4l: upstream patches for noMMU platform package/libv4l: build of v4l2 utilities on noMMU platform

 ...04-configure.ac-clarify-configure-summary.patch |  72 ++++++++++
 ...c-revisit-v4l2-ctl-compliance-using-libv4.patch |  43 ++++++
 ...c-revisit-disable-libv4l-to-disable-dyn-l.patch | 114 +++++++++++++++
 ...07-configure.ac-add-disable-libv4l-option.patch | 155 +++++++++++++++++++++
 ...gure.ac-fix-build-of-v4l-utils-on-uclinux.patch |  30 ++++
 ...09-configure.ac-add-USE_LIBV4L-to-summary.patch |  27 ++++
 package/libv4l/Config.in                           |  11 +-
 package/libv4l/libv4l.mk                           |   6 +
 8 files changed, 449 insertions(+), 9 deletions(-)
 create mode 100644 package/libv4l/0004-configure.ac-clarify-configure-summary.patch
 create mode 100644 package/libv4l/0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch
 create mode 100644 package/libv4l/0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch
 create mode 100644 package/libv4l/0007-configure.ac-add-disable-libv4l-option.patch
 create mode 100644 package/libv4l/0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch
 create mode 100644 package/libv4l/0009-configure.ac-add-USE_LIBV4L-to-summary.patch
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 package/libv4l: upstream patches for noMMU platform

In order to build v4l2 utilities such as compliancy tools like v4l2-compliance or cec-compliance, v4-utils can now be built without dynamic libraries support.
In that case the v4l-utils parts which depends on dynamic library support are not built:
- libv4l & libv4lconvert libraries
- libv4l plugins
- rds-ctl utility
- contrib test utilities
The rest of utilities are built.

---
 ...04-configure.ac-clarify-configure-summary.patch |  72 ++++++++++
 ...c-revisit-v4l2-ctl-compliance-using-libv4.patch |  43 ++++++
 ...c-revisit-disable-libv4l-to-disable-dyn-l.patch | 114 +++++++++++++++
 ...07-configure.ac-add-disable-libv4l-option.patch | 155 +++++++++++++++++++++
 ...gure.ac-fix-build-of-v4l-utils-on-uclinux.patch |  30 ++++
 ...09-configure.ac-add-USE_LIBV4L-to-summary.patch |  27 ++++
 package/libv4l/libv4l.mk                           |   6 +
 7 files changed, 447 insertions(+)
 create mode 100644 package/libv4l/0004-configure.ac-clarify-configure-summary.patch
 create mode 100644 package/libv4l/0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch
 create mode 100644 package/libv4l/0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch
 create mode 100644 package/libv4l/0007-configure.ac-add-disable-libv4l-option.patch
 create mode 100644 package/libv4l/0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch
 create mode 100644 package/libv4l/0009-configure.ac-add-USE_LIBV4L-to-summary.patch
package/libv4l/0004-configure.ac-clarify-configure-summary.patch new file +72 -0
new file mode 100644
index 0000000..7a690c9
@@ -0,0 +1,72 @@
+From f0871b0e6b7f42ab93bbb1dc780e2621a05362f3 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <[email protected]>
+Date: Mon, 15 May 2017 15:13:00 +0200
+Subject: [PATCH 4/9] configure.ac: clarify configure summary
+
+Some of the texts are rather obscure and misleading. Fix those.
+
+Signed-off-by: Hans Verkuil <[email protected]>
+---
+ configure.ac | 48 ++++++++++++++++++++++++------------------------
+ 1 file changed, 24 insertions(+), 24 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index e468b3a..3c70969 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -475,28 +475,28 @@ cat <<EOF
+ compile time options summary
+ ============================
+ 
+-    Host OS             : $host_os
+-    X11                 : $x11_pkgconfig
+-    GL                  : $gl_pkgconfig
+-    glu                 : $glu_pkgconfig
+-    libjpeg             : $have_jpeg
+-    libudev             : $have_libudev
+-    pthread             : $have_pthread
+-    QT version          : $QT_VERSION
+-    ALSA support        : $USE_ALSA
+-
+-    build dynamic libs  : $enable_shared
+-    build static libs   : $enable_static
+-
+-    gconv               : $USE_GCONV
+-
+-    libv4l              : $USE_LIBV4L
+-    v4l_plugins         : $USE_V4L_PLUGINS
+-    v4l_wrappers        : $USE_V4L_WRAPPERS
+-    libdvbv5            : $USE_LIBDVBV5
+-    dvbv5-daemon        : $USE_DVBV5_REMOTE
+-    v4lutils            : $USE_V4LUTILS
+-    qv4l2               : $USE_QV4L2
+-    v4l2-ctrl           : $USE_V4L2_CTL
+-    v4l2-compliance     : $USE_V4L2_COMPLIANCE
++    Host OS                    : $host_os
++    X11                        : $x11_pkgconfig
++    GL                         : $gl_pkgconfig
++    glu                        : $glu_pkgconfig
++    libjpeg                    : $have_jpeg
++    libudev                    : $have_libudev
++    pthread                    : $have_pthread
++    QT version                 : $QT_VERSION
++    ALSA support               : $USE_ALSA
++
++    build dynamic libs         : $enable_shared
++    build static libs          : $enable_static
++
++    gconv                      : $USE_GCONV
++
++    dynamic libv4l             : $USE_LIBV4L
++    v4l_plugins                : $USE_V4L_PLUGINS
++    v4l_wrappers               : $USE_V4L_WRAPPERS
++    libdvbv5                   : $USE_LIBDVBV5
++    dvbv5-daemon               : $USE_DVBV5_REMOTE
++    v4lutils                   : $USE_V4LUTILS
++    qv4l2                      : $USE_QV4L2
++    v4l2-ctl uses libv4l       : $USE_V4L2_CTL
++    v4l2-compliance uses libv4l: $USE_V4L2_COMPLIANCE
+ EOF
+-- 
+1.9.1
+
package/libv4l/0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch new file +43 -0

43 lines not on this page · raw message

package/libv4l/0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch new file +114 -0

114 lines not on this page · raw message

package/libv4l/0007-configure.ac-add-disable-libv4l-option.patch new file +155 -0

155 lines not on this page · raw message

package/libv4l/0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch new file +30 -0
new file mode 100644
index 0000000..8647174
@@ -0,0 +1,30 @@
+From bc8b0c0b29e60a20c26a7a80a61bd06d40246a0e Mon Sep 17 00:00:00 2001
+From: Hugues Fruchet <[email protected]>
+Date: Wed, 17 May 2017 10:03:12 +0200
+Subject: [PATCH 8/9] configure.ac: fix build of v4l-utils on uclinux
+
+Build of v4-utils is conditional to "linux_os=yes" which was
+not set in case of uclinux, fix this.
+
+Signed-off-by: Hugues Fruchet <[email protected]>
+Signed-off-by: Hans Verkuil <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b9fc59a..8dc676e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -149,7 +149,7 @@ AC_CHECK_FUNCS([__secure_getenv secure_getenv])
+ 
+ # Check host os
+ case "$host_os" in
+-  linux*)
++  *linux*)
+     linux_os="yes"
+     ;;
+   *freebsd*)
+-- 
+1.9.1
+
package/libv4l/0009-configure.ac-add-USE_LIBV4L-to-summary.patch new file +27 -0
new file mode 100644
index 0000000..ef4c14b
@@ -0,0 +1,27 @@
+From aa90a83a37329ebefebb80dab28cf1b54bc71c08 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <[email protected]>
+Date: Mon, 29 May 2017 07:55:18 +0200
+Subject: [PATCH 9/9] configure.ac: add USE_LIBV4L to summary
+
+This was missing, so add it.
+
+Signed-off-by: Hans Verkuil <[email protected]>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 8dc676e..9031b42 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -500,6 +500,7 @@ compile time options summary
+ 
+     gconv                      : $USE_GCONV
+ 
++    libv4l                     : $USE_LIBV4L
+     dynamic libv4l             : $USE_DYN_LIBV4L
+     v4l_plugins                : $USE_V4L_PLUGINS
+     v4l_wrappers               : $USE_V4L_WRAPPERS
+-- 
+1.9.1
+
package/libv4l/libv4l.mk +6 -0
index 08dc6cb..3162ff1 100644
@@ -82,4 +82,10 @@ endif
 
 LIBV4L_CONF_ENV += LIBS="$(LIBV4L_LIBS)"
 
+# we patch configure.ac
+define LIBV4L_RUN_BOOTSTRAP
+	cd $(@D) && ./bootstrap.sh
+endef
+LIBV4L_PRE_CONFIGURE_HOOKS += LIBV4L_RUN_BOOTSTRAP
+
 $(eval $(autotools-package))
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/2 package/libv4l: upstream patches for noMMU platform

Hello,

Quoted 11 lines · Hugues Fruchet

In order to build v4l2 utilities such as compliancy tools like v4l2-compliance or cec-compliance, v4-utils can now be built without dynamic libraries support.
In that case the v4l-utils parts which depends on dynamic library support are not built:
- libv4l & libv4lconvert libraries
- libv4l plugins
- rds-ctl utility
- contrib test utilities
The rest of utilities are built.

Quoted 1 line

Thanks a lot for those patches! It's mostly good, but I have a few comments. First of all, both of your patches should be squashed into just one, because they serve the same purpose: enabling libv4l on nommu/static linking configurations.

package/libv4l/0004-configure.ac-clarify-configure-summary.patch line 4

Quoted 4 lines
package/libv4l/0004-configure.ac-clarify-configure-summary.patch new file +4 -0
+From f0871b0e6b7f42ab93bbb1dc780e2621a05362f3 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <[email protected]>
+Date: Mon, 15 May 2017 15:13:00 +0200
+Subject: [PATCH 4/9] configure.ac: clarify configure summary

Please generate the package/libv4l/ patch series with "git format-patch -N" so that the prefix is just [PATCH] and not [PATCH X/Y].

package/libv4l/0004-configure.ac-clarify-configure-summary.patch line 8

Quoted 4 lines
package/libv4l/0004-configure.ac-clarify-configure-summary.patch new file +4 -0
+
+Some of the texts are rather obscure and misleading. Fix those.
+
+Signed-off-by: Hans Verkuil <[email protected]>

Please add your SoB to the patches you are adding into Buildroot.

Those two comments are valid for all four patches.

package/libv4l/libv4l.mk endif · line 89

Quoted 5 lines
package/libv4l/libv4l.mk +5 -0
+# we patch configure.ac
+define LIBV4L_RUN_BOOTSTRAP
+	cd $(@D) && ./bootstrap.sh
+endef
+LIBV4L_PRE_CONFIGURE_HOOKS += LIBV4L_RUN_BOOTSTRAP

Please use:

LIBV4L_AUTORECONF = YES

instead. What you did does not work because it requires host-autoconf, host-automake and host-libtool, and they are not added to the dependencies. <pkg>_AUTORECONF = YES does all of that for you. Please add a comment above this line that lists which patches required adding AUTORECONF = YES, so we know when we can remove AUTORECONF = YES.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#3 lore raw

PATCH 1/2 package/libv4l: upstream patches for noMMU platform

Many thanks Thomas for review, some answers/questions below:

Quoted 14 lines · Thomas Petazzoni

Hello,

Quoted 11 lines · Hugues Fruchet

In order to build v4l2 utilities such as compliancy tools like v4l2-compliance or cec-compliance, v4-utils can now be built without dynamic libraries support.
In that case the v4l-utils parts which depends on dynamic library support are not built:
- libv4l & libv4lconvert libraries
- libv4l plugins
- rds-ctl utility
- contrib test utilities
The rest of utilities are built.

Quoted 6 lines
Quoted 1 line

Thanks a lot for those patches! It's mostly good, but I have a few comments. First of all, both of your patches should be squashed into just one, because they serve the same purpose: enabling libv4l on nommu/static linking configurations.

I have done it this way in order that you can easily revert the patch 1/2 when bumping to v4l-utils 1.12.6 release (or 1.12.7, I don't know the frequency of releases).
The patch 2/2 is specific to buildroot and must remain.

Quoted 8 lines

package/libv4l/0004-configure.ac-clarify-configure-summary.patch line 4

Quoted 5 lines
package/libv4l/0004-configure.ac-clarify-configure-summary.patch new file +4 -0
+From f0871b0e6b7f42ab93bbb1dc780e2621a05362f3 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <[email protected]>
+Date: Mon, 15 May 2017 15:13:00 +0200
+Subject: [PATCH 4/9] configure.ac: clarify configure summary

Please generate the package/libv4l/ patch series with "git format-patch -N" so that the prefix is just [PATCH] and not [PATCH X/Y].

Will do ! I'll miss also the prefix [buildroot]...

Quoted 9 lines

package/libv4l/0004-configure.ac-clarify-configure-summary.patch line 8

Quoted 5 lines
package/libv4l/0004-configure.ac-clarify-configure-summary.patch new file +4 -0
+
+Some of the texts are rather obscure and misleading. Fix those.
+
+Signed-off-by: Hans Verkuil <[email protected]>

Please add your SoB to the patches you are adding into Buildroot.

Those two comments are valid for all four patches.

Will do.

Quoted 9 lines

package/libv4l/libv4l.mk endif · line 89

Quoted 6 lines
package/libv4l/libv4l.mk +5 -0
+# we patch configure.ac
+define LIBV4L_RUN_BOOTSTRAP
+	cd $(@D) && ./bootstrap.sh
+endef
+LIBV4L_PRE_CONFIGURE_HOOKS += LIBV4L_RUN_BOOTSTRAP

Please use:

Quoted 7 lines

LIBV4L_AUTORECONF = YES

instead. What you did does not work because it requires host-autoconf, host-automake and host-libtool, and they are not added to the dependencies. <pkg>_AUTORECONF = YES does all of that for you. Please add a comment above this line that lists which patches required adding AUTORECONF = YES, so we know when we can remove AUTORECONF = YES.

Will do.

Quoted 5 lines

Thanks!

Thomas

#4 lore raw

PATCH 1/2 package/libv4l: upstream patches for noMMU platform

Hello,

Quoted 9 lines · Hugues FRUCHET
Quoted 4 lines

Thanks a lot for those patches! It's mostly good, but I have a few comments. First of all, both of your patches should be squashed into just one, because they serve the same purpose: enabling libv4l on nommu/static linking configurations.

I have done it this way in order that you can easily revert the patch 1/2 when bumping to v4l-utils 1.12.6 release (or 1.12.7, I don't know the frequency of releases).
The patch 2/2 is specific to buildroot and must remain.

When we bump a package version and patches need to be dropped, we don't revert the commit that was adding them. We simply drop the patches in the commit doing the version bump, and indicate in the commit log why they are dropped (ideally with a reference to the upstream commit).

Quoted 5 lines
Quoted 4 lines
Quoted 1 line

+Subject: [PATCH 4/9] configure.ac: clarify configure summary

Please generate the package/libv4l/ patch series with "git format-patch -N" so that the prefix is just [PATCH] and not [PATCH X/Y].

Will do ! I'll miss also the prefix [buildroot]...

Not sure what you mean by the "prefix [buildroot]". The [Buildroot] is added by the mailing list software, and has nothing to do with how patches are generated/applied.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#5 lore raw

[Buildroot] From: Hugues Fruchet <[email protected]>

In reply to Hugues Fruchet

In order to pass V4L2 compliancy tests on STM32 devices -which are MMU less-, compliancy utilities -at least v4l2-compliance and cec-compliance- have to be built. Unfortunately the support of shared libraries (dlopen()) and fork() is a must have in v4l-utils (libv4l buildroot package).
This have been fixed by:
- revisiting --disable-libv4l to --disable-dyn-libv4l; first naming suggests that libv4l will not be built which is not the case
(only the dynamic support of libv4l is disabled in this case)
- for the sake of coherency, configure.ac variables USE_V4L2_CTL & USE_V4L2_COMPLIANCE have been changed to USE_V4L2_CTL_LIBV4L & USE_V4L2_COMPLIANCE_LIBV4L for the same reason.
- adding an option --disable-libv4l to really not build libv4l
- libraries which require dlopen() and libv4lconvert which
require fork(). For the sake of simplicity, the entire lib/ folder is not built with this option.
- The contrib/ folder is also not built in that case because of its dependency on libv4l/libv4lconvert libraries.
- The utility rds-ctl is also not built for the same reason.
- configure.ac is also fixed to not trig error on dlopen() missing, further test on "enable_shared" will automatically disable the build of libv4l and items which have libv4l has dependency.
- fix configure.ac to allow build of v4l-utils utilities with uclinux.
All those patches have been accepted upstream and are merged in master branch, see git://linuxtv.org/v4l-utils.git
d57bb8af0c71d82b702e35a7362aa077189dd593 configure.ac: add USE_LIBV4L to summary

Changes are needed in buildroot Config.in in order to remove MMU related dependencies and let throw build even if no MMU and no shared libraries support. Locale dependency has also been removed in Config.in, locale is not enabled on STM32 platform config but this is not preventing libv4l package build.

In order to build the V4L2 compliancy tools, below options have to be selected in buildroot menuconfig or platform configuration file:
+#v4l utilities
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+BR2_PACKAGE_LIBV4L=y
+BR2_PACKAGE_LIBV4L_UTILS=y

---
Changes v1 -> v2:
- Add Signed-off-by: Hugues Fruchet <[email protected]> in all patches
- use of LIBV4L_AUTORECONF = YES and document the related patches
- squased both noMMU related patches in a single one
- add a separate commit to remove "locale" dependency

Hugues Fruchet (2):
package/libv4l: build of v4l2 utilities on noMMU platform package/libv4l: toolchain w/ locale is not mandatory

 ...04-configure.ac-clarify-configure-summary.patch |  73 ++++++++++
 ...c-revisit-v4l2-ctl-compliance-using-libv4.patch |  43 ++++++
 ...c-revisit-disable-libv4l-to-disable-dyn-l.patch | 114 +++++++++++++++
 ...07-configure.ac-add-disable-libv4l-option.patch | 155 +++++++++++++++++++++
 ...gure.ac-fix-build-of-v4l-utils-on-uclinux.patch |  30 ++++
 ...09-configure.ac-add-USE_LIBV4L-to-summary.patch |  28 ++++
 package/libv4l/Config.in                           |  11 +-
 package/libv4l/libv4l.mk                           |   7 +
 8 files changed, 452 insertions(+), 9 deletions(-)
 create mode 100644 package/libv4l/0004-configure.ac-clarify-configure-summary.patch
 create mode 100644 package/libv4l/0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch
 create mode 100644 package/libv4l/0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch
 create mode 100644 package/libv4l/0007-configure.ac-add-disable-libv4l-option.patch
 create mode 100644 package/libv4l/0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch
 create mode 100644 package/libv4l/0009-configure.ac-add-USE_LIBV4L-to-summary.patch
Signature · 1 line
1.9.1
#6 lore raw

PATCH v2 1/1 package/libv4l: build of v4l2 utilities on noMMU platform

Remove dependencies on MMU and dynamic libraries. In order to build v4l2 utilities such as compliancy tools like v4l2-compliance or cec-compliance, v4-utils can now be built without dynamic libraries support.
In that case the v4l-utils parts which depends on dynamic library support are not built:
- libv4l & libv4lconvert libraries
- libv4l plugins
- rds-ctl utility
- contrib test utilities
The rest of utilities are built.

---
 ...04-configure.ac-clarify-configure-summary.patch |  73 ++++++++++
 ...c-revisit-v4l2-ctl-compliance-using-libv4.patch |  43 ++++++
 ...c-revisit-disable-libv4l-to-disable-dyn-l.patch | 114 +++++++++++++++
 ...07-configure.ac-add-disable-libv4l-option.patch | 155 +++++++++++++++++++++
 ...gure.ac-fix-build-of-v4l-utils-on-uclinux.patch |  30 ++++
 ...09-configure.ac-add-USE_LIBV4L-to-summary.patch |  28 ++++
 package/libv4l/Config.in                           |   7 +-
 package/libv4l/libv4l.mk                           |   7 +
 8 files changed, 452 insertions(+), 5 deletions(-)
 create mode 100644 package/libv4l/0004-configure.ac-clarify-configure-summary.patch
 create mode 100644 package/libv4l/0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch
 create mode 100644 package/libv4l/0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch
 create mode 100644 package/libv4l/0007-configure.ac-add-disable-libv4l-option.patch
 create mode 100644 package/libv4l/0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch
 create mode 100644 package/libv4l/0009-configure.ac-add-USE_LIBV4L-to-summary.patch
package/libv4l/0004-configure.ac-clarify-configure-summary.patch new file +73 -0
new file mode 100644
index 0000000..831e7d9
@@ -0,0 +1,73 @@
+From 069efd194cf4cb225075440ae58137ea6375fb8b Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <[email protected]>
+Date: Mon, 15 May 2017 15:13:00 +0200
+Subject: [PATCH 4/9] configure.ac: clarify configure summary
+
+Some of the texts are rather obscure and misleading. Fix those.
+
+Signed-off-by: Hans Verkuil <[email protected]>
+Signed-off-by: Hugues Fruchet <[email protected]>
+---
+ configure.ac | 48 ++++++++++++++++++++++++------------------------
+ 1 file changed, 24 insertions(+), 24 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index e468b3a..3c70969 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -475,28 +475,28 @@ cat <<EOF
+ compile time options summary
+ ============================
+ 
+-    Host OS             : $host_os
+-    X11                 : $x11_pkgconfig
+-    GL                  : $gl_pkgconfig
+-    glu                 : $glu_pkgconfig
+-    libjpeg             : $have_jpeg
+-    libudev             : $have_libudev
+-    pthread             : $have_pthread
+-    QT version          : $QT_VERSION
+-    ALSA support        : $USE_ALSA
+-
+-    build dynamic libs  : $enable_shared
+-    build static libs   : $enable_static
+-
+-    gconv               : $USE_GCONV
+-
+-    libv4l              : $USE_LIBV4L
+-    v4l_plugins         : $USE_V4L_PLUGINS
+-    v4l_wrappers        : $USE_V4L_WRAPPERS
+-    libdvbv5            : $USE_LIBDVBV5
+-    dvbv5-daemon        : $USE_DVBV5_REMOTE
+-    v4lutils            : $USE_V4LUTILS
+-    qv4l2               : $USE_QV4L2
+-    v4l2-ctrl           : $USE_V4L2_CTL
+-    v4l2-compliance     : $USE_V4L2_COMPLIANCE
++    Host OS                    : $host_os
++    X11                        : $x11_pkgconfig
++    GL                         : $gl_pkgconfig
++    glu                        : $glu_pkgconfig
++    libjpeg                    : $have_jpeg
++    libudev                    : $have_libudev
++    pthread                    : $have_pthread
++    QT version                 : $QT_VERSION
++    ALSA support               : $USE_ALSA
++
++    build dynamic libs         : $enable_shared
++    build static libs          : $enable_static
++
++    gconv                      : $USE_GCONV
++
++    dynamic libv4l             : $USE_LIBV4L
++    v4l_plugins                : $USE_V4L_PLUGINS
++    v4l_wrappers               : $USE_V4L_WRAPPERS
++    libdvbv5                   : $USE_LIBDVBV5
++    dvbv5-daemon               : $USE_DVBV5_REMOTE
++    v4lutils                   : $USE_V4LUTILS
++    qv4l2                      : $USE_QV4L2
++    v4l2-ctl uses libv4l       : $USE_V4L2_CTL
++    v4l2-compliance uses libv4l: $USE_V4L2_COMPLIANCE
+ EOF
+-- 
+1.9.1
+
package/libv4l/0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch new file +43 -0

43 lines not on this page · raw message

package/libv4l/0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch new file +114 -0

114 lines not on this page · raw message

package/libv4l/0007-configure.ac-add-disable-libv4l-option.patch new file +155 -0

155 lines not on this page · raw message

package/libv4l/0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch new file +30 -0
new file mode 100644
index 0000000..0141c57
@@ -0,0 +1,30 @@
+From f66141af12fe45af4ef3bba26e8f300fb203203a Mon Sep 17 00:00:00 2001
+From: Hugues Fruchet <[email protected]>
+Date: Wed, 17 May 2017 10:03:12 +0200
+Subject: [PATCH 8/9] configure.ac: fix build of v4l-utils on uclinux
+
+Build of v4-utils is conditional to "linux_os=yes" which was
+not set in case of uclinux, fix this.
+
+Signed-off-by: Hugues Fruchet <[email protected]>
+Signed-off-by: Hans Verkuil <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b9fc59a..8dc676e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -149,7 +149,7 @@ AC_CHECK_FUNCS([__secure_getenv secure_getenv])
+ 
+ # Check host os
+ case "$host_os" in
+-  linux*)
++  *linux*)
+     linux_os="yes"
+     ;;
+   *freebsd*)
+-- 
+1.9.1
+
package/libv4l/0009-configure.ac-add-USE_LIBV4L-to-summary.patch new file +28 -0
new file mode 100644
index 0000000..5ab1078
@@ -0,0 +1,28 @@
+From d92eb36658af05286c5aac7e1cc8a5013f766cb4 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <[email protected]>
+Date: Mon, 29 May 2017 07:55:18 +0200
+Subject: [PATCH 9/9] configure.ac: add USE_LIBV4L to summary
+
+This was missing, so add it.
+
+Signed-off-by: Hans Verkuil <[email protected]>
+Signed-off-by: Hugues Fruchet <[email protected]>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 8dc676e..9031b42 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -500,6 +500,7 @@ compile time options summary
+ 
+     gconv                      : $USE_GCONV
+ 
++    libv4l                     : $USE_LIBV4L
+     dynamic libv4l             : $USE_DYN_LIBV4L
+     v4l_plugins                : $USE_V4L_PLUGINS
+     v4l_wrappers               : $USE_V4L_WRAPPERS
+-- 
+1.9.1
+
package/libv4l/Config.in +2 -5
index 4da0034..8d1b931 100644
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_LIBV4L
 	bool "libv4l"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_USE_MMU # fork()
-	depends on !BR2_STATIC_LIBS # dlopen()
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # media headers
 	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
@@ -42,7 +40,6 @@ comment "libv4l-utils tools need a toolchain w/ locale"
 
 endif
 
-comment "libv4l needs a toolchain w/ threads, dynamic library, C++ and headers >= 3.0"
-	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \
+comment "libv4l needs a toolchain w/ threads, C++ and headers >= 3.0"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS \
 		|| !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
package/libv4l/libv4l.mk +7 -0
index 08dc6cb..4e7aa42 100644
@@ -13,6 +13,13 @@ LIBV4L_CONF_OPTS = --disable-doxygen-doc
 
 # 0003-utils-qv4l2-Makefile.am-link-with-librt.patch, host-gettext
 # needed for autoreconf to work
+# below patches requires autoreconf:
+# 0004-configure.ac-clarify-configure-summary.patch
+# 0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch
+# 0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch
+# 0007-configure.ac-add-disable-libv4l-option.patch
+# 0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch
+# 0009-configure.ac-add-USE_LIBV4L-to-summary.patch
 LIBV4L_AUTORECONF = YES
 LIBV4L_DEPENDENCIES += host-gettext
 
Signature · 1 line
1.9.1
#7 lore raw

PATCH v2 1/1 package/libv4l: toolchain w/ locale is not mandatory

In reply to Hugues Fruchet

libv4l package builds fine even if locale is not enabled. This have been tested with stm32f469_disco_defconfig enabling build of libv4l package:
+#v4l utilities
+BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_PACKAGE_LIBV4L=y +BR2_PACKAGE_LIBV4L_UTILS=y

---
 package/libv4l/Config.in | 4 ----
 1 file changed, 4 deletions(-)
package/libv4l/Config.in +0 -4
index 8d1b931..638aeff 100644
@@ -19,7 +19,6 @@ comment "libv4l JPEG support not enabled"
 
 config BR2_PACKAGE_LIBV4L_UTILS
 	bool "v4l-utils tools"
-	depends on BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  v4l-utils is a collection of various video4linux and DVB utilities.
@@ -35,9 +34,6 @@ config BR2_PACKAGE_LIBV4L_UTILS
 	  - rds-ctl
 	  - qv4l2 (if Qt is enabled)
 
-comment "libv4l-utils tools need a toolchain w/ locale"
-	depends on !BR2_ENABLE_LOCALE
-
 endif
 
 comment "libv4l needs a toolchain w/ threads, C++ and headers >= 3.0"
Signature · 1 line
1.9.1
#8 lore raw

PATCH 2/2 package/libv4l: build of v4l2 utilities on noMMU platform

In reply to Hugues Fruchet

Remove dependencies on MMU, dynamic libraries and locale

---
 package/libv4l/Config.in | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
package/libv4l/Config.in +2 -9
index 4da0034..638aeff 100644
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_LIBV4L
 	bool "libv4l"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_USE_MMU # fork()
-	depends on !BR2_STATIC_LIBS # dlopen()
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # media headers
 	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
@@ -21,7 +19,6 @@ comment "libv4l JPEG support not enabled"
 
 config BR2_PACKAGE_LIBV4L_UTILS
 	bool "v4l-utils tools"
-	depends on BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  v4l-utils is a collection of various video4linux and DVB utilities.
@@ -37,12 +34,8 @@ config BR2_PACKAGE_LIBV4L_UTILS
 	  - rds-ctl
 	  - qv4l2 (if Qt is enabled)
 
-comment "libv4l-utils tools need a toolchain w/ locale"
-	depends on !BR2_ENABLE_LOCALE
-
 endif
 
-comment "libv4l needs a toolchain w/ threads, dynamic library, C++ and headers >= 3.0"
-	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \
+comment "libv4l needs a toolchain w/ threads, C++ and headers >= 3.0"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS \
 		|| !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
Signature · 1 line
1.9.1
#9 lore raw

PATCH 2/2 package/libv4l: build of v4l2 utilities on noMMU platform

Hello,

Quoted 3 lines · Hugues Fruchet

Remove dependencies on MMU, dynamic libraries and locale

The removal of the dependencies on MMU and dynamic library should be part of the previous patch, as I said in the other review.

However, the removal of the locale dependency, I'm not sure. Is it fixed by your previous patch? Is it already fixed in v4l ?

Also, you want to review all packages that "select BR2_PACKAGE_LIBV4L", and investigate whether we can remove the MMU/dynamic library dependencies on those packages.

You're lucky, there are only two such packages:

package/v4l2grab/Config.in: select BR2_PACKAGE_LIBV4L
package/zbar/Config.in: select BR2_PACKAGE_LIBV4L

Adjusting those packages (if applicable) can however be done in separate patches.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#10 lore raw

PATCH 2/2 package/libv4l: build of v4l2 utilities on noMMU platform

Quoted 5 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · Hugues Fruchet

Remove dependencies on MMU, dynamic libraries and locale

Quoted 7 lines
Quoted 1 line

The removal of the dependencies on MMU and dynamic library should be part of the previous patch, as I said in the other review.

However, the removal of the locale dependency, I'm not sure. Is it fixed by your previous patch? Is it already fixed in v4l ?

On my environment (STM32F4), BR2_ENABLE_LOCALE is not set but this is not preventing libv4l package build. It is not clear to me why this dependency is there.

Quoted 5 lines

Also, you want to review all packages that "select BR2_PACKAGE_LIBV4L", and investigate whether we can remove the MMU/dynamic library dependencies on those packages.

Quoted 7 lines

You're lucky, there are only two such packages:

package/v4l2grab/Config.in: select BR2_PACKAGE_LIBV4L
package/zbar/Config.in: select BR2_PACKAGE_LIBV4L

Adjusting those packages (if applicable) can however be done in separate patches.

Ok I will have a look to those packages.

Quoted 5 lines

Thanks!

Thomas

#11 lore raw

PATCH 2/2 package/libv4l: build of v4l2 utilities on noMMU platform

Hello,

Quoted 5 lines · Hugues FRUCHET
Quoted 2 lines

However, the removal of the locale dependency, I'm not sure. Is it fixed by your previous patch? Is it already fixed in v4l ?

On my environment (STM32F4), BR2_ENABLE_LOCALE is not set but this is not preventing libv4l package build. It is not clear to me why this dependency is there.

OK. It could be that an older version of libv4l required locale support, but it is no longer needed.

In any case, it is a separate matter, so it should be a separate patch.

Quoted 6 lines
Quoted 5 lines

package/v4l2grab/Config.in: select BR2_PACKAGE_LIBV4L
package/zbar/Config.in: select BR2_PACKAGE_LIBV4L

Adjusting those packages (if applicable) can however be done in separate patches.

Ok I will have a look to those packages.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#12 lore raw

PATCH v2 1/1 v4l-utils build on noMMU platform

In reply to Hugues Fruchet

In order to pass V4L2 compliancy tests on STM32 devices -which are MMU less-, compliancy utilities -at least v4l2-compliance and cec-compliance- have to be built. Unfortunately the support of shared libraries (dlopen()) and fork() is a must have in v4l-utils (libv4l buildroot package).
This have been fixed by:
- revisiting --disable-libv4l to --disable-dyn-libv4l; first naming suggests that libv4l will not be built which is not the case
(only the dynamic support of libv4l is disabled in this case)
- for the sake of coherency, configure.ac variables USE_V4L2_CTL & USE_V4L2_COMPLIANCE have been changed to USE_V4L2_CTL_LIBV4L & USE_V4L2_COMPLIANCE_LIBV4L for the same reason.
- adding an option --disable-libv4l to really not build libv4l
- libraries which require dlopen() and libv4lconvert which
require fork(). For the sake of simplicity, the entire lib/ folder is not built with this option.
- The contrib/ folder is also not built in that case because of its dependency on libv4l/libv4lconvert libraries.
- The utility rds-ctl is also not built for the same reason.
- configure.ac is also fixed to not trig error on dlopen() missing, further test on "enable_shared" will automatically disable the build of libv4l and items which have libv4l has dependency.
- fix configure.ac to allow build of v4l-utils utilities with uclinux.
All those patches have been accepted upstream and are merged in master branch, see git://linuxtv.org/v4l-utils.git
d57bb8af0c71d82b702e35a7362aa077189dd593 configure.ac: add USE_LIBV4L to summary

Changes are needed in buildroot Config.in in order to remove MMU related dependencies and let throw build even if no MMU and no shared libraries support. Locale dependency has also been removed in Config.in, locale is not enabled on STM32 platform config but this is not preventing libv4l package build.

In order to build the V4L2 compliancy tools, below options have to be selected in buildroot menuconfig or platform configuration file:
+#v4l utilities
+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+BR2_PACKAGE_LIBV4L=y
+BR2_PACKAGE_LIBV4L_UTILS=y

---
Changes v1 -> v2:
- Add Signed-off-by: Hugues Fruchet <[email protected]> in all patches
- use of LIBV4L_AUTORECONF = YES and document the related patches
- squased both noMMU related patches in a single one
- add a separate commit to remove "locale" dependency

Hugues Fruchet (2):
package/libv4l: build of v4l2 utilities on noMMU platform package/libv4l: toolchain w/ locale is not mandatory

 ...04-configure.ac-clarify-configure-summary.patch |  73 ++++++++++
 ...c-revisit-v4l2-ctl-compliance-using-libv4.patch |  43 ++++++
 ...c-revisit-disable-libv4l-to-disable-dyn-l.patch | 114 +++++++++++++++
 ...07-configure.ac-add-disable-libv4l-option.patch | 155 +++++++++++++++++++++
 ...gure.ac-fix-build-of-v4l-utils-on-uclinux.patch |  30 ++++
 ...09-configure.ac-add-USE_LIBV4L-to-summary.patch |  28 ++++
 package/libv4l/Config.in                           |  11 +-
 package/libv4l/libv4l.mk                           |   7 +
 8 files changed, 452 insertions(+), 9 deletions(-)
 create mode 100644 package/libv4l/0004-configure.ac-clarify-configure-summary.patch
 create mode 100644 package/libv4l/0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch
 create mode 100644 package/libv4l/0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch
 create mode 100644 package/libv4l/0007-configure.ac-add-disable-libv4l-option.patch
 create mode 100644 package/libv4l/0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch
 create mode 100644 package/libv4l/0009-configure.ac-add-USE_LIBV4L-to-summary.patch
Signature · 1 line
1.9.1
#13 lore raw

PATCH v2 1/1 package/libv4l: build of v4l2 utilities on noMMU platform

Remove dependencies on MMU and dynamic libraries. In order to build v4l2 utilities such as compliancy tools like v4l2-compliance or cec-compliance, v4-utils can now be built without dynamic libraries support.
In that case the v4l-utils parts which depends on dynamic library support are not built:
- libv4l & libv4lconvert libraries
- libv4l plugins
- rds-ctl utility
- contrib test utilities
The rest of utilities are built.

---
 ...04-configure.ac-clarify-configure-summary.patch |  73 ++++++++++
 ...c-revisit-v4l2-ctl-compliance-using-libv4.patch |  43 ++++++
 ...c-revisit-disable-libv4l-to-disable-dyn-l.patch | 114 +++++++++++++++
 ...07-configure.ac-add-disable-libv4l-option.patch | 155 +++++++++++++++++++++
 ...gure.ac-fix-build-of-v4l-utils-on-uclinux.patch |  30 ++++
 ...09-configure.ac-add-USE_LIBV4L-to-summary.patch |  28 ++++
 package/libv4l/Config.in                           |   7 +-
 package/libv4l/libv4l.mk                           |   7 +
 8 files changed, 452 insertions(+), 5 deletions(-)
 create mode 100644 package/libv4l/0004-configure.ac-clarify-configure-summary.patch
 create mode 100644 package/libv4l/0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch
 create mode 100644 package/libv4l/0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch
 create mode 100644 package/libv4l/0007-configure.ac-add-disable-libv4l-option.patch
 create mode 100644 package/libv4l/0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch
 create mode 100644 package/libv4l/0009-configure.ac-add-USE_LIBV4L-to-summary.patch
package/libv4l/0004-configure.ac-clarify-configure-summary.patch new file +73 -0
new file mode 100644
index 0000000..831e7d9
@@ -0,0 +1,73 @@
+From 069efd194cf4cb225075440ae58137ea6375fb8b Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <[email protected]>
+Date: Mon, 15 May 2017 15:13:00 +0200
+Subject: [PATCH 4/9] configure.ac: clarify configure summary
+
+Some of the texts are rather obscure and misleading. Fix those.
+
+Signed-off-by: Hans Verkuil <[email protected]>
+Signed-off-by: Hugues Fruchet <[email protected]>
+---
+ configure.ac | 48 ++++++++++++++++++++++++------------------------
+ 1 file changed, 24 insertions(+), 24 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index e468b3a..3c70969 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -475,28 +475,28 @@ cat <<EOF
+ compile time options summary
+ ============================
+ 
+-    Host OS             : $host_os
+-    X11                 : $x11_pkgconfig
+-    GL                  : $gl_pkgconfig
+-    glu                 : $glu_pkgconfig
+-    libjpeg             : $have_jpeg
+-    libudev             : $have_libudev
+-    pthread             : $have_pthread
+-    QT version          : $QT_VERSION
+-    ALSA support        : $USE_ALSA
+-
+-    build dynamic libs  : $enable_shared
+-    build static libs   : $enable_static
+-
+-    gconv               : $USE_GCONV
+-
+-    libv4l              : $USE_LIBV4L
+-    v4l_plugins         : $USE_V4L_PLUGINS
+-    v4l_wrappers        : $USE_V4L_WRAPPERS
+-    libdvbv5            : $USE_LIBDVBV5
+-    dvbv5-daemon        : $USE_DVBV5_REMOTE
+-    v4lutils            : $USE_V4LUTILS
+-    qv4l2               : $USE_QV4L2
+-    v4l2-ctrl           : $USE_V4L2_CTL
+-    v4l2-compliance     : $USE_V4L2_COMPLIANCE
++    Host OS                    : $host_os
++    X11                        : $x11_pkgconfig
++    GL                         : $gl_pkgconfig
++    glu                        : $glu_pkgconfig
++    libjpeg                    : $have_jpeg
++    libudev                    : $have_libudev
++    pthread                    : $have_pthread
++    QT version                 : $QT_VERSION
++    ALSA support               : $USE_ALSA
++
++    build dynamic libs         : $enable_shared
++    build static libs          : $enable_static
++
++    gconv                      : $USE_GCONV
++
++    dynamic libv4l             : $USE_LIBV4L
++    v4l_plugins                : $USE_V4L_PLUGINS
++    v4l_wrappers               : $USE_V4L_WRAPPERS
++    libdvbv5                   : $USE_LIBDVBV5
++    dvbv5-daemon               : $USE_DVBV5_REMOTE
++    v4lutils                   : $USE_V4LUTILS
++    qv4l2                      : $USE_QV4L2
++    v4l2-ctl uses libv4l       : $USE_V4L2_CTL
++    v4l2-compliance uses libv4l: $USE_V4L2_COMPLIANCE
+ EOF
+-- 
+1.9.1
+
package/libv4l/0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch new file +43 -0

43 lines not on this page · raw message

package/libv4l/0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch new file +114 -0

114 lines not on this page · raw message

package/libv4l/0007-configure.ac-add-disable-libv4l-option.patch new file +155 -0

155 lines not on this page · raw message

package/libv4l/0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch new file +30 -0
new file mode 100644
index 0000000..0141c57
@@ -0,0 +1,30 @@
+From f66141af12fe45af4ef3bba26e8f300fb203203a Mon Sep 17 00:00:00 2001
+From: Hugues Fruchet <[email protected]>
+Date: Wed, 17 May 2017 10:03:12 +0200
+Subject: [PATCH 8/9] configure.ac: fix build of v4l-utils on uclinux
+
+Build of v4-utils is conditional to "linux_os=yes" which was
+not set in case of uclinux, fix this.
+
+Signed-off-by: Hugues Fruchet <[email protected]>
+Signed-off-by: Hans Verkuil <[email protected]>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b9fc59a..8dc676e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -149,7 +149,7 @@ AC_CHECK_FUNCS([__secure_getenv secure_getenv])
+ 
+ # Check host os
+ case "$host_os" in
+-  linux*)
++  *linux*)
+     linux_os="yes"
+     ;;
+   *freebsd*)
+-- 
+1.9.1
+
package/libv4l/0009-configure.ac-add-USE_LIBV4L-to-summary.patch new file +28 -0
new file mode 100644
index 0000000..5ab1078
@@ -0,0 +1,28 @@
+From d92eb36658af05286c5aac7e1cc8a5013f766cb4 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <[email protected]>
+Date: Mon, 29 May 2017 07:55:18 +0200
+Subject: [PATCH 9/9] configure.ac: add USE_LIBV4L to summary
+
+This was missing, so add it.
+
+Signed-off-by: Hans Verkuil <[email protected]>
+Signed-off-by: Hugues Fruchet <[email protected]>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 8dc676e..9031b42 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -500,6 +500,7 @@ compile time options summary
+ 
+     gconv                      : $USE_GCONV
+ 
++    libv4l                     : $USE_LIBV4L
+     dynamic libv4l             : $USE_DYN_LIBV4L
+     v4l_plugins                : $USE_V4L_PLUGINS
+     v4l_wrappers               : $USE_V4L_WRAPPERS
+-- 
+1.9.1
+
package/libv4l/Config.in +2 -5
index 4da0034..8d1b931 100644
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_LIBV4L
 	bool "libv4l"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_USE_MMU # fork()
-	depends on !BR2_STATIC_LIBS # dlopen()
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # media headers
 	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
@@ -42,7 +40,6 @@ comment "libv4l-utils tools need a toolchain w/ locale"
 
 endif
 
-comment "libv4l needs a toolchain w/ threads, dynamic library, C++ and headers >= 3.0"
-	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \
+comment "libv4l needs a toolchain w/ threads, C++ and headers >= 3.0"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS \
 		|| !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
package/libv4l/libv4l.mk +7 -0
index 08dc6cb..4e7aa42 100644
@@ -13,6 +13,13 @@ LIBV4L_CONF_OPTS = --disable-doxygen-doc
 
 # 0003-utils-qv4l2-Makefile.am-link-with-librt.patch, host-gettext
 # needed for autoreconf to work
+# below patches requires autoreconf:
+# 0004-configure.ac-clarify-configure-summary.patch
+# 0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch
+# 0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch
+# 0007-configure.ac-add-disable-libv4l-option.patch
+# 0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch
+# 0009-configure.ac-add-USE_LIBV4L-to-summary.patch
 LIBV4L_AUTORECONF = YES
 LIBV4L_DEPENDENCIES += host-gettext
 
Signature · 1 line
1.9.1
#14 lore raw

PATCH v2 1/1 package/libv4l: toolchain w/ locale is not mandatory

In reply to Hugues Fruchet

libv4l package builds fine even if locale is not enabled. This have been tested with stm32f469_disco_defconfig enabling build of libv4l package:
+#v4l utilities
+BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_PACKAGE_LIBV4L=y +BR2_PACKAGE_LIBV4L_UTILS=y

---
 package/libv4l/Config.in | 4 ----
 1 file changed, 4 deletions(-)
package/libv4l/Config.in +0 -4
index 8d1b931..638aeff 100644
@@ -19,7 +19,6 @@ comment "libv4l JPEG support not enabled"
 
 config BR2_PACKAGE_LIBV4L_UTILS
 	bool "v4l-utils tools"
-	depends on BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  v4l-utils is a collection of various video4linux and DVB utilities.
@@ -35,9 +34,6 @@ config BR2_PACKAGE_LIBV4L_UTILS
 	  - rds-ctl
 	  - qv4l2 (if Qt is enabled)
 
-comment "libv4l-utils tools need a toolchain w/ locale"
-	depends on !BR2_ENABLE_LOCALE
-
 endif
 
 comment "libv4l needs a toolchain w/ threads, C++ and headers >= 3.0"
Signature · 1 line
1.9.1
#15 lore raw

PATCH v2 1/1 v4l-utils build on noMMU platform

In reply to Hugues Fruchet

Hello,

Quoted 3 lines · Hugues Fruchet

Hugues Fruchet (2):
package/libv4l: build of v4l2 utilities on noMMU platform package/libv4l: toolchain w/ locale is not mandatory

Thanks. Both patches applied!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#16 lore raw

PATCH v2 1/1 v4l-utils build on noMMU platform

Thanks Thomas !

Quoted 12 lines · Thomas Petazzoni

Hello,

Quoted 3 lines · Hugues Fruchet

Hugues Fruchet (2):
package/libv4l: build of v4l2 utilities on noMMU platform package/libv4l: toolchain w/ locale is not mandatory

Thanks. Both patches applied!

Thomas