All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] Added local directory as source of kernel code
Date: Wed, 7 Nov 2018 22:26:50 +0100	[thread overview]
Message-ID: <4eec3fe6-b078-90a2-ceec-c91d97715e8e@mind.be> (raw)
In-Reply-To: <20181107185226.GB4702@scaer>



On 07/11/18 19:52, Yann E. MORIN wrote:
> Nicolas, Thomas, All,
> 
> On 2018-11-07 17:44 +0100, Thomas Petazzoni spake thusly:
[snip]
>> Alternatively, maybe we should decide that linux and u-boot are special

 ... and also barebox, at91bootstrap, at91bootstrap3, arm-trusted-firmware,
mxs-bootlets, and I probably forget a few.

>> packages, and just like for those packages we support fetching from
>> custom tarballs and custom Git repositories, we should support fetching
>> from custom local directories (this is what your patch implements, but
>> until now, we have resisted going into this direction).
> 
> I would say we should not go that route, otherwise it would be difficult
> to resist adding yet more exceptions, for people that have local "forks"
> for some packages. And then it becomes a nightmare to maintain.

 +1

 So I've marked the patch as Rejected in patchwork.


 Nicolas does have a point, though, that using OVERRIDE_SRCDIR in local.mk is a
non-intuitive way for doing this. So I have a few ideas to make it a little more
convenient.

1. Add an additional config option to a file that is included just before
local.mk. So completely equivalent to Thomas's suggestion, but a little
"cleaner" because you'll get both the configured file and the local.mk as overrides.

2. In a BR2_EXTERNAL, a file with a well-known name (e.g. override.mk) is
included and can contain overrides. Note that you can't specify overrides in the
external.mk because that is included only after the packages, and _OVERRIDE_DIR
has to be defined before the package is included.

3. Add an addition config option that points to a directory, where each
subdirectory will be treated as a local override for a package with that name.
Similar to BR2_GLOBAL_PATCH_DIR.

4. Like 3 but with a well-known name in BR2_EXTERNAL (i.e. everything in
$(BR2_EXTERNAL_FOO)/override/ is used as an override dir.)


 I actually use the equivalent of option 4 by pointing to an override.mk that
contains

AUTO_OVERRIDES = $(notdir $(wildcard $(BR2_EXTERNAL_FOO_PATH))/override/*))
do_override = $(1)_OVERRIDE_SRCDIR = $$(BR2_EXTERNAL_FOO_PATH)/src/$(2)
$(foreach override,$(AUTO_OVERRIDES),\
        $(eval $(call do_override,$(call UPPERCASE,$(override)),$(override))))

so it's easy enough to implement that.


 Regards,
 Arnout

  reply	other threads:[~2018-11-07 21:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 10:06 [Buildroot] [PATCH 1/1] Added local directory as source of kernel code Nicolas Carrier
2018-11-07 13:57 ` Matthew Weber
2018-11-07 14:40   ` Nicolas Carrier
2018-11-07 16:44     ` Thomas Petazzoni
2018-11-07 17:08       ` Nicolas Carrier
2018-11-07 18:52       ` Yann E. MORIN
2018-11-07 21:26         ` Arnout Vandecappelle [this message]
2018-11-07 22:32           ` Yann E. MORIN
2018-11-08 10:07             ` Nicolas Carrier
2018-11-08 10:42           ` Thomas Petazzoni
2018-11-08 10:41         ` Thomas Petazzoni
2018-11-07 20:25 ` Arnout Vandecappelle
2018-11-09  7:37   ` Nicolas Carrier

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=4eec3fe6-b078-90a2-ceec-c91d97715e8e@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.