From patchwork Fri May 11 17:23:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Love X-Patchwork-Id: 10394785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3C1F160153 for ; Fri, 11 May 2018 17:23:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 647582018E for ; Fri, 11 May 2018 17:23:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5885727D4D; Fri, 11 May 2018 17:23:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20C002018E for ; Fri, 11 May 2018 17:23:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751052AbeEKRXP (ORCPT ); Fri, 11 May 2018 13:23:15 -0400 Received: from sub5.mail.dreamhost.com ([208.113.200.129]:42853 "EHLO homiemail-a125.g.dreamhost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711AbeEKRXP (ORCPT ); Fri, 11 May 2018 13:23:15 -0400 Received: from homiemail-a125.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a125.g.dreamhost.com (Postfix) with ESMTP id E427260000E06; Fri, 11 May 2018 10:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=nextdimension.cc; h=from :to:cc:subject:date:message-id; s=nextdimension.cc; bh=EleVPPbhP QwaW0aWJyyNUubbOTU=; b=CK4m7WQMRGmntXA3FUI8o3pu0Onls3643MEXEDpdH Zn7UkF7Ym4EPYHW12Y7djwJpk5pvOPA14IObFMPwr9WST6CH5IJM/x8H5KZnpIe8 kKqUPYMcLuVK9vMW5niV6Yq3xTm94LgH8TXolFSdl7QqdCmRdsMJ/9VBXH30kZtL aY= Received: from localhost.localdomain (66-90-189-166.dyn.grandenetworks.net [66.90.189.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: brad@nextdimension.ws) by homiemail-a125.g.dreamhost.com (Postfix) with ESMTPSA id 817C660000E02; Fri, 11 May 2018 10:23:14 -0700 (PDT) From: Brad Love To: linux-media@vger.kernel.org, hverkuil@xs4all.nl Cc: Brad Love Subject: [PATCH v2] Add config-compat.h override config-mycompat.h Date: Fri, 11 May 2018 12:23:02 -0500 Message-Id: <1526059382-7781-1-git-send-email-brad@nextdimension.cc> X-Mailer: git-send-email 2.7.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP config-mycompat.h is for use with kernels/distros whose maintainers have integrated various backports, which the media_build system does not detect for whatever reason. At that point there are options defined in config-compat.h, which enable backports in compat.h, but which already exist in the target kernel. This allows disabling of specific backports for a particular build, allowing compliation to succeed. For example, if the following three statements exist in config-mycompat.h: #undef NEED_WRITEL_RELAXED #undef NEED_PM_RUNTIME_GET #undef NEED_PFN_TO_PHYS Those three media_build backports will be disabled in compat.h and compilation on a problematic kernel will succeed without issue. conifg-mycompat.h should be used strictly for disabling media_build backports causing compilation issues. The file will usually be left empty, unless needed. WARNING: v4l/config-mycompat.h is removed by distclean, the file should be saved externally and copied into v4l/ when required. Signed-off-by: Brad Love --- Since v1: - Make the description and explanation of config-mycompat.h purpose and usage as explicit as possible for clarity sake. v4l/Makefile | 3 ++- v4l/compat.h | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/v4l/Makefile b/v4l/Makefile index 270a624..385fa83 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -273,6 +273,7 @@ links:: @find ../linux/drivers/misc -name '*.[ch]' -type f -print0 | xargs -0n 255 ln -sf --target-directory=. config-compat.h:: $(obj)/.version .myconfig scripts/make_config_compat.pl + -touch $(obj)/config-mycompat.h perl scripts/make_config_compat.pl $(SRCDIR) $(obj)/.myconfig $(obj)/config-compat.h kernel-links makelinks:: @@ -298,7 +299,7 @@ clean:: distclean:: clean -rm -f .version .*.o.flags .*.o.d *.mod.gcno Makefile.media \ Kconfig Kconfig.kern .config .config.cmd .myconfig \ - .kconfig.dep + .kconfig.dep config-mycompat.h -rm -rf .tmp_versions .tmp*.ver .tmp*.o .*.gcno .cache.mk -rm -f scripts/lxdialog scripts/kconfig @find .. -name '*.orig' -exec rm '{}' \; diff --git a/v4l/compat.h b/v4l/compat.h index b93750f..34b7f3a 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -8,6 +8,29 @@ #include #include "config-compat.h" +/* + * config-mycompat.h is for use with kernels/distros whose maintainers + * have integrated various backports, which the media_build system does + * not pick up on for whatever reason. At that point there are options + * defined in config-compat.h, which enable backports here, in compat.h, + * but which already exist in the target kernel. This allows disabling of + * specific backports for a particular build, allowing compliation to succeed. + + * For example, if the following three statements exist in config-mycompat.h: + + * #undef NEED_WRITEL_RELAXED + * #undef NEED_PM_RUNTIME_GET + * #undef NEED_PFN_TO_PHYS + + * Those three media_build backports will be disabled in this file and + * compilation on a problematic kernel will succeed without issue. + * conifg-mycompat.h should be used strictly for disabling media_build + * backports causing compilation issues. It will typically be left empty. + * + * WARNING: v4l/config-mycompat.h is removed by distclean, the file + * should be saved externally and copied into v4l/ when required. + */ +#include "config-mycompat.h" #ifndef SZ_512 #define SZ_512 0x00000200