All of lore.kernel.org
 help / color / mirror / Atom feed
From: Troy Kisky <troy.kisky@boundarydevices.com>
To: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH v1 1/5] kconfig: allow defconfigs to live in board directory
Date: Thu, 6 Jan 2022 13:00:03 -0800	[thread overview]
Message-ID: <0279b9b9-ef22-7cfd-ca7b-d84e5fb5b269@boundarydevices.com> (raw)
In-Reply-To: <CAPnjgZ0P+kKy_ShL+8yLVm5foOjJt46kFRzNXTsLeu--RoX+fg@mail.gmail.com>

On 12/28/2021 12:33 AM, Simon Glass wrote:
> Hi Troy,
> 
> On Fri, 17 Dec 2021 at 16:02, Troy Kisky <troy.kisky@boundarydevices.com> wrote:
>>
>> This will reduce the size of the configs directory, and
>> make it more clear which board directory uses the defconfig
>> file.
>>
>> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
>> ---
>>  scripts/kconfig/Makefile | 9 ++++++++-
>>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
>>
>> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
>> index 12e525ee31f..307262e00de 100644
>> --- a/scripts/kconfig/Makefile
>> +++ b/scripts/kconfig/Makefile
>> @@ -92,8 +92,15 @@ else
>>  endif
>>  endif
>>
>> +%_defconfig: SHELL:=/bin/bash
>>  %_defconfig: $(obj)/conf
>> -       $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
>> +       $(Q)readarray -d '' names < <(find $(srctree)/configs $(srctree)/board -type f -name $@ -print0); \
>> +       if (test $${#names[*]} -eq 1); then \
>> +               $< $(silent) --defconfig="$${names[0]}" $(Kconfig); \
>> +       else \
>> +               echo "$@" not found or ambiguous error; \
>> +               echo "$${names[@]}"; exit 1; \
>> +       fi
>>
>>  # Added for U-Boot (backward compatibility)
>>  %_config: %_defconfig
>> --
>> 2.32.0
>>
> 
> How could this ever match more than one file?
> 
> Regards,
> Simon

If two different vendors decide to use the same defconfig file name, this will hit when the 2nd one
tries to merge it upstream.

BR
Troy

  reply	other threads:[~2022-01-06 21:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
2021-12-17 23:01 ` [PATCH v1 1/5] kconfig: allow defconfigs to live in " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2022-01-06 21:00     ` Troy Kisky [this message]
2021-12-17 23:01 ` [PATCH v1 2/5] dts: allow dts files " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2022-01-06 21:01     ` Troy Kisky
2021-12-17 23:01 ` [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2022-01-06 21:09     ` Troy Kisky
2022-01-30 23:14       ` Simon Glass
2021-12-17 23:01 ` [PATCH v1 4/5] genboardcfg: allow defconfigs " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2021-12-17 23:01 ` [PATCH v1 5/5] nitrogen6x: move board specific files to nitrogen6x directory Troy Kisky
2021-12-28  8:33   ` Simon Glass
2021-12-28  8:33 ` [PATCH v1 0/5] Move board specific files to board directory Simon Glass
2021-12-28 13:11   ` Tom Rini
2022-01-06 21:14     ` Troy Kisky
2022-01-07 15:12       ` Tom Rini
2022-01-07 18:33         ` Troy Kisky
2022-01-30 23:14           ` Simon Glass
2022-02-08 14:30           ` Tom Rini
2022-03-15 19:08             ` Troy Kisky
2022-03-15 20:01               ` Tom Rini
2022-03-15 20:23                 ` Troy Kisky
2022-03-16 14:48                   ` Tom Rini

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=0279b9b9-ef22-7cfd-ca7b-d84e5fb5b269@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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.