From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1972CC433F5 for ; Thu, 6 Jan 2022 21:00:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EFD5E82DA1; Thu, 6 Jan 2022 22:00:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=boundarydevices.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=boundarydevices.com header.i=@boundarydevices.com header.b="JjSL71Sw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EE6068307A; Thu, 6 Jan 2022 22:00:11 +0100 (CET) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D976D82A59 for ; Thu, 6 Jan 2022 22:00:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=boundarydevices.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=troy.kisky@boundarydevices.com Received: by mail-pf1-x435.google.com with SMTP id s15so3520615pfk.6 for ; Thu, 06 Jan 2022 13:00:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=KmVSB5ZSzSz/PG0IXfwteQJP7Ob+gc2zyOHDRkW9Rz8=; b=JjSL71Sw3ScnBtMkaRFKAGzZe/A+bM9LpcKQ0oTUufD2ON52Pd7Zxnqi2e5HFkN/Bi dc2Ediy3j0iE6x288gjX7c+aeQFQt2NVnt0KBtlEqgX4cpioI10edNNJuQpVmwe7jyMb ML/fGZUmRpR47WwImjgirESoEQ8Q1vGPE5ik4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=KmVSB5ZSzSz/PG0IXfwteQJP7Ob+gc2zyOHDRkW9Rz8=; b=uMp/P3exsVg5FrpTTO77sOkg6G+cC1CZ/Rh68RFaYa0LyVMPzMJGNIrSiI5E5PYNg2 Mr7AxQkzuQPKdyCILm6rnPX7YwbpGKc6yUI2gcZSBvkJkvuESCFR6fxuuAXElUjnkxct neVYDPuJJixr7xAbYQuD9b4tkuMkmvqx8Pse2AZ8fZKNHhn0FtX5Xwg2DFQHcePOB11n zbMbIsZ0jdtuSAHy3NQ/QBQwnembTQNi8Kb0BBmohc7ptP7Rg3ZsxVARfOYvoFYO9VLi OotVHyQ8ZSZ1+SEgvOCt2AetOU8rtT6Ose1jaLN/x2m4EkJu7cXB3qDQUIPWRbcrW6VN bMFA== X-Gm-Message-State: AOAM532i5Kr5O8v2EQmJMfrJNT82wQHff3NhHhLnK5r6p+vroXWwo/9b CrUw+98EYve+aMkpfAaj7+5ygg== X-Google-Smtp-Source: ABdhPJzNQy40S7Uji17QFcrqGyZ5Dlb3ltq2LUld3iL8l93Yia3MP962AX/4C8jLx4Fs9lWJExn28A== X-Received: by 2002:a63:7d1b:: with SMTP id y27mr48275508pgc.230.1641502804867; Thu, 06 Jan 2022 13:00:04 -0800 (PST) Received: from [192.168.0.4] (wsip-72-200-236-186.oc.oc.cox.net. [72.200.236.186]) by smtp.googlemail.com with ESMTPSA id a3sm3558666pfv.47.2022.01.06.13.00.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jan 2022 13:00:04 -0800 (PST) Message-ID: <0279b9b9-ef22-7cfd-ca7b-d84e5fb5b269@boundarydevices.com> Date: Thu, 6 Jan 2022 13:00:03 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v1 1/5] kconfig: allow defconfigs to live in board directory Content-Language: en-US To: Simon Glass Cc: Tom Rini , U-Boot Mailing List References: <20211217230131.2715940-1-troy.kisky@boundarydevices.com> <20211217230131.2715940-2-troy.kisky@boundarydevices.com> From: Troy Kisky In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 12/28/2021 12:33 AM, Simon Glass wrote: > Hi Troy, > > On Fri, 17 Dec 2021 at 16:02, Troy Kisky 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 >> --- >> scripts/kconfig/Makefile | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) > > Reviewed-by: Simon Glass > >> >> 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