From: Brad Love <brad@nextdimension.cc>
To: Hans Verkuil <hverkuil@xs4all.nl>,
Brad Love <brad@nextdimension.cc>,
linux-media@vger.kernel.org
Subject: Re: [PATCH 7/7] Add config-compat.h override config-mycompat.h
Date: Fri, 11 May 2018 10:23:10 -0500 [thread overview]
Message-ID: <1ec2af8b-ee4a-29ed-56f0-b1a8c9201558@nextdimension.cc> (raw)
In-Reply-To: <996b40ec-b4a2-8ce8-61ab-ce58269d3627@xs4all.nl>
Hi Hans,
On 2018-05-11 10:11, Hans Verkuil wrote:
> On 05/11/18 17:08, Brad Love wrote:
>> Hi Hans,
>>
>>
>> On 2018-05-11 09:41, Hans Verkuil wrote:
>>> Hi Brad,
>>>
>>> On 04/26/18 19:19, Brad Love wrote:
>>>> config-mycompat.h is for overriding macros which are incorrectly
>>>> enabled on certain kernels by the build system. The file should be
>>>> left empty, unless build errors are encountered for a kernel. The
>>>> file is removed by distclean, therefore should be externally
>>>> sourced, before the build process starts, when required.
>>>>
>>>> In standard operation the file is empty, but if a particular kernel has
>>>> incorrectly enabled options defined this allows them to be undefined.
>>> Can you give an example where this will be used?
>>>
>>> FYI: I've committed patches 1-6, but I don't quite understand when this patch
>>> is needed.
>>>
>>> With "for overriding macros which are incorrectly enabled on certain kernels"
>>> do you mean when distros do backports of features from later kernels?
>>>
>>> Regards,
>>>
>>> Hans
>>
>> Apologies if I was not very clear. Yes, this is for use in
>> kernels/distros whose maintainers have integrated various backports, and
>> 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 in compat.h, but which already exist in the target kernel.
>>
>> For example, on the device I'm working on right now, in kernel 3.10, I
>> have to supply the following three options in config-mycompat.h or
>> modify the tree and stuff them right into the top of compat.h:
>>
>> #undef NEED_WRITEL_RELAXED
>> #undef NEED_PM_RUNTIME_GET
>> #undef NEED_PFN_TO_PHYS
>>
>>
>> The above disables those three media_build backports and allows
>> everything to build. It seems there is quite often at least one backport
>> I must disable, and some target kernels require multiple backports disabled.
> OK, that's what I thought. Can you post a v2 of this patch with this explanation
> included? Both in the commit log and in the compat.h comment.
>
> That should make it clear what the purpose of this file is.
>
> Regards,
>
> Hans
Will do now.
>
>> Cheers,
>>
>> Brad
>>
>>
>>
>>>> Signed-off-by: Brad Love <brad@nextdimension.cc>
>>>> ---
>>>> v4l/Makefile | 3 ++-
>>>> v4l/compat.h | 7 +++++++
>>>> 2 files changed, 9 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/v4l/Makefile b/v4l/Makefile
>>>> index 270a624..ee18d11 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 87ce401..db48fdf 100644
>>>> --- a/v4l/compat.h
>>>> +++ b/v4l/compat.h
>>>> @@ -8,6 +8,13 @@
>>>> #include <linux/version.h>
>>>>
>>>> #include "config-compat.h"
>>>> +/* config-mycompat.h is for overriding #defines which
>>>> + * are incorrectly enabled on certain kernels. The file
>>>> + * should be left empty, unless build errors are encountered
>>>> + * for a kernel. The file is removed by distclean, therefore
>>>> + * should be externally sourced, before compilation, when required.
>>>> + */
>>>> +#include "config-mycompat.h"
>>>>
>>>> #ifndef SZ_512
>>>> #define SZ_512 0x00000200
>>>>
>>
next prev parent reply other threads:[~2018-05-11 15:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 17:19 [PATCH 0/7] media_build: various kernel version fixes Brad Love
2018-04-26 17:19 ` [PATCH 1/7] Disable VIDEO_ADV748X for kernels older than 4.8 Brad Love
2018-04-26 17:19 ` [PATCH 2/7] Disable additional drivers requiring gpio/consumer.h Brad Love
2018-05-12 9:31 ` Jasmin J.
2018-05-12 13:20 ` Brad Love
2018-05-12 15:36 ` Brad Love
2018-05-12 19:31 ` Jasmin J.
2018-04-26 17:19 ` [PATCH 3/7] Disable DVBC8SECTPFE for kernels older than 3.5 Brad Love
2018-04-26 17:19 ` [PATCH 4/7] Disable SOC_CAMERA " Brad Love
2018-04-26 17:19 ` [PATCH 5/7] Header location fix for 3.5.0 to 3.11.x Brad Love
2018-05-12 19:42 ` Jasmin J.
2018-05-12 22:46 ` Brad Love
2018-05-13 7:49 ` Jasmin J.
2018-04-26 17:19 ` [PATCH 6/7] Fix frame vector wildcard file check Brad Love
2018-05-11 14:35 ` Hans Verkuil
2018-04-26 17:19 ` [PATCH 7/7] Add config-compat.h override config-mycompat.h Brad Love
2018-05-11 14:41 ` Hans Verkuil
2018-05-11 15:08 ` Brad Love
2018-05-11 15:11 ` Hans Verkuil
2018-05-11 15:23 ` Brad Love [this message]
2018-05-11 20:02 ` Jasmin J.
2018-05-11 20:38 ` Brad Love
2018-05-11 21:43 ` Jasmin J.
2018-05-11 21:48 ` Brad Love
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ec2af8b-ee4a-29ed-56f0-b1a8c9201558@nextdimension.cc \
--to=brad@nextdimension.cc \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).