From patchwork Thu Nov 8 19:25:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 995157 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="bZUm3nHw"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42rYDW4gMMz9s3x for ; Fri, 9 Nov 2018 06:26:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D7055877B4; Thu, 8 Nov 2018 19:26:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Te4A7VPnbR01; Thu, 8 Nov 2018 19:26:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B852287161; Thu, 8 Nov 2018 19:26:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 86C5E1BF417 for ; Thu, 8 Nov 2018 19:26:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8416986A06 for ; Thu, 8 Nov 2018 19:26:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hdpioi6UnUC2 for ; Thu, 8 Nov 2018 19:26:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by hemlock.osuosl.org (Postfix) with ESMTPS id 1029786475 for ; Thu, 8 Nov 2018 19:26:06 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id z13-v6so20110807wrs.3 for ; Thu, 08 Nov 2018 11:26:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=F/nsOBhY/MJA7hKqhFIp04HvixQ1uIfKcoVBJx2K1SE=; b=bZUm3nHwAdbMnr4jEcy92DAyrJ9c1H3yS357wkZa1cjcyuTT+rjpstOBaahy3JqMf5 XybqJiu6aUBU4HQG+1uSEOeLOii9GPkCIWw5ZGk5Yqd4Lic9r1L2FsHi9z+VNV4o96Jh Q4LqebTXNBWOpFZsQ2BR9c/fr5ijX1M/iGIjpvHoS/L2r/3ZxPxSQVDXkF7hmv0DFc3b FIeUR+PQ554dfWwiyUuSq4gEH6OD75U5aAl+3FNH8JlH7DPEtDgvybv+S3dns9UPWHsU vUmFKx6phYDG5FtRJFdVeYkGL82TrJVE82zHKii3rpPzJgkYqu2lwBogLp63soLkxbBK FATw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=F/nsOBhY/MJA7hKqhFIp04HvixQ1uIfKcoVBJx2K1SE=; b=ZBI9PkKNiFcgw+bM8nxLsfLE3m/1wtqPdMYd1YI6C825B5jWqtpUrAmVc+m/t0yP4T nPIZKZjIp1enocvuuS6EmrmHAHLXCO25Pvl1fHVhjxQKJvSFcrtILZbGIL775G7hmui4 eC4DZxCcDm9A0oI+RalIzd8ipjDsapzzHik7N47/uPQilCH2SQ9z14IKlGeqZrZcB9BU +7y5VTH4vITU+ur12qqipqb8caKJ3DLvEX3XTyXstuv4NziLUb+GECN4eDeusdk0sR6+ e+PqM7A7qkyXxEE4bOc4vvhtQ3xwSikpOhDcWtEQ5hLyeOFbWYqjIw0+Z87mak8JRHjF OHyg== X-Gm-Message-State: AGRZ1gLZnBvERq55Bxh68QYugGODZByT8fCzKs6W2q19UKhSwOo5cKOz w0jOy+cCfDiDHw/3n2IY13TAUY4h X-Google-Smtp-Source: AJdET5fd61gzsIbzB8I9iZbB0+bwq7RF5WSGA+XtFJOZFyauAhLxJrmwTXFVhmwaO4/+gtK6fZ8NQA== X-Received: by 2002:adf:f24d:: with SMTP id b13-v6mr4994255wrp.142.1541705163903; Thu, 08 Nov 2018 11:26:03 -0800 (PST) Received: from localhost.localdomain (arennes-656-1-276-167.w109-218.abo.wanadoo.fr. [109.218.76.167]) by smtp.gmail.com with ESMTPSA id e8-v6sm6723922wmf.22.2018.11.08.11.26.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Nov 2018 11:26:02 -0800 (PST) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Thu, 8 Nov 2018 20:25:57 +0100 Message-Id: <20181108192557.9268-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH 1/1] libv4l: disable IR BPF based decoders X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Bump to version 1.61.1 added BPF based protocols support: https://git.linuxtv.org/v4l-utils.git/commit/?id=d6025b0e8c7f57b0f9390f987acc5eed57360d80 However, this dependency needs BPF support in kernel. On old kernels (before 3.18), __NR_BPF is not defined for all architectures. Moreover, some platforms such as mips or risc-v does not support it yet. So retrieve upstream patch to disable it. Drop ac_cv_prog_CLANG="" as it is not needed anymore Fixes: - http://autobuild.buildroot.org/results/442de57cb76a7b38d71d690490faadc641036374 Signed-off-by: Fabrice Fontaine --- ...d-without-BPF-support-in-ir-keytable.patch | 124 ++++++++++++++++++ package/libv4l/libv4l.mk | 5 +- 2 files changed, 125 insertions(+), 4 deletions(-) create mode 100644 package/libv4l/0004-configure-build-without-BPF-support-in-ir-keytable.patch diff --git a/package/libv4l/0004-configure-build-without-BPF-support-in-ir-keytable.patch b/package/libv4l/0004-configure-build-without-BPF-support-in-ir-keytable.patch new file mode 100644 index 0000000000..dcb724868a --- /dev/null +++ b/package/libv4l/0004-configure-build-without-BPF-support-in-ir-keytable.patch @@ -0,0 +1,124 @@ +From 5c213ee065ebd7a388f153a402851be8dfcfc960 Mon Sep 17 00:00:00 2001 +From: Sean Young +Date: Tue, 6 Nov 2018 09:58:32 +0000 +Subject: configure: build without BPF support in ir-keytable + +It currently does not build on mips and some platforms do not have +BPF support yet (risc-v, for example). + +Signed-off-by: Sean Young +Signed-off-by: Fabrice Fontaine +[Retrieved from: +https://git.linuxtv.org/v4l-utils.git/commit/configure.ac?id=5c213ee065ebd7a388f153a402851be8dfcfc960] + +diff --git a/configure.ac b/configure.ac +index 387f853..5cc34c2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -173,16 +173,12 @@ AM_CONDITIONAL([HAVE_X11], [test x$x11_pkgconfig = xyes]) + PKG_CHECK_MODULES([LIBELF], [libelf], [libelf_pkgconfig=yes], [libelf_pkgconfig=no]) + AC_SUBST([LIBELF_CFLAGS]) + AC_SUBST([LIBELF_LIBS]) +-AM_CONDITIONAL([HAVE_LIBELF], [test x$libelf_pkgconfig = xyes]) + if test "x$libelf_pkgconfig" = "xyes"; then + AC_CHECK_PROG([CLANG], clang, clang) +- AC_DEFINE([HAVE_LIBELF], [1], [libelf library is present]) + else + AC_MSG_WARN(libelf library not available) + fi + +-AM_CONDITIONAL([BPF_PROTOCOLS], [test x$CLANG = xclang]) +- + AS_IF([test "x$x11_pkgconfig" = xyes], + [PKG_CHECK_MODULES(GL, [gl], [gl_pkgconfig=yes], [gl_pkgconfig=no])], [gl_pkgconfig=no]) + AC_SUBST([GL_CFLAGS]) +@@ -453,6 +449,14 @@ AC_ARG_ENABLE(gconv, + esac] + ) + ++AC_ARG_ENABLE(bpf, ++ AS_HELP_STRING([--disable-bpf], [disable IR BPF decoders]), ++ [case "${enableval}" in ++ yes | no ) ;; ++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-bpf) ;; ++ esac] ++) ++ + PKG_CHECK_MODULES([SDL2], [sdl2 SDL2_image], [sdl_pc=yes], [sdl_pc=no]) + AM_CONDITIONAL([HAVE_SDL], [test x$sdl_pc = xyes]) + +@@ -475,6 +479,7 @@ AM_CONDITIONAL([WITH_GCONV], [test x$enable_gconv = xyes -a x$enable_shar + AM_CONDITIONAL([WITH_V4L2_CTL_LIBV4L], [test x${enable_v4l2_ctl_libv4l} != xno]) + AM_CONDITIONAL([WITH_V4L2_CTL_STREAM_TO], [test x${enable_v4l2_ctl_stream_to} != xno]) + AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_LIBV4L], [test x${enable_v4l2_compliance_libv4l} != xno]) ++AM_CONDITIONAL([WITH_BPF], [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes -a x$CLANG = xclang]) + + # append -static to libtool compile and link command to enforce static libs + AS_IF([test x$enable_libdvbv5 = xno], [AC_SUBST([ENFORCE_LIBDVBV5_STATIC], ["-static"])]) +@@ -505,6 +510,9 @@ AM_COND_IF([WITH_V4L_WRAPPERS], [USE_V4L_WRAPPERS="yes"], [USE_V4L_WRAPPERS="no" + AM_COND_IF([WITH_GCONV], [USE_GCONV="yes"], [USE_GCONV="no"]) + AM_COND_IF([WITH_V4L2_CTL_LIBV4L], [USE_V4L2_CTL_LIBV4L="yes"], [USE_V4L2_CTL_LIBV4L="no"]) + AM_COND_IF([WITH_V4L2_COMPLIANCE_LIBV4L], [USE_V4L2_COMPLIANCE_LIBV4L="yes"], [USE_V4L2_COMPLIANCE_LIBV4L="no"]) ++AM_COND_IF([WITH_BPF], [USE_BPF="yes" ++ AC_DEFINE([HAVE_BPF], [1], [BPF IR decoder support enabled])], ++ [USE_BPF="no"]) + AS_IF([test "x$alsa_pkgconfig" = "xtrue"], [USE_ALSA="yes"], [USE_ALSA="no"]) + + AC_OUTPUT +@@ -549,4 +557,5 @@ compile time options summary + qvidcap : $USE_QVIDCAP + v4l2-ctl uses libv4l : $USE_V4L2_CTL_LIBV4L + v4l2-compliance uses libv4l: $USE_V4L2_COMPLIANCE_LIBV4L ++ BPF IR Decoders: : $USE_BPF + EOF +diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am +index 90e4c8c..ddbab0f 100644 +--- a/utils/keytable/Makefile.am ++++ b/utils/keytable/Makefile.am +@@ -6,14 +6,15 @@ udevrules_DATA = 70-infrared.rules + + ir_keytable_SOURCES = keytable.c parse.h ir-encode.c ir-encode.h toml.c toml.h + +-if HAVE_LIBELF ++if WITH_BPF + ir_keytable_SOURCES += bpf.c bpf_load.c bpf.h bpf_load.h + endif + + ir_keytable_LDADD = @LIBINTL@ +-ir_keytable_LDFLAGS = $(ARGP_LIBS) $(LIBELF_LIBS) ++ir_keytable_LDFLAGS = $(ARGP_LIBS) + +-if BPF_PROTOCOLS ++if WITH_BPF ++ir_keytable_LDFLAGS += $(LIBELF_LIBS) + SUBDIRS = bpf_protocols + endif + +diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c +index a7ed436..6fc2235 100644 +--- a/utils/keytable/keytable.c ++++ b/utils/keytable/keytable.c +@@ -34,8 +34,11 @@ + #include "ir-encode.h" + #include "parse.h" + #include "toml.h" ++ ++#ifdef HAVE_BPF + #include "bpf.h" + #include "bpf_load.h" ++#endif + + #ifdef ENABLE_NLS + # define _(string) gettext(string) +@@ -1847,7 +1850,7 @@ static void device_info(int fd, char *prepend) + perror ("EVIOCGID"); + } + +-#ifdef HAVE_LIBELF ++#ifdef HAVE_BPF + #define MAX_PROGS 64 + static void attach_bpf(const char *lirc_name, const char *bpf_prog, struct toml_table_t *toml) + { +-- +cgit v0.10.2 + diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk index f473c03806..aa2f07a9c4 100644 --- a/package/libv4l/libv4l.mk +++ b/package/libv4l/libv4l.mk @@ -9,7 +9,7 @@ LIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2 LIBV4L_SITE = https://linuxtv.org/downloads/v4l-utils LIBV4L_INSTALL_STAGING = YES LIBV4L_DEPENDENCIES = host-pkgconf -LIBV4L_CONF_OPTS = --disable-doxygen-doc --disable-qvidcap +LIBV4L_CONF_OPTS = --disable-bpf --disable-doxygen-doc --disable-qvidcap # We're patching contrib/test/Makefile.am LIBV4L_AUTORECONF = YES # add host-gettext for AM_ICONV macro @@ -56,9 +56,6 @@ ifeq ($(BR2_PACKAGE_LIBV4L_UTILS),y) LIBV4L_CONF_OPTS += --enable-v4l-utils LIBV4L_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES) -# Disable clang that is used to build BPF (in-kernel bytecode machine) protocols -LIBV4L_CONF_ENV += ac_cv_prog_CLANG="" - ifeq ($(BR2_PACKAGE_QT5BASE)$(BR2_PACKAGE_QT5BASE_GUI)$(BR2_PACKAGE_QT5BASE_WIDGETS),yyy) LIBV4L_CONF_OPTS += --enable-qv4l2 LIBV4L_DEPENDENCIES += qt5base