v4l-utils: update to 1.20.0
PATCH 1/1 v4l-utils: update to 1.20.0
Add new buildtime configuration options, update context of two patches and remove two patches as there are fixes [1]-[3] found upstream in the meantime.
[1] 38f4ce74275a ("keytable: use input_event properly")
[2] 8b7e6ce9367f ("keytable: add compatibility for input_event_sec")
[3] 976a2f681b4e ("keymap.h needs sys/types.h and argp.h with musl")
---
...k-mc_nextgen_test-with-libargp-if-ne.patch | 2 +-
...fine-error_t-and-include-sys-types.h.patch | 45 -------------------
...ld-on-32bit-arches-with-64bit-time_t.patch | 41 -----------------
.../v4l-utils/0007-Do-not-use-getsubopt.patch | 2 +-
...4l-utils_1.18.1.bb => v4l-utils_1.20.0.bb} | 10 ++---
5 files changed, 7 insertions(+), 93 deletions(-)
delete mode 100644 meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch
delete mode 100644 meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch
rename meta-oe/recipes-multimedia/v4l2apps/{v4l-utils_1.18.1.bb => v4l-utils_1.20.0.bb} (86%)meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch +1 -1
@@ -14,7 +14,7 @@ diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am index 0188fe2..dac07f3 100644 --- a/contrib/test/Makefile.am +++ b/contrib/test/Makefile.am -@@ -40,7 +40,7 @@ sdlcam_CFLAGS = -I../.. $(SDL2_CFLAGS) +@@ -42,7 +42,7 @@ sdlcam_CFLAGS = -I../.. $(SDL2_CFLAGS) sdlcam_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la mc_nextgen_test_CFLAGS = $(LIBUDEV_CFLAGS)
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch deleted +0 -45
45 lines not on this page · raw message
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch deleted +0 -41
41 lines not on this page · raw message
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch +1 -1
@@ -20,7 +20,7 @@ diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common index 651917e..cea57b7 100644 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp -@@ -782,15 +782,17 @@ static bool parse_subset(char *optarg) +@@ -785,15 +785,17 @@ static bool parse_subset(char *optarg) static bool parse_next_subopt(char **subs, char **value) {
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb renamed from meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.1.bb +5 -5
@@ -20,14 +20,14 @@ SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \ file://mediactl-pkgconfig.patch \ file://export-mediactl-headers.patch \ file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \ - file://0005-Define-error_t-and-include-sys-types.h.patch \ - file://0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ file://0007-Do-not-use-getsubopt.patch \ " -SRC_URI[md5sum] = "ff2dd75970683be9a301ed949b3372b3" -SRC_URI[sha256sum] = "25fc42253722401f8742f04dc50a444dfa9b75378e7d09b55035bcbb44c5f342" +SRC_URI[md5sum] = "46f9e2c0b2fdccd009da2f7e1aa87894" +SRC_URI[sha256sum] = "956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7" -EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev" +EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev \ + --disable-v4l2-compliance-32 --disable-v4l2-ctl-32 \ + --with-systemdsystemunitdir=${systemd_system_unitdir}" VIRTUAL-RUNTIME_ir-keytable-keymaps ?= "rc-keymaps"
Signature · 1 line
2.29.2
I am seeing some packaging errors
https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/988
I have sent a followup patch, but please review it and test it out if its the right way when systemd is in DISTRO_FEATURES
Quoted 175 lines · Ulrich ?lmann
Add new buildtime configuration options, update context of two patches and remove two patches as there are fixes [1]-[3] found upstream in the meantime.
[1]
38f4ce74275a("keytable: useinput_eventproperly")
[2]8b7e6ce9367f("keytable: add compatibility forinput_event_sec")
[3]976a2f681b4e("keymap.hneedssys/types.handargp.hwith musl")Signed-off-by Ulrich Ölmann <[email protected]>--- ...k-mc_nextgen_test-with-libargp-if-ne.patch | 2 +- ...fine-error_t-and-include-sys-types.h.patch | 45 ------------------- ...ld-on-32bit-arches-with-64bit-time_t.patch | 41 ----------------- .../v4l-utils/0007-Do-not-use-getsubopt.patch | 2 +- ...4l-utils_1.18.1.bb => v4l-utils_1.20.0.bb} | 10 ++--- 5 files changed, 7 insertions(+), 93 deletions(-)delete mode 100644
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patchdelete mode 100644meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patchrename meta-oe/recipes-multimedia/v4l2apps/{v4l-utils_1.18.1.bb => v4l-utils_1.20.0.bb} (86%)meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch +1
-1@@ -14,7 +14,7 @@ diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am index 0188fe2..dac07f3 100644 --- a/contrib/test/Makefile.am +++ b/contrib/test/Makefile.am -@@ -40,7 +40,7 @@ sdlcam_CFLAGS = -I../.. $(SDL2_CFLAGS) +@@ -42,7 +42,7 @@ sdlcam_CFLAGS = -I../.. $(SDL2_CFLAGS) sdlcam_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la mc_nextgen_test_CFLAGS = $(LIBUDEV_CFLAGS)meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch deleted +0
-45@@ -1,45 +0,0 @@ -From 137ce23ae677b11e5483ef810751edae7bf96bb9 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sat, 30 Nov 2019 18:40:06 -0800 -Subject: [PATCH] Define error_t and include sys/types.h - -Fix 'unknown type name' for error_t and u_int32_t. -u_int32_t is defined in sys/type.h - -Signed-off-by: Khem Raj <[email protected]> ---- - utils/ir-ctl/keymap.h | 4 ++++ - utils/keytable/keymap.h | 5 +++++ - 2 files changed, 9 insertions(+) - -diff --git a/utils/ir-ctl/keymap.h b/utils/ir-ctl/keymap.h -index f2b2963..1f8a3f8 100644 ---- a/utils/ir-ctl/keymap.h -+++ b/utils/ir-ctl/keymap.h -@@ -2,6 +2,10 @@ - #ifndef __KEYMAP_H - #define __KEYMAP_H - -+#include <sys/types.h> -+#ifndef error_t -+typedef int error_t; -+#endif - struct keymap { - struct keymap *next; - char *name; -diff --git a/utils/keytable/keymap.h b/utils/keytable/keymap.h -index f2b2963..345d55d 100644 ---- a/utils/keytable/keymap.h -+++ b/utils/keytable/keymap.h -@@ -2,6 +2,11 @@ - #ifndef __KEYMAP_H - #define __KEYMAP_H - -+#include <sys/types.h> -+#ifndef error_t -+typedef int error_t; -+#endif -+ - struct keymap { - struct keymap *next; - char *name;meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch deleted +0
-41@@ -1,41 +0,0 @@ -From b213da2d5fcc93cd24fc880c71c717d8e2ce2968 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sat, 30 Nov 2019 18:43:21 -0800 -Subject: [PATCH] Fix build on 32bit arches with 64bit time_t - -time element is deprecated on new input_event structure in kernel's -input.h [1] - -[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f - -Upstream-Status: Pending -Signed-off-by: Khem Raj <[email protected]> ---- - utils/keytable/keytable.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c -index 6cb0217..59ff1ee 100644 ---- a/utils/keytable/keytable.c -+++ b/utils/keytable/keytable.c -@@ -53,6 +53,11 @@ - - # define N_(string) string - -+#ifndef input_event_sec -+#define input_event_sec time.tv_sec -+#define input_event_usec time.tv_usec -+#endif -+ - struct input_keymap_entry_v2 { - #define KEYMAP_BY_INDEX (1 << 0) - u_int8_t flags; -@@ -1533,7 +1538,7 @@ static void test_event(struct rc_device *rc_dev, int fd) - - for (i = 0; i < rd / sizeof(struct input_event); i++) { - printf(_("%ld.%06ld: event type %s(0x%02x)"), -- ev[i].time.tv_sec, ev[i].time.tv_usec, -+ ev[i].input_event_sec, ev[i].input_event_usec, - get_event_name(events_type, ev[i].type), ev[i].type); - - switch (ev[i].type) {meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch +1
-1@@ -20,7 +20,7 @@ diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common index 651917e..cea57b7 100644 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp -@@ -782,15 +782,17 @@ static bool parse_subset(char *optarg) +@@ -785,15 +785,17 @@ static bool parse_subset(char *optarg) static bool parse_next_subopt(char **subs, char **value) {meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb renamed from meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.1.bb +5
-5@@ -20,14 +20,14 @@ SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \ file://mediactl-pkgconfig.patch \ file://export-mediactl-headers.patch \ file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \ - file://0005-Define-error_t-and-include-sys-types.h.patch \ - file://0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ file://0007-Do-not-use-getsubopt.patch \ " -SRC_URI[md5sum] = "ff2dd75970683be9a301ed949b3372b3" -SRC_URI[sha256sum] = "25fc42253722401f8742f04dc50a444dfa9b75378e7d09b55035bcbb44c5f342" +SRC_URI[md5sum] = "46f9e2c0b2fdccd009da2f7e1aa87894" +SRC_URI[sha256sum] = "956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7" -EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev" +EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev \ + --disable-v4l2-compliance-32 --disable-v4l2-ctl-32 \ + --with-systemdsystemunitdir=${systemd_system_unitdir}" VIRTUAL-RUNTIME_ir-keytable-keymaps ?= "rc-keymaps"
Hi Khem,
Quoted 3 lines · Khem Raj
I am seeing some packaging errors
https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/988
now it's getting interesting as I did not see this problem when testing my package upgrade. Digging deeper reveals that "50-rc_keymap.conf" (the file in question) is only conditionally installed [1] (the reason for this can be found in the discussion starting with [2]). Nevertheless the actual condition for installing it or not is evaluated in [3] and does not check the target system but the build host (and this is where the autobuilder and my build system must differ). As we use systemd v247 in OpenEmbedded master that check should return true in our case. Alternatively one could introduce a new configure option for installing that file or not and by that forward the choice to the v4l-utils recipe. Both could be achieved by a simple patch to configure.ac.
As all this is necessary to compile BPF programs for IR protocols I would like to ask the question if this will be possible at all as one would need to have a working clang environment for that, see [4]-[6].
Do you know by accident a competent clang expert to answer that? ;-)
If there is no chance to get this running anyway, then it's not worth the effort and it would be best to instead just add "--disable-bpf" to EXTRA_OECONF and patch [1] to not install "50-rc_keymap.conf" at all.
What do you think?
Best regards
Ulrich
[1] https://git.linuxtv.org/v4l-utils.git/tree/utils/keytable/Makefile.am?h=v4l-utils-1.20.0#n6
[2] https://github.com/systemd/systemd/issues/13787#issuecomment-645972607
[3] https://git.linuxtv.org/v4l-utils.git/tree/configure.ac?h=v4l-utils-1.20.0#n558
[4] https://git.linuxtv.org/v4l-utils.git/tree/configure.ac?h=v4l-utils-1.20.0#n180
[5] https://git.linuxtv.org/v4l-utils.git/tree/configure.ac?h=v4l-utils-1.20.0#n552
[6] https://git.linuxtv.org/v4l-utils.git/tree/utils/keytable/bpf_protocols/Makefile.am?h=v4l-utils-1.20.0#n11
Quoted 181 lines
I have sent a followup patch, but please review it and test it out if its the right way when systemd is in
DISTRO_FEATURESQuoted 175 lines · Ulrich ?lmann
Add new buildtime configuration options, update context of two patches and remove two patches as there are fixes [1]-[3] found upstream in the meantime.
[1]
38f4ce74275a("keytable: useinput_eventproperly")
[2]8b7e6ce9367f("keytable: add compatibility forinput_event_sec")
[3]976a2f681b4e("keymap.hneedssys/types.handargp.hwith musl")Signed-off-by Ulrich Ölmann <[email protected]>--- ...k-mc_nextgen_test-with-libargp-if-ne.patch | 2 +- ...fine-error_t-and-include-sys-types.h.patch | 45 ------------------- ...ld-on-32bit-arches-with-64bit-time_t.patch | 41 ----------------- .../v4l-utils/0007-Do-not-use-getsubopt.patch | 2 +- ...4l-utils_1.18.1.bb => v4l-utils_1.20.0.bb} | 10 ++--- 5 files changed, 7 insertions(+), 93 deletions(-)delete mode 100644
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patchdelete mode 100644meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patchrename meta-oe/recipes-multimedia/v4l2apps/{v4l-utils_1.18.1.bb => v4l-utils_1.20.0.bb} (86%)meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch +1
-1@@ -14,7 +14,7 @@ diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am index 0188fe2..dac07f3 100644 --- a/contrib/test/Makefile.am +++ b/contrib/test/Makefile.am -@@ -40,7 +40,7 @@ sdlcam_CFLAGS = -I../.. $(SDL2_CFLAGS) +@@ -42,7 +42,7 @@ sdlcam_CFLAGS = -I../.. $(SDL2_CFLAGS) sdlcam_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la mc_nextgen_test_CFLAGS = $(LIBUDEV_CFLAGS)meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch deleted +0
-45@@ -1,45 +0,0 @@ -From 137ce23ae677b11e5483ef810751edae7bf96bb9 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sat, 30 Nov 2019 18:40:06 -0800 -Subject: [PATCH] Define error_t and include sys/types.h - -Fix 'unknown type name' for error_t and u_int32_t. -u_int32_t is defined in sys/type.h - -Signed-off-by: Khem Raj <[email protected]> ---- - utils/ir-ctl/keymap.h | 4 ++++ - utils/keytable/keymap.h | 5 +++++ - 2 files changed, 9 insertions(+) - -diff --git a/utils/ir-ctl/keymap.h b/utils/ir-ctl/keymap.h -index f2b2963..1f8a3f8 100644 ---- a/utils/ir-ctl/keymap.h -+++ b/utils/ir-ctl/keymap.h -@@ -2,6 +2,10 @@ - #ifndef __KEYMAP_H - #define __KEYMAP_H - -+#include <sys/types.h> -+#ifndef error_t -+typedef int error_t; -+#endif - struct keymap { - struct keymap *next; - char *name; -diff --git a/utils/keytable/keymap.h b/utils/keytable/keymap.h -index f2b2963..345d55d 100644 ---- a/utils/keytable/keymap.h -+++ b/utils/keytable/keymap.h -@@ -2,6 +2,11 @@ - #ifndef __KEYMAP_H - #define __KEYMAP_H - -+#include <sys/types.h> -+#ifndef error_t -+typedef int error_t; -+#endif -+ - struct keymap { - struct keymap *next; - char *name;meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch deleted +0
-41@@ -1,41 +0,0 @@ -From b213da2d5fcc93cd24fc880c71c717d8e2ce2968 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sat, 30 Nov 2019 18:43:21 -0800 -Subject: [PATCH] Fix build on 32bit arches with 64bit time_t - -time element is deprecated on new input_event structure in kernel's -input.h [1] - -[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f - -Upstream-Status: Pending -Signed-off-by: Khem Raj <[email protected]> ---- - utils/keytable/keytable.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c -index 6cb0217..59ff1ee 100644 ---- a/utils/keytable/keytable.c -+++ b/utils/keytable/keytable.c -@@ -53,6 +53,11 @@ - - # define N_(string) string - -+#ifndef input_event_sec -+#define input_event_sec time.tv_sec -+#define input_event_usec time.tv_usec -+#endif -+ - struct input_keymap_entry_v2 { - #define KEYMAP_BY_INDEX (1 << 0) - u_int8_t flags; -@@ -1533,7 +1538,7 @@ static void test_event(struct rc_device *rc_dev, int fd) - - for (i = 0; i < rd / sizeof(struct input_event); i++) { - printf(_("%ld.%06ld: event type %s(0x%02x)"), -- ev[i].time.tv_sec, ev[i].time.tv_usec, -+ ev[i].input_event_sec, ev[i].input_event_usec, - get_event_name(events_type, ev[i].type), ev[i].type); - - switch (ev[i].type) {meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch +1
-1@@ -20,7 +20,7 @@ diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common index 651917e..cea57b7 100644 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp -@@ -782,15 +782,17 @@ static bool parse_subset(char *optarg) +@@ -785,15 +785,17 @@ static bool parse_subset(char *optarg) static bool parse_next_subopt(char **subs, char **value) {meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb renamed from meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.1.bb +5
-5@@ -20,14 +20,14 @@ SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \ file://mediactl-pkgconfig.patch \ file://export-mediactl-headers.patch \ file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \ - file://0005-Define-error_t-and-include-sys-types.h.patch \ - file://0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ file://0007-Do-not-use-getsubopt.patch \ " -SRC_URI[md5sum] = "ff2dd75970683be9a301ed949b3372b3" -SRC_URI[sha256sum] = "25fc42253722401f8742f04dc50a444dfa9b75378e7d09b55035bcbb44c5f342" +SRC_URI[md5sum] = "46f9e2c0b2fdccd009da2f7e1aa87894" +SRC_URI[sha256sum] = "956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7" -EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev" +EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev \ + --disable-v4l2-compliance-32 --disable-v4l2-ctl-32 \ + --with-systemdsystemunitdir=${systemd_system_unitdir}" VIRTUAL-RUNTIME_ir-keytable-keymaps ?= "rc-keymaps"
Signature · 4 lines
Pengutronix e.K. | Ulrich Ölmann | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 8 lines · Ulrich Ölmann
Hi Khem,
Quoted 3 lines · Khem Raj
I am seeing some packaging errors
https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/988
Quoted 7 lines
now it's getting interesting as I did not see this problem when testing my package upgrade. Digging deeper reveals that "50-rc_keymap.conf" (the file in question) is only conditionally installed [1] (the reason for this can be found in the discussion starting with [2]). Nevertheless the actual condition for installing it or not is evaluated in [3] and does not check the target system but the build host (and this is where the autobuilder and my build system must differ).
yes its possible and poking at build machine for getting components version is certainly going to be problematic for OE builds.
As we use systemd v247 in
Quoted 4 lines
OpenEmbedded master that check should return true in our case. Alternatively one could introduce a new configure option for installing that file or not and by that forward the choice to the v4l-utils recipe. Both could be achieved by a simple patch to configure.ac.
I think ideally the check should consider cross builds or secondly we could cache the value of this configure check
Quoted 9 lines
As all this is necessary to compile BPF programs for IR protocols I would like to ask the question if this will be possible at all as one would need to have a working clang environment for that, see [4]-[6].
Do you know by accident a competent clang expert to answer that? ;-)
If there is no chance to get this running anyway, then it's not worth the effort and it would be best to instead just add "--disable-bpf" toEXTRA_OECONFand patch [1] to not install "50-rc_keymap.conf" at all.
one option would be to check for meta-clang like
http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-kernel/kernel-selftest/kernel-selftest.bb?h=master
Quoted 1 line
What do you think?
I think from packaging point of view, we should package it if it is installed, so making arrangements to package it
when it is built is a good first step.
Quoted 198 lines
Best regards
Ulrich[1] https://git.linuxtv.org/v4l-utils.git/tree/utils/keytable/Makefile.am?h=v4l-utils-1.20.0#n6
[2] https://github.com/systemd/systemd/issues/13787#issuecomment-645972607
[3] https://git.linuxtv.org/v4l-utils.git/tree/configure.ac?h=v4l-utils-1.20.0#n558
[4] https://git.linuxtv.org/v4l-utils.git/tree/configure.ac?h=v4l-utils-1.20.0#n180
[5] https://git.linuxtv.org/v4l-utils.git/tree/configure.ac?h=v4l-utils-1.20.0#n552
[6] https://git.linuxtv.org/v4l-utils.git/tree/utils/keytable/bpf_protocols/Makefile.am?h=v4l-utils-1.20.0#n11Quoted 172 lines
I have sent a followup patch, but please review it and test it out if its the right way when systemd is in
DISTRO_FEATURESQuoted 168 lines · Ulrich ?lmann
Add new buildtime configuration options, update context of two patches and remove two patches as there are fixes [1]-[3] found upstream in the meantime.
[1]
38f4ce74275a("keytable: useinput_eventproperly")
[2]8b7e6ce9367f("keytable: add compatibility forinput_event_sec")
[3]976a2f681b4e("keymap.hneedssys/types.handargp.hwith musl")Signed-off-by Ulrich Ölmann <[email protected]>--- ...k-mc_nextgen_test-with-libargp-if-ne.patch | 2 +- ...fine-error_t-and-include-sys-types.h.patch | 45 ------------------- ...ld-on-32bit-arches-with-64bit-time_t.patch | 41 ----------------- .../v4l-utils/0007-Do-not-use-getsubopt.patch | 2 +- ...4l-utils_1.18.1.bb => v4l-utils_1.20.0.bb} | 10 ++--- 5 files changed, 7 insertions(+), 93 deletions(-)delete mode 100644
meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patchdelete mode 100644meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patchrename meta-oe/recipes-multimedia/v4l2apps/{v4l-utils_1.18.1.bb => v4l-utils_1.20.0.bb} (86%)meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch +1
-1@@ -14,7 +14,7 @@ diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am index 0188fe2..dac07f3 100644 --- a/contrib/test/Makefile.am +++ b/contrib/test/Makefile.am -@@ -40,7 +40,7 @@ sdlcam_CFLAGS = -I../.. $(SDL2_CFLAGS) +@@ -42,7 +42,7 @@ sdlcam_CFLAGS = -I../.. $(SDL2_CFLAGS) sdlcam_LDADD = ../../lib/libv4l2/libv4l2.la ../../lib/libv4lconvert/libv4lconvert.la mc_nextgen_test_CFLAGS = $(LIBUDEV_CFLAGS)meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-Define-error_t-and-include-sys-types.h.patch deleted +0
-45@@ -1,45 +0,0 @@ -From 137ce23ae677b11e5483ef810751edae7bf96bb9 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sat, 30 Nov 2019 18:40:06 -0800 -Subject: [PATCH] Define error_t and include sys/types.h - -Fix 'unknown type name' for error_t and u_int32_t. -u_int32_t is defined in sys/type.h - -Signed-off-by: Khem Raj <[email protected]> ---- - utils/ir-ctl/keymap.h | 4 ++++ - utils/keytable/keymap.h | 5 +++++ - 2 files changed, 9 insertions(+) - -diff --git a/utils/ir-ctl/keymap.h b/utils/ir-ctl/keymap.h -index f2b2963..1f8a3f8 100644 ---- a/utils/ir-ctl/keymap.h -+++ b/utils/ir-ctl/keymap.h -@@ -2,6 +2,10 @@ - #ifndef __KEYMAP_H - #define __KEYMAP_H - -+#include <sys/types.h> -+#ifndef error_t -+typedef int error_t; -+#endif - struct keymap { - struct keymap *next; - char *name; -diff --git a/utils/keytable/keymap.h b/utils/keytable/keymap.h -index f2b2963..345d55d 100644 ---- a/utils/keytable/keymap.h -+++ b/utils/keytable/keymap.h -@@ -2,6 +2,11 @@ - #ifndef __KEYMAP_H - #define __KEYMAP_H - -+#include <sys/types.h> -+#ifndef error_t -+typedef int error_t; -+#endif -+ - struct keymap { - struct keymap *next; - char *name;meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch deleted +0
-41@@ -1,41 +0,0 @@ -From b213da2d5fcc93cd24fc880c71c717d8e2ce2968 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sat, 30 Nov 2019 18:43:21 -0800 -Subject: [PATCH] Fix build on 32bit arches with 64bit time_t - -time element is deprecated on new input_event structure in kernel's -input.h [1] - -[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f - -Upstream-Status: Pending -Signed-off-by: Khem Raj <[email protected]> ---- - utils/keytable/keytable.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c -index 6cb0217..59ff1ee 100644 ---- a/utils/keytable/keytable.c -+++ b/utils/keytable/keytable.c -@@ -53,6 +53,11 @@ - - # define N_(string) string - -+#ifndef input_event_sec -+#define input_event_sec time.tv_sec -+#define input_event_usec time.tv_usec -+#endif -+ - struct input_keymap_entry_v2 { - #define KEYMAP_BY_INDEX (1 << 0) - u_int8_t flags; -@@ -1533,7 +1538,7 @@ static void test_event(struct rc_device *rc_dev, int fd) - - for (i = 0; i < rd / sizeof(struct input_event); i++) { - printf(_("%ld.%06ld: event type %s(0x%02x)"), -- ev[i].time.tv_sec, ev[i].time.tv_usec, -+ ev[i].input_event_sec, ev[i].input_event_usec, - get_event_name(events_type, ev[i].type), ev[i].type); - - switch (ev[i].type) {meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0007-Do-not-use-getsubopt.patch +1
-1@@ -20,7 +20,7 @@ diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common index 651917e..cea57b7 100644 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp -@@ -782,15 +782,17 @@ static bool parse_subset(char *optarg) +@@ -785,15 +785,17 @@ static bool parse_subset(char *optarg) static bool parse_next_subopt(char **subs, char **value) {meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb renamed from meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.1.bb +5
-5@@ -20,14 +20,14 @@ SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \ file://mediactl-pkgconfig.patch \ file://export-mediactl-headers.patch \ file://0002-contrib-test-Link-mc_nextgen_test-with-libargp-if-ne.patch \ - file://0005-Define-error_t-and-include-sys-types.h.patch \ - file://0006-Fix-build-on-32bit-arches-with-64bit-time_t.patch \ file://0007-Do-not-use-getsubopt.patch \ " -SRC_URI[md5sum] = "ff2dd75970683be9a301ed949b3372b3" -SRC_URI[sha256sum] = "25fc42253722401f8742f04dc50a444dfa9b75378e7d09b55035bcbb44c5f342" +SRC_URI[md5sum] = "46f9e2c0b2fdccd009da2f7e1aa87894" +SRC_URI[sha256sum] = "956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7" -EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev" +EXTRA_OECONF = "--disable-qv4l2 --enable-shared --with-udevdir=${base_libdir}/udev \ + --disable-v4l2-compliance-32 --disable-v4l2-ctl-32 \ + --with-systemdsystemunitdir=${systemd_system_unitdir}"Quoted 9 lines
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-${PV}.tar.bz2 \ · line 33
Quoted 7 lines
meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.20.0.bb renamed from meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.18.1.bb +0
-0VIRTUAL-RUNTIME_ir-keytable-keymaps ?= "rc-keymaps"--
Pengutronix e.K. | Ulrich Ölmann | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |